March 21, 2006 at 6:05 am
Hello,
I restored a production DB on a test environment, but I got this problem ;
The DBO user name is associated with my application Login Name, ie TOTO
but, my application user, TOTO, is associated with login name SA.
so DBO <-> TOTO
TOTO <-> SA
It should be
DBO <-> SA
and TOTO< <-> TOTO
Sql Server does not allow me to change that.
I tried the program Sync SQL logins.exe, that see the problem, but cannot solve it...
Anybody got an idea ?
(Sorry, but I'm really not an expert)
March 21, 2006 at 4:47 pm
Check sp_changedbowner in Books Online.
--------------------
Colt 45 - the original point and click interface
March 22, 2006 at 12:11 am
but my user is not orphaned.
There is just a mixture.
March 22, 2006 at 12:24 am
sp_changedbowner changes the owner of the current database, nothing to do with orphaned users.
Read the documentation in Books Online.
--------------------
Colt 45 - the original point and click interface
March 22, 2006 at 6:47 am
If you restored the database to a DIFFERENT server: After the restore, you will need to synchronize the logins/users data. To do this, login to the Query Analyzer and run the following query for EACH user in the database:
USE DATABASENAME
go
EXEC sp_change_users_login 'Update_One', 'USERNAME', 'LOGINNAME'
Hope this helps. For more info on this command, consult BOL.
Norene Malaney
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply