Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
iamlerxt
Starting Member
11 Posts |
Posted - 2004-07-02 : 14:25:41
|
| I am getting a message when trying to send a SET IDENTITY_INSERT ON statement from my app. I am using a custom data access dll to get to the db, and the user in my custom dll does not have db_owner permissions, so SQL will not let me set identity insert on. If I add my user to the dbowner role through enterprise manager, all is fine. But, I need a sql script to do this for my client sites. I have searched and cannot find a way to add my user to the dbowner role using any TSQL statements or system sp's. I have already tried sp_addsrvrolemember to no avail. Please help!!!! |
|
|
gwhiz
Yak Posting Veteran
78 Posts |
Posted - 2004-07-02 : 14:28:38
|
| Try usingsp_addrolemember 'db_owner','useraccount' |
 |
|
|
iamlerxt
Starting Member
11 Posts |
Posted - 2004-07-02 : 15:54:15
|
| Worked like a charm. Thank you. I now know the difference between server roles and database roles. Kinda embarassing that I didn't see that before. :%| Your help and prompt reply is much appreciated. Have a nice holiday weekend. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-07-02 : 18:47:10
|
| Why are you doing this? You shouldn't have any need to grant clients dbo to a database. They can just start dropping stuff at will. Have you thought about this. Why don't you tell us what you are doing, so we can see if we can help you design around it.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|