Hello -
I just installed Sql Server 2005 on a company server. I copied and attached
database mdf and ldf files. The database runs okay with my application on
my developer machine. I just started setting up security on the server and
it is indicating the owner of the database is "MyOrganization"\MyName. My
login name (user name) on the network is MyName. I tried to change to chang
e
the Owner of the database under Files and I'm getting the message:
...The login 'MyName' does not exist on this server.
How can I fix this?
Any help will be greatly appreciated!
--
SandyHow do you connect to the company server? If you connect via SQL login, then
execute the below should do it (assuming the sql login is part of sysadmin).
exec <the_database_name>..sp_changedbowner 'the_sql_login'
If you're login as a NT user/acct and is part of the administrators group,
your NT user name is implicitly granted permission. If you really want to
use your NT user name/acct as the db_owner, you will have to explicitly add
your NT acct to sql sysadmin role.
e.g.
create login [domain\nt_acct] from windows;
exec sp_addsrvrolemember 'domain\nt_acct', 'sysadmin'
then you can change dbowner
exec <the_database_name>..sp_changedbowner 'domain\nt_acct'
-oj
"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:CCFAE0DB-7208-4189-B9B4-F5A3B1EDCD0B@.microsoft.com...
> Hello -
> I just installed Sql Server 2005 on a company server. I copied and
> attached
> database mdf and ldf files. The database runs okay with my application on
> my developer machine. I just started setting up security on the server
> and
> it is indicating the owner of the database is "MyOrganization"\MyName. My
> login name (user name) on the network is MyName. I tried to change to
> change
> the Owner of the database under Files and I'm getting the message:
> ...The login 'MyName' does not exist on this server.
> How can I fix this?
> Any help will be greatly appreciated!
> --
> Sandy
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment