March 23, 2009 at 11:46 am
Hello
My use case is this:
I have a developer that runs a script that reads information from our application databases on a server.
Our support department adds new application databases as we get new customers.
I need a login to which I can assign a security context that will give read only access as the new databases are added by the support department without having to explicitly grant access to the new databases each time one is created.
I know how to create a login that is readonly for databases that currently reside on the server, but is there any way to create a login that allow read only access to new databases as they are created?
Steve
March 23, 2009 at 11:55 am
March 23, 2009 at 12:01 pm
New databases when created are based on the Model database. Create the login that you want in all new databases in the Model
From BOL
When a CREATE DATABASE statement is issued, the first part of the database is created by copying in the contents of the model database. The rest of the new database is then filled with empty pages.
If you modify the model database, all databases created afterward will inherit those changes. For example, you could set permissions or database options, or add objects such as tables, functions, or stored procedures
March 23, 2009 at 12:02 pm
That's what I was looking for, a simple but effective solution.
Thanks,
Steve
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply