March 12, 2014 at 2:39 pm
How to give READ permissions automatically to USERS when new DATABASE is added.
Is there way that i can create read access to users on ServerLevel to all databases.
March 12, 2014 at 2:43 pm
raghu.sudheer (3/12/2014)
How to give READ permissions automatically to USERS when new DATABASE is added.Is there way that i can create read access to users on ServerLevel to all databases.
You shouldn't be giving user READ access. You should give that access to a role and assign users to that role.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
March 12, 2014 at 2:47 pm
How do i create a role in 2008R2? I am new to this roles topic.
March 12, 2014 at 2:52 pm
I mean How to create role at SERVER level and give READ access so that it is applied to all DATABASES, even when new database is added.
March 12, 2014 at 2:52 pm
raghu.sudheer (3/12/2014)
How do i create a role in 2008R2? I am new to this roles topic.
This is a good place to start.
http://technet.microsoft.com/en-us/library/ms189121.aspx
You will notice that there is a built-in role describing exactly what you are looking for here. db_datareader
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
March 12, 2014 at 2:56 pm
Thanks for the reply. These are all DATABASE level and if create a new database i need to grant permissions to that DATABASE.
Is there any way that all these permissions is transferred to the new database. The reason i m asking is asking one of the process creates new DATABASE every 2 days.
Currently i am thinking to write DDL Trigger. Can you suggest any other simple way?
Thanks so much!
March 12, 2014 at 4:50 pm
Try modifying the system database called model to have the security settings you want as outlined above. Then, when you create a new database, what's in model is what gets copied to the new db.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 12, 2014 at 7:37 pm
raghu.sudheer (3/12/2014)
Thanks for the reply. These are all DATABASE level and if create a new database i need to grant permissions to that DATABASE.Is there any way that all these permissions is transferred to the new database. The reason i m asking is asking one of the process creates new DATABASE every 2 days.
Currently i am thinking to write DDL Trigger. Can you suggest any other simple way?
Thanks so much!
Why not just add the code to the same code that creates the new database every 2 days? I'd hate to add something to the MODEL database because it's easy to forget that privs are built in and if I create a database that might be sensitive, I wouldn't have to remember to go delete some privs.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply