Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to assign role to a database in SSMS?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01529571
Message ID:
01529582
Vues:
29
>>>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!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform