Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to assign role to a database in SSMS?
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01529571
Message ID:
01529582
Views:
30
>>>Hi,
>>>
>>>I need to assign a role db_owner to a database. How do I do it in SSMS or in T-SQL?
>>>
>>>TIA.
>>
>>
>>You can use sp_addrole to add a new role, but db_owner is a standard database role (built-in).
>>
>>Are you just trying to assign that role to a user?
>
>Remember the thread I started earlier this morning where I could not attach a database. The DB Admin person for the customer replied that they (the company) do not have domains. What he said I should do is following:
>1. Assign the role of db_owner to the database I need to copy and attach to their SQL Server.
>2. Detach this database (after I assign it the role of db_owner).
>3. Then, he said, I should be able to attach the database to their SQL server using the following code:
>
>USE [master]
>GO
>CREATE DATABASE [MyDatabaseName] ON
>( FILENAME = N'E:\MyDatabaseName.mdf' ),
>( FILENAME = N'E:\MyDatabaseName_log.LDF' )
>FOR ATTACH
>GO
>
>
>Does the above make sense to you? And I am stuck on item 1.

No - not really. However there are many ways to accomplish the task so it may be valid.

If their DB admin knows how to do it, I'd ask him/her to actually do it rather than run in circles with them.


>
>Thanks.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform