Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / odbc failover

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. odbc failover
#13474
Posted by: ironcore 2011-04-23 07:26:49
how/can you code a failover server using the reginald odbc functions?

thanks,
cliff:-)
Message2. obcd failover - found
#13481
Posted by: ironcore 2011-05-03 01:13:40 Last edited by: Jeff Glatt 2012-01-25 05:15:25 (Total edited 2 times)
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:-)
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2017-9-22  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0