user mapping by default ?

  • Is there a way to add a user mapping for a particular login so that the login gets read access to all new databases?

    (Add a mapping to model db ??)

    How about all existing databases?

  • For this case I would create a windows group that has data reader access and manage the group for who get's access. After that add that group to your db_datareader database role in Model. Now when a new database is created (not restored from backup that won't work) it will inherit the db_datareader role access from Model.

    To configure you existing database I would use sp_msforeachdb to create a DB user for the login and then alter the db_datareader role to add the user as a member.



    Microsoft Certified Master - SQL Server 2008
    Follow me on twitter: @keith_tate

    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply