Friday, March 23, 2012

Name: dbo Login name: none ??

Sometimes I find that when I restore a database the user
(sa is the only user in the database in this case) comes
up with the "Name" of dbo but there is nothing displayed
in the "Login Name" column in the "users" object. How do I
get the "Login Name" of sa to appear there?
Thanks
JThe login mapping for the 'dbo' user is determined by database ownership.
This can get out-of-sync following a restore or attach. You can correct
this with sp_changedbowner:
USE MyDatabase
EXEC sp_changedbowner 'sa'
GO
"J" <anonymous@.discussions.microsoft.com> wrote in message
news:04e701c3b9e8$ced2ab50$a101280a@.phx.gbl...
> Sometimes I find that when I restore a database the user
> (sa is the only user in the database in this case) comes
> up with the "Name" of dbo but there is nothing displayed
> in the "Login Name" column in the "users" object. How do I
> get the "Login Name" of sa to appear there?
> Thanks
> J

No comments:

Post a Comment