JezK
Edit File: appendmode.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appending Dump Files</title><link rel="stylesheet" type="text/css" href="userguide.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="home" href="index.html" title="FreeTDS User Guide" /><link rel="up" href="configs.html" title="Chapter 5. Advanced Configurations" /><link rel="prev" href="uothread.html" title="Threading in unixODBC" /><link rel="next" href="tdspool.html" title="TDS Connection Pooling" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appending Dump Files</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="uothread.html">Prev</a> </td><th width="60%" align="center">Chapter 5. Advanced Configurations</th><td width="20%" align="right"> <a accesskey="n" href="tdspool.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="appendmode"></a>Appending Dump Files</h2></div></div></div><p>When running <span class="productname">FreeTDS</span> with applications such as <span class="productname">Apache</span>/PHP it is often difficult to get a usable log file. Since each of the many httpd children opens the file at the beginning of its connection and closes it on connection close, they tend to stomp all over each other. In append mode, the log file is opened for append each time it is written to and then immediately closed. If you are experiencing problems when running under <span class="productname">Apache</span> (or similar application) use append mode to generate useful logs.</p><div class="example"><a id="e.g.DumpAppend"></a><p class="title"><strong>Example 5.7. Turning on Dump File Append mode in <code class="filename">freetds.conf</code></strong></p><div class="example-contents"><pre class="programlisting"> [mssql] host = ntbox.mydomain.com port = 1433 dump file = /tmp/freetds.log dump file append = yes </pre></div></div><br class="example-break" /><p>In this example, the <code class="filename">/tmp/freetds.log</code> file will contain log entries for all processes using the Microsoft <span class="productname">SQL Server</span> server, identified by pid.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="../images/important.gif" /></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>Because there will be one log file being opened and closed more or less continuously, there is going to be a negative impact on performance. Also, be advised that the log file will grow quite large. </p></td></tr></table></div><p>As an alternative to <span class="productname">FreeTDS</span> logging, you might also consider using <span class="command"><strong>tcpdump</strong></span> or <a class="ulink" href="http://www.wireshark.org/" target="_top">wireshark</a> to log network packets. While not as useful as a <acronym class="acronym">TDS</acronym> log, it can also help to identify problems.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="uothread.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="configs.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="tdspool.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Threading in unixODBC </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> TDS Connection Pooling</td></tr></table></div></body></html>