redundancy or load balancing with odbc

795 Views Asked by At

Is it possible to configure ODBC (windows and Linux) in such a way that I can have 2 odbc connections, each one to a different server (mssql_db1 and mssql_db2) grouped under 1 single DSN so that I can use that single DSN in an application?

then that would allow me to have redundancy (managed by the ODBC layer) and/or load balancing.

I have looked but I havent found something specific to this scenario txs a lot

2

There are 2 best solutions below

2
On

ODBC does not define anything like that although individual ODBC drivers and databases do i.e., there is no generic ODBC way of doing this defined in ODBC.

0
On

The ODBC layer is between application and database driver, and the role of it is hide the variety of database diver. So the application can use the unified APIs to access database. The functions you mentioned is not the work ODBC should do.

I think there are 2 methods:
(1) Investigate the database you use to check whether the database supports this feature;
(2) If the database can't support this feature, implement the feature in your application by yourself.