Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Secondary database- standby(readonly mode)

Author  Topic 

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2009-11-19 : 17:09:18
I had setup logshipping for production DB from prod to DR server. Now we are testing ours users to connect to Website thru Dr server DB(stand by mode). throwing error like login can't have access to open database and can't read database.

Please advice...I noticed that once did logshipping in secondary server permisssion are not there for login to that database

MartinH
Starting Member

5 Posts

Posted - 2009-11-20 : 05:30:46
Are the logins on the DR Server exactly the same is Prod? run select name,sid,password from sys.syslogins on both servers to check.

MartinH
http://uk.linkedin.com/in/martinhandsley
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2009-11-20 : 10:18:56
all login names and pw are same. what is sid?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-20 : 12:15:40
Use this to transfer your logins to the secondary server: http://www.windowsitpro.com/SQLServer/Article/ArticleID/16090/16090.html

It not only grabs the login names and passwords, but also the sids so you don't have to unorphan the accounts.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2009-11-20 : 14:02:38
Still SID is different for 2 logins ...how to map SID?


If SID is not matching, will application work when failover occurs
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-20 : 17:41:23
Drop the login on the secondary server and then recreate using the link I posted.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-20 : 18:13:17
You edited your post, so here's the answer to that: you need to unorphan the accounts if the sids don't matchup otherwise it won't work. That's why it's easier to just grab the correct sids using the link I provided.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -