Existing logins get mapped to new databases

  • Pretty new with SQL but working my may up:-)

    When I create a new database all existing SQL-logins automatically get mapped to the new database. How to avoid that? I can remove them afterwards but since I'm about to add 60+ databases I will be a pain in the ass to remove them manually or by script (keep the script updated).

    All the databases uses dbo schema (don't know if it can be related to that)

    Is is related to the SQL-logins mapping to masterdatabase (datareader)?

    I appreciate all help that can lead me in the right direction.

  • This sounds like all your users ended up in model database. Remove them from there and newly created db's shouldn't have those users added by default.

  • Seems like that did the trick. Thank you.

    I have mapped all new logins to model as public, wasn't sure if that was needed but didn't have the guts to remove it since I didn't got a test environment at that time and wanted to be sure that it worked for our customers.

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

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