Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Standby Database inaccessible by user


Standby Database inaccessible by user

Author
Message
Akil McCracken
Akil McCracken
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 145
I am using SQL Server 2008 on both Servers and logshipping to the secondary database. I can't of course synch up users on the standby/read only database. I was informed by a Senior DBA to execute sp_change_users_login on the primary database and that the executed command would be captured in the T-log replayed on the secondary. I executed sp_change_users_login with both 'AUTO_FIX' and 'UPDATE_ONE' options in-between separate T-log backups and restores to the secondary and neither allowed me to successfully use the USER to access the database. Any suggestions are appreciated, Thank you.
calvo
calvo
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1370 Visits: 3965
This happens because the login specified has a different sid on the primary and secondary servers. The logins are mapped to database users by sid. When you restore a log backup on the secondary server, you reset the sid to the primary login.

You must create a procedure, in the master database, to script a login. This script will contain the login, including the sid the primary uses. Then run the login creation script on the secondary server. Now each login shares the same sid. This sid is assigned to the same user in each database.

Everything you need is in this link
http://support.microsoft.com/kb/918992

______________________________________________________________________________________________
Forum posting etiquette. Get your answers faster.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search