Search code examples
sql-serverdatabasesql-server-2005mirroringbackup-strategies

Database mirroring/Replication, SQL Server 2005


I have two database servers running SQL Server 2005 Enterprise that I want to make one of them as mirror database server.

What I need is; to create an exact copy database from primary server on mirror server, so when the primary server was down, we could switch database IP on application to use mirror server.

I have examined "mirror" feature on SQL Server 2005, and based on this article:
http://aspalliance.com/1388_Database_Mirroring_in_Microsoft_SQL_Server_2005.all

The mirror database cannot be accessed directly; however snapshots of the mirror database can be taken for read only purposes. (Prerequisites no. 4)

So how it can be useful when I can't access it when primary server was down?

I've been thinking about creating a regular backup on primary server and restore it on mirror server on hourly basis, but that's quite inefficient (slow) especially if I want an exact copy (since hundreds data's are added once in minute).

Any other suggestion?

EDIT:
Maybe what I mean was a replication thing, not a mirror (thanks JP for commenting)


Solution

  • If I understand your question correctly, you shouldn't have to do that. There are several role switching forms you can use to have your mirror take over as primary. You don't change the IP address at the application level, the cluster itself has a virtual IP address that allows access to the data at any given time (given a reasonable amount of time for the switch over to the mirror from a primary failure). The mirror stays in synch by itself. :) There are good articles here and here on clustering.

    Edit: Okay, based on the comments, check out the various options for replication.