473,215 Members | 1,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,215 software developers and data experts.

How to change db owner for SQL Server 2000 database

Our programmer has left the company and the tables and views were created with his credential as owner.
How do I change the ownership of all the tables and views using the stored procedure - sp_changedbowner?
Instead of typing the individual table and view name to change the db owner, is there a way to change the owner at once?
Aug 28 '06 #1
5 91616
ramasp
19
select * from sysobjects where xtype='u'

The above command displays user tables. Get each user table name from sysobjects by using cursor or while loop pass the same as input parameter ot the sp_changedbowner

Try .....
Sep 4 '06 #2
or from enterprise manager,right click on users and from opened users adjust ur adjustments
good luck
Sep 11 '06 #3
Our programmer has left the company and the tables and views were created with his credential as owner.
How do I change the ownership of all the tables and views using the stored procedure - sp_changedbowner?
Instead of typing the individual table and view name to change the db owner, is there a way to change the owner at once?

hi dude have a look at this link http://support.microsoft.com/kb/275312
Jun 13 '07 #4
jstone
1
use [currentdatabase]
go
sp_changedbowner 'yourusername', 'true'
go

This will change the owner of the current database to whatever username you want ( you could put sa in there ) and then remap any alias as well (that's the true).

// John Stone

Our programmer has left the company and the tables and views were created with his credential as owner.
How do I change the ownership of all the tables and views using the stored procedure - sp_changedbowner?
Instead of typing the individual table and view name to change the db owner, is there a way to change the owner at once?
Jun 25 '07 #5
In SQL Server Management Studio 2005:
1/ Right Click on the Database node
2/Click Properties
3/Select Files
4/There would be a Owner Text Box, change the new Owner Name or browse and select the new Owner.

Shrimant Patel
&
Harith Patel
Sep 26 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: geoff | last post by:
I'm trying to create a new database and new login to allow a client (through my asp.net page) to create their own database, username and password. I've tried using the stored procedures I've found...
3
by: Oren | last post by:
Hi, Is there any way that calls to sp_addrolemember and sp_droprolemember can be enabled for non database owners and non sysadmin members? This would be very helpful for an application I'm in...
2
by: zinck74 | last post by:
Hi, I am trying to setup a subscription but I keep running into problems. I setup the subscription fine, I see that it creates a job in SQL Server. It shows a specific domain account as the owner...
1
by: Ange T | last post by:
Hi, I have a secured Access 2000 database, and have encountered a strange error that I can't find any similar postings on. I'd really appreciate your help! In my database, I have a number of...
2
by: Richard Sherratt | last post by:
I create a new user and make them a member of Admins. I then log on as that user and try to modify an existing query. I'm told that I don't have the necessary permissions. The Admins group has full...
1
by: alexkuzn | last post by:
I am trying to change owner of all tables in a database. How can I do it?
1
by: MADS | last post by:
Hi everybody, I've five instances of SQL Server 2000 with the SAME database with a DIFFERENT owner in each server. I, as the administrator, have a lot of queries that I have to execute in some...
6
by: mplpost | last post by:
Our web application requires that when a new Organization is created,a separate Database is to be created for the corresponding organization, so that each organization remains a separate entity...
3
by: coolminded | last post by:
hi, i have create one database with owner 'postgres' and i created tables with the same owner. but now i want to change the owner of the database as well as the tables. i changed the owner of...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.