I'll update my own question.
For reference. I was trying to set up a mirror database on my MS SQL-server. Like most things in this business the sql-server documentation didn't mention a few things, like setting up a ODBC DSN and what needs to be done to the application so it will connect to the mirrored database.
Here is what I found, 1 when creating the ODBC DSN using Window's "Data Source ODBC" wizzard when you get to the select driver window find the "SQL native client" driver and double click on it. Start filling out the windows and you come to a window where you can enter your mirrored database name and the server name where the mirror resides. Finish the DSN creation.
2. When the principal database or server fails your app (any language) will need to catch the server disconnect error and then re issue a connect.
Here is a sample of my REXX test code.
WHEN POS('08S01',condmsg) > 0 THEN DO
option = 'DROP'
odbcfreedatabase(option)
mydatabase = ''
mystatement = ''
odbcallocdatabase("MyDatabase", "ConnectString", "MyStatement", guiwindow)
guisay('The 'currentserver' server/database has failed and switched to the mirror server',
'Please try your query again')
END cliff:-) |