Skip to Content.
Sympa Menu

freetds - [freetds] How to specify uid and pwd in odbc.ini?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Marten Lehmann <lehmann AT cnm.de>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] How to specify uid and pwd in odbc.ini?
  • Date: Tue, 07 Jul 2009 19:35:46 +0200

Hello,

a lot of drivers allow to specify the user id and password to connect to a database in the odbc.ini. The benefit is, that you can have a local odbc.ini containing all required values to access a database so you don't have to update changes of connection parameters at more than one place resp. not in the source code of an application.

But I haven't found a way to provide uid and pwd for freetds within the odbc.ini. No matter if I call the parameters uid, userid or user and pwd or password, freetds simply ignores them and requires them to be specified in the connection string.

Is there any way to improve this and move it all into one place in the odbc.ini?

If not, then why not? Storing uid/pwd in a local .odbc.ini or any other place specified by defining $ODBCINI is not more or less secure than specifying it in a separate config file that is parsed by the application or hardcoded in the application.

Kind regards
Marten




Archive powered by MHonArc 2.6.24.

Top of Page