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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 New DB Role

Author  Topic 

SQLNOVICE999
Yak Posting Veteran

62 Posts

Posted - 2012-01-24 : 16:10:40
I am a developer and need help with DBA work for test server...

What I need to do is create a new db role that can only create, alter and drop VIEWs. That role will be assigned to a user account that I will create... So the user account should be able to create, alter and drop views.

Please let me know how to do this in SQL Server 2008.

Thanks,
Laura

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-24 : 16:14:23
Sorry...Best you can hope for is db_ddladmin

Well maybe not the best...maybe you can use DDL Triggers....

Personally...I would require the developer to give me their requirements, and I or my team would create it for them


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

SQLNOVICE999
Yak Posting Veteran

62 Posts

Posted - 2012-01-24 : 16:20:07
So DDL trigger can be used to grant permission to user account to create, alter and drop views? ddl_admin will give the user account permissions to do more...Thanks!
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-24 : 16:32:59
DDL Triggers would allow you to restrict THAT User...I'm guessing...not to much experience with DDL Triggers

I make sure everything is in lock down mode, so I don't really need them



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

SQLNOVICE999
Yak Posting Veteran

62 Posts

Posted - 2012-01-24 : 22:47:36
Thanks Brett... I did some research on the DDL trigger and understand what you suggested. Thanks a lot again for putting me in the rite direction.

quote:
Originally posted by X002548

DDL Triggers would allow you to restrict THAT User...I'm guessing...not to much experience with DDL Triggers

I make sure everything is in lock down mode, so I don't really need them



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/




Go to Top of Page
   

- Advertisement -