When you add in a new login, the SID
that??™s generated will be relatively random and won??™t match the SID that??™s recorded with the user. Now
all of those users and logins are out of sync. There are a number of ways around this (just search for
???orphaned users??? in BOL). The one I prefer is the old standby; the stored procedure
sp_change_users_login. You can use this to sync up the SIDs so that the SID for the database user
is the same as the SID for the login.
If, during the course of a mirroring session, logins are added, you??™ll need to add them to the mirror
node in the event of a failure. The master database cannot be mirrored, so make sure you record any
additional logins that have been added since the mirroring session started.
Configuring Mirroring
For the purposes of this chapter, I??™m keeping things as simple as possible. Let??™s say you
have three instances??”DBMIRROR1, DBMIRROR2, and DBMIRROR3??”and you want to
configure mirroring for one of the databases. You choose to use the High Availability
mode, because it??™s the most popular choice. The first step is to create a fresh (yes, fresh??”
not one from last night) backup of the database that you want to protect??”in this case,
MirrorTest.
Pages:
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406