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

Kulik, Scott SKulik at severstalna.com
Tue Jul 7 14:15:01 EDT 2009


This is what I use:

[PSQL]
Description = CAPS
Driver= PostgreSQL
Trace = No
TraceFil = /tmp/odbc.log
Database = Anneal
Servername = 192.168.1.100
Username = user
Password = pass
Port = 5432
ReadOnly = No

Scott K

-----Original Message-----
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of Marten Lehmann
Sent: Tuesday, July 07, 2009 1:36 PM
To: freetds at lists.ibiblio.org
Subject: [freetds] How to specify uid and pwd in odbc.ini?

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
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds


More information about the FreeTDS mailing list