I have tried to use
Sp_addlogin
and sp_grantdbaccess
I have got a new user but i have only access to master DB. I can use
sp_grantdbaccess to every database.
Inn this case i have about 100 different databases i need to have
access to. is't a way to give a user "administrator" rights to every
database?"Eirik Kongsvik" <eirik@.jdata.no> wrote in message
news:f4367b2b.0312160659.197df131@.posting.google.c om...
> I want to make a user ho have the same rights as the SA user.
> I have tried to use
> Sp_addlogin
> and sp_grantdbaccess
> I have got a new user but i have only access to master DB. I can use
> sp_grantdbaccess to every database.
> Inn this case i have about 100 different databases i need to have
> access to. is't a way to give a user "administrator" rights to every
> database?
To give another login the same rights as sa, you can add them to the
sysadmin server role:
exec sp_addsrvrolemember 'MyLogin', 'sysadmin'
Don't forget that sysadmins can do anything in SQL Server - if you want to
make a login db_owner for each database, then you will need to loop through
the databases, granting access to each one, then adding the user to the
db_owner database role.
Simon
No comments:
Post a Comment