>>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.
Thanks.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham