osql script
David Venus <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CAPhOLBPv6ruEZFBV5w17SiOzrNT-tpjNLrJeXqp7AMdwVF961w@mail.gmail.com> |
Hi!
After doing some testing with the osql script yesterday I found the
following:
- For AIX (at least at 6.1 and 7.1) the host command needs to have a
"-n" switch to get the "new"
format that the osql expects.
Without the "-n" you get -> <fully qualified host name> is <ip address>.
With the "-n" switch you get the expected -> <fully qualified host name>
has address <ip address>.
- The ODBCINI environment variable and the <--prefix value>/etc (path to
the binary with "bin" or
"lib" replaced by "etc") paths need to be checked for the odbc.ini file.
I added code to echo them
to the ${INI_DIRNAME} >&3 file. This is what caused me the most grief.
- The sed pattern "[^.0-9]" that is checking for host names that are ip
addresses may not work right
on host names that have numbers in them or are fully qualified (<host
name>.<domain>). In my case
a host name like "b0aaasql3" got turned into "0aaasql3" which broke the
if statement. Maybe this is
just an AIX sed issue.
Thanks!
Dave Venus