[unixODBC-support] Is Unix ODBC Driver Manager using /tmp

Nick Gorham nick.gorham at easysoft.com
Sun Oct 31 22:03:10 GMT 2004

Thomas A. Lowery wrote:

> I've a commercial product called data integrator (was data junction) 
> from Pervasive that
> I'm using to extract data to a text file from a large ms sql server 
> table.
> dj (Linux) -> unixodbc -> freetds(odbc) -> sql server
> During the extract /tmp is running out of space.
> However, when I do the same extract using perl DBD::ODBC it works.
> perl DBI -> DBD::ODBC -> unixodbc -> freetds(odbc) -> sql server
> Using strace, I see something doing:
> stat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
> open("/tmp/tmpfFXUiPW", O_RDWR|O_CREAT|O_EXCL, 0600) = 7
> rmdir("/tmp/tmpfFXUiPW")                = -1 ENOTDIR (Not a directory)
> unlink("/tmp/tmpfFXUiPW")               = 0
> stat64("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) = 0
> open("/tmp/tmpfadF3r0", O_RDWR|O_CREAT|O_EXCL, 0600) = 8
> rmdir("/tmp/tmpfadF3r0")                = -1 ENOTDIR (Not a directory)
> unlink("/tmp/tmpfadF3r0")               = 0
> The vendor is claiming their product doesn't use /tmp.
> Is unixodbc or (I know this isn't the freetds list) freetds odbc 
> driver opena file in /tmp that could be filling up?

Not sure about freetds, but I don't think its the driver manager, The 
only other  possibility is  its  something unixODBC is using like iconv, 
but I don;t think so, I am sure I would have had this reported before.

One posibility I have thought of, the stats part of the driver manager 
does a ftok to get a semaphore handle.

If you turn on odbc tracing, the strace will show the entry and exit 
writes to the trace file, so if the tmp  write is between a entry and a 
exit, you know its the DM or driver.


More information about the unixODBC-support mailing list