ODBC.ini file Alternatives
Posted: Mon Mar 02, 2015 7:23 pm
Hi All ,
I got some funny requirement to connect to more than 300 SQL Server Databases and run a simple query on each database.
I have created a Job which would connect to all of these , All the DSN/connection entries were added to .odbc.ini file and I am parameterizing the connection name to run the job. Also the userid and password for all the databases is same.
Now the issue is updating the .odbc.ini file in regular intervals , due to the nature of the requirement we might require to add are remove databases connections from .odbc.ini file weekly.
Is there any way to connect to SQL server without making an entry to .odbc.ini file. something like building the DSN at runtime.
I am assuming there might be some system functions which can achieve this .
Any thoughts about this.
Thanks
RPatra
I got some funny requirement to connect to more than 300 SQL Server Databases and run a simple query on each database.
I have created a Job which would connect to all of these , All the DSN/connection entries were added to .odbc.ini file and I am parameterizing the connection name to run the job. Also the userid and password for all the databases is same.
Now the issue is updating the .odbc.ini file in regular intervals , due to the nature of the requirement we might require to add are remove databases connections from .odbc.ini file weekly.
Is there any way to connect to SQL server without making an entry to .odbc.ini file. something like building the DSN at runtime.
I am assuming there might be some system functions which can achieve this .
Any thoughts about this.
Thanks
RPatra