Using SQL Server 2008 R2 on Windows Server 2008 R2 Enterprise
I have a database that gets imported each evening which involves dropping then creating the database from a LiteSpeed backup using a script. I have been doing this for several years and in May without changes to the script the process is now removing my users read access to the database after it's been added back in.
In Security I have a login [domain\Everyone] that needs to be mapped to db_datareader for the database. After the database is reloaded and I check the security the database is not checked in the GUI in the MAP column and only the public has a check mark. To fix the security I have to add a check mark to the mapped column and put a check mark next to db_datareader then click OK.
I tried to use a script to do the following
USE [database name];
EXEC sp_addrolemember...