Database mirroring question
use database mirroring in sql server 2008 r2.
have 1 primary server , 1 mirror server.
our application connect primary instance ip address.
if our primary server down , failover mirror server, our application not able connect.
our plan put ip address of old primary server mirror (new primary).
but, changing ip address confuse database mirroring setting ?
can if think endpoint config ?
regards,
you need use failover partner=partnerservername parameter in connection string.
http://msdn.microsoft.com/en-us/library/5h52hef8(v=vs.80).aspx
the client application connects principal database, , server sends name of partner server, cached on client.
-
if server containing principal database fails or connectivity interrupted, connection , transaction state lost. client application attempts re-establish connection principal database , fails.
-
the client application transparently attempts establish connection mirror database on partner server. if succeeds, connection redirected mirror database, becomes new principal database.
-
database mirroring successful failover subject following restrictions:
-
transparent redirection works connections explicitly specify initial catalog or database name in connectionstring. if client receives failover information on connection doesn't have explicitly specified initial catalog or database, failover information not cached , application not attempt fail on in if principal server fails.
-
if connectionstring has value failover partner no value initial catalog or database, sqlclient throws invalidargumentexception when string used set sqlconnection object's connectionstring property or passed sqlconnection constructor.
-
mirroring support on server configured on per-database basis. if data manipulation operations executed against other databases not included in principal/mirror set, either using multipart names or changing current database, changes these other databases not propagate in event of failure. no error generated when data modified in database not mirrored. developer must evaluate possible impact of such operations.
-
SQL Server > Database Mirroring
Comments
Post a Comment