Re: How to specify uid and pwd in odbc.ini?
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 19 Nov 2013 15:45:53 +0000 ???????? ?????? ?????????? <[email protected]> wrote: > I really do not understand is it safer to write when creating each > table username and password than store in in one place in odbc.ini on > server??? > > CREATE TABLE ttlog ENGINE=CONNECT table_type=ODBC tabname='ttlog' > CONNECTION='DSN=SQL_DW;UID=lnmp;PWD=lnmp' > > And will be really nightmare if lnmp password changed. :( (It is helpful to readers of the archive if you don't top-quote.) We don't read passwords from odbc.ini for security reasons. We recommend that people who want passwordless connections use Kerberos or similar. FreeTDS supports it for all servers and clients, as far as I'm aware. If you don't need security, you could set up an account with no password (or a known one, and hard-code it). If you want a little security, the kind that will discourage your grandmother, keep your passwords in a file or environment variable. I used to keep mine in ~/.netrc, and use awk to parse out the bits. HTH. --jkl