คำตอบ What will happen when set partner to a database ?

  • 30 กรกฎาคม 2555 6:24
     
     

    As you know, One database can mirror with one and only one another database.  There is an interesting thing when I setup a mirror ha between server a and server b, I make a third database at server c using the backups from server a including transaction log backups. The database is in restoring state. And I can set up the partner of server c to server a. 

    My question is what will happen when I set the partner of c to a.


    • แก้ไขโดย mq44944 30 กรกฎาคม 2555 6:28 correct a mistake
    •  

ตอบทั้งหมด

  • 30 กรกฎาคม 2555 7:50
     
     

    did u use server c to monitor the mirroring,

    if you are impelmenting backup ,copy ,resore between server a and server c, then not possibe,

    as there is a port level communications between server a and server b , it is not possible to impleten it


    Ramesh Babu Vavilla MCTS,MSBI

  • 30 กรกฎาคม 2555 9:09
     
      มีโค้ด

    No,  I just init server c using the backups of server a.

    1. backup server a

    USE MASTER
    GO
    BACKUP DATABASE [lgwdb1] TO DISK = 'd:\backup\lgwdb1.BAK' WITH INIT
    GO
    BACKUP LOG [lgwdb1] TO DISK = 'd:\backup\lgwdb1.TRN' WITH INIT
    GO
    

    copy the backup to server c [10.250.14.9]

    2. restore the backup at server c

    USE MASTER
    GO
    RESTORE DATABASE [lgwdb1] FROM DISK = 'D:\backup\lgwdb1.BAK' WITH NORECOVERY,
    REPLACE,
    MOVE 'data1' TO 'D:\ms3003\data\lgwdb1\lgwdb1.MDF',
    MOVE 'log' TO 'D:\ms3003\log\lgwdb1\lgwdb1_LOG.LDF'
    GO
    RESTORE LOG [lgwdb1]FROM DISK = 'D:\backup\lgwdb1.trn' WITH NORECOVERY, REPLACE
    GO


    the state of database lgwdb1 at server c is "Restoring"

    then I set the partner of server c to server a:

    ALTER DATABASE [lgwdb1] SET PARTNER = 'TCP://10.250.14.7:23008'
    GO

    the state of database lgwdb2 at server c changes to "In Recovery"

    what has happened?


    • แก้ไขโดย mq44944 30 กรกฎาคม 2555 9:10
    •  
  • 30 กรกฎาคม 2555 12:31
     
     
    no u cannot add a new port after mirroring is established, it gives a error that port you are using i already used in mirroring.

    Ramesh Babu Vavilla MCTS,MSBI

  • 31 กรกฎาคม 2555 17:26
     
     คำตอบ

    I am not sure that I get the point, but let me try a hunch:

    When you run the SET PARTNER command your supposed mirror (server C) tries to establish a connection to server A. After that connect it waits for Server A to confirm the mirroring connection to switch into mirror mode. As Server A is still mirroring with Server B it will not acknowledge this, so Server C stays in this intermittent state...

    Lucifer

    • ทำเครื่องหมายเป็นคำตอบโดย mq44944 1 สิงหาคม 2555 1:38
    •  
  • 1 สิงหาคม 2555 1:38
     
     

    I am not sure that I get the point, but let me try a hunch:

    When you run the SET PARTNER command your supposed mirror (server C) tries to establish a connection to server A. After that connect it waits for Server A to confirm the mirroring connection to switch into mirror mode. As Server A is still mirroring with Server B it will not acknowledge this, so Server C stays in this intermittent state...

    Lucifer

    Yes you are right. I found nothing happened.