dbTalk Databases Forums  

Another question about db mirroring

microsoft.public.sqlserver.clustering microsoft.public.sqlserver.clustering


Discuss Another question about db mirroring in the microsoft.public.sqlserver.clustering forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Luca
 
Posts: n/a

Default Another question about db mirroring - 01-12-2009 , 09:25 AM






hello,
I already wrote last week about db mirroring.
I've setup a mirroring lab with principal-mirror-witness SQL 2005 std.
Everything seems to be fine; if I stop the mirror or the principal, the DB
is online and ready to accept client connections.

I've tried a fail over, all is ok expect that at the end I have to launch
the DB properties and insert manually the db owner (SQL user).

Another thing: What is the procedure to copy all the users on the principal
Server to the mirror ?? In order to have the users already OK when the mirror
take place.

Is there a way to do that ?? If I use the "copy DB" it works but you cannot
mirror a DB after that.

Thanks a lot
Luca


Reply With Quote
  #2  
Old   
Uri Dimant
 
Posts: n/a

Default Re: Another question about db mirroring - 01-13-2009 , 12:31 AM






Luca
Quote:
Another thing: What is the procedure to copy all the users on the
principal
Server to the mirror ?? In order to have the users already OK when the
mirror
take place.
If you try to log into the new principal prior to synchronizing the
logins and users, you get an error message that the login failed.


The logins and users must be synchronized on the database that was failed
over to. This is the case regardless of whether it was manual or automatic
failover. The process has two simple steps if the original principal
database is still available:

1.. Run the BCP command to get the data from the syslogins table:

C:\tmp>bcp master..syslogins out c:\tmp\syslogins.dat -N -S . -T ;2.. Run
the system stored procedure to import it into the new principal server:

EXEC sp_resolve_logins @dest_db = 'yourdb',
@dest_path = '\\yourpath\d$\',
@filename = 'syslogins.dat'
GOAlternately if the original principal database is not available, you have
these two choices:

1.. Restore the master database to another server and extract the
syslogins table there and then sp_resolve_logins to the new principal
server.

2.. If the master database was not backed up, key the user logins by hand.





"Luca" <Luca (AT) discussions (DOT) microsoft.com> wrote

Quote:
hello,
I already wrote last week about db mirroring.
I've setup a mirroring lab with principal-mirror-witness SQL 2005 std.
Everything seems to be fine; if I stop the mirror or the principal, the DB
is online and ready to accept client connections.

I've tried a fail over, all is ok expect that at the end I have to launch
the DB properties and insert manually the db owner (SQL user).

Another thing: What is the procedure to copy all the users on the
principal
Server to the mirror ?? In order to have the users already OK when the
mirror
take place.

Is there a way to do that ?? If I use the "copy DB" it works but you
cannot
mirror a DB after that.

Thanks a lot
Luca




Reply With Quote
  #3  
Old   
Geoff N. Hiten
 
Posts: n/a

Default Re: Another question about db mirroring - 01-13-2009 , 08:18 AM



Here is an excellent article on how to transfer logins

http://support.microsoft.com/kb/246133

The key is that the SID for the login must match exactly on both servers for
automatic failover to work. The article explains how to transfer ligins
with the SIDs intact.

--
Geoff N. Hiten
Principal SQL Infrastructure Consultant
Microsoft SQL Server MVP




"Luca" <Luca (AT) discussions (DOT) microsoft.com> wrote

Quote:
hello,
I already wrote last week about db mirroring.
I've setup a mirroring lab with principal-mirror-witness SQL 2005 std.
Everything seems to be fine; if I stop the mirror or the principal, the DB
is online and ready to accept client connections.

I've tried a fail over, all is ok expect that at the end I have to launch
the DB properties and insert manually the db owner (SQL user).

Another thing: What is the procedure to copy all the users on the
principal
Server to the mirror ?? In order to have the users already OK when the
mirror
take place.

Is there a way to do that ?? If I use the "copy DB" it works but you
cannot
mirror a DB after that.

Thanks a lot
Luca



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.