473,382 Members | 1,665 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,382 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 91671
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
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.