locked
Database Mirroring in Workgroup environment RRS feed

  • Question

  • Good morning,

    I'm playing with database mirroring in (virtual) workgroup environment. I'm using SQL 2008 R2 Enterprise on the both servers.

    After I spent good amount of time trying to make it up and running, I've found the example in Laurentiu Cristofor blog. If I run his script "as is", with brand new or mine databases, it works just fine. Although when I ran mine version of the script, it fails when I'm trying to SET PARTNER from the primary server (Server1) with famous 1418 error.

    At this point I don't see any differences besides the names and certificates subjects.

    Can you please take a look and point me what's wrong in the bad version? The file with the scripts is available here

    Thank you for your help!


    Thank you!

    My blog: http://aboutsqlserver.com

    Sunday, October 3, 2010 12:59 PM

Answers

  • Dmitri,

    The error message 1418 indicated a network error, so I checked the network addresses set in your good and bad files and I found something different.  If you look at your bad "01.server1 certificate setup.sql" and file, at the bottom, you can find the following statement:

    ALTER DATABASE dbs
        SET PARTNER = 'TCP://192.68.10.2:5022';
    GO

    While your good one is:

    ALTER DATABASE dbs SET PARTNER = 'tcp://192.168.10.2:5022'
    go

    If you ran both the good and bad files on your same environment, I think that it should be "168" instead of "68" in  the partner address in your "bad" file. Same issue happened on your other "bad" file "02.Server 2 Certificate setup.sql". Please check it.

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, October 4, 2010 5:49 AM

All replies

  • You also need to backup the tail of the transaction log on the principal and restore the tail on the mirror (in norecovery). Then attempt to set the partner from the mirror, then from the principal.
    Monday, October 4, 2010 4:04 AM
  • Dmitri,

    The error message 1418 indicated a network error, so I checked the network addresses set in your good and bad files and I found something different.  If you look at your bad "01.server1 certificate setup.sql" and file, at the bottom, you can find the following statement:

    ALTER DATABASE dbs
        SET PARTNER = 'TCP://192.68.10.2:5022';
    GO

    While your good one is:

    ALTER DATABASE dbs SET PARTNER = 'tcp://192.168.10.2:5022'
    go

    If you ran both the good and bad files on your same environment, I think that it should be "168" instead of "68" in  the partner address in your "bad" file. Same issue happened on your other "bad" file "02.Server 2 Certificate setup.sql". Please check it.

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, October 4, 2010 5:49 AM
  • Thank you very much, Charles! I feel bad about myself.

    Don't believe how much time and efforts could be wasted because of the simple typos.


    Thank you!

    My blog: http://aboutsqlserver.com

    Monday, October 4, 2010 1:44 PM