Mirroring two databases on same instance

  • Is it possible to set up mirroring on two separate databases on the same sql server instance?

    Example:

    Server1 (principle)

    -db1

    -db2

    Server2 (mirror)

    -db1

    -db2

    If so do I need to change the listener port and change the endpoint name (different from db1)

    In my situation I have successfully setup mirroring on db1, however when I try to set up mirroring on db2 I get an error saying " The mirror database, "mydb" has insufficient transaction log data to preserve the log backup chain of the principal database. This may happen if a log backup from the principal database has not been taken or has not been restored on the mirror database"

    I am thinking that this is a generic message.

    I even took a Full backup from the principle and restored it using no recovery on the mirror server.

  • If you want to have mirroring on the same server then you will need to do this with two instances, you can't mirror onto the same instance.

    And then it does not make too much sense to put them on the same server as the point of mirroring is to allow the database to keep runnning if the server fails.

  • Yes, you can set up two databases to be mirrored from the same server. I just set this up on my test box, between two instances of SQL Server.

    I got the same error you did when I first tried it. To get it to work, I first got one mirror fully set up and working, then I ran a new backup of the second database, restored that (with norecovery) on the second instance, and started the mirror from that.

    The port numbers for both ended up being the same for both mirror-sets, and that worked.

    Both databases are successfully mirrored at this point.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Thanks all.

    I found my problem... My 2nd database was from a backup taken off of a sql 2000 server. I had to take another backup of it after it was restored to my new 2005 server and also take a t-log backup, Then I restored the db again and restored the t-logs and it worked.

    I got the hint from here:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=62010&SiteID=1

    Again Thank you!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply