Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing dbo/sa account on a SQL database

Status
Not open for further replies.

Sunny4Ever

IS-IT--Management
Nov 6, 2002
77
GB
Hi all,

I have a SQL 2000 db in a production environment that has somehow lost the dbo/sa account even though this account is the owner of all the tables? Sa was the only account and now there are 0 database users!?! I need to recreate the dbo/sa user but SQL will not allow this operation and returns an error that I "cannot use reserved user name sa"

Any ideas how this could be possible. If I try to replicate this on a test database SQL returns an error if I try to delete the sa user as it owns objects.

More importantly does anyone have any tricks to fix this and get the dbo user back?

Thanx in advance
-S
 
I have never had an SA user disappear.
Perhaps it is a permissions issue and you just cannot see the user in your login context...

SQL/SAP DBA
 
Why was SA the only account? You should have had at least one user account. (you should NEVER use SA for anything).

Is your SQL Server set for Windows Authentication ONLY? If so, SA account won't work. SA only works with Mixed Mode.

Are you an Admin on the server? If so, try to log in with your admin account. There's an account Builtin/Administrators that allows admins to log in.

-SQLBill

Posting advice: FAQ481-4875
 
I think I was a little unclear: I still have the sa account globally and I can log onto SQl using this account and query data. The dbo/sa user is missing from the users container of only the problem database and any new databases I create. I am able to run sp_changedbowner 'sa' on the database and the sa account appears in the users list after this.

What really confuses me is who is the dbo if there are 0 database users? Is this a sign of a very sick server?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top