Monday, 15 September 2014

Restore database rights on restored database SQL 2012 -



Restore database rights on restored database SQL 2012 -

we restoring sql 2008 backup database on sql 2012 database server. restoring goes well, files created , database online.

but unfortunately, not have rights on database, other read. in past, if remember right, delete roles/schema's restored database , so, restore other rights database. unfortunately not work now...

can help or point site set security restored database?

i have not tried when restoring different version of sql server sounds have orphaned users and/or missing users.

http://msdn.microsoft.com/en-us/library/ms175475.aspx

note: in dynamic sp in master db goes through dbs restore , prepare users connections new development environment.

the steps are

exec [@dbname].dbo.sp_change_users_login 'report' -- find orphaned exec [@dbname].dbo.sp_change_users_login 'auto_fix', @username -- prepare orphaned if in instance

if study returns users instance not have create user. development environment, adjust accordingly.

create login @username password = '@password', check_policy = off -- create missing user exec [@dbname].dbo.sp_change_users_login 'auto_fix', '@username', null, '@password' -- prepare orphaned user created.

i hope works case.

sql database sql-server-2012 database-restore database-security

No comments:

Post a Comment