~ubuntu-branches/debian/lenny/freetds/lenny

« back to all changes in this revision

Viewing changes to doc/doc/freetds-0.63/userguide/logging.htm

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2008-08-02 11:49:53 UTC
  • mfrom: (2.1.10 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802114953-0qdeowgl63k42n2c
Tags: 0.82-4
* Fix a typo in the freetds-common description, ugh
* Versioned replaces of libct4 by freetds-common, since the current one
  obviously doesn't have overlapping files.
* tdsodbc: check for /var/lib/odbc existence before removing it in the
  postinst, since there are cases where it won't exist on upgrade (i.e.,
  if the driver was never enabled in the first place).  Closes: #493303.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<HTML
2
 
><HEAD
3
 
><TITLE
4
 
>Logging</TITLE
5
 
><META
6
 
NAME="GENERATOR"
7
 
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
8
 
REL="HOME"
9
 
TITLE="FreeTDS User Guide"
10
 
HREF="index.htm"><LINK
11
 
REL="UP"
12
 
TITLE="Troubleshooting"
13
 
HREF="troubleshooting.htm"><LINK
14
 
REL="PREVIOUS"
15
 
TITLE="Is the server there?"
16
 
HREF="serverthere.htm"><LINK
17
 
REL="NEXT"
18
 
TITLE='"Page contains no data"'
19
 
HREF="pagenodata.htm"></HEAD
20
 
><BODY
21
 
CLASS="SECT1"
22
 
BGCOLOR="#FFFFFF"
23
 
TEXT="#000000"
24
 
LINK="#0000FF"
25
 
VLINK="#840084"
26
 
ALINK="#0000FF"
27
 
><DIV
28
 
CLASS="NAVHEADER"
29
 
><TABLE
30
 
WIDTH="100%"
31
 
BORDER="0"
32
 
CELLPADDING="0"
33
 
CELLSPACING="0"
34
 
><TR
35
 
><TH
36
 
COLSPAN="3"
37
 
ALIGN="center"
38
 
><SPAN
39
 
CLASS="PRODUCTNAME"
40
 
>FreeTDS</SPAN
41
 
> User Guide: A Guide to Installing, Configuring, and Running <SPAN
42
 
CLASS="PRODUCTNAME"
43
 
>FreeTDS</SPAN
44
 
></TH
45
 
></TR
46
 
><TR
47
 
><TD
48
 
WIDTH="10%"
49
 
ALIGN="left"
50
 
VALIGN="bottom"
51
 
><A
52
 
HREF="serverthere.htm"
53
 
>Prev</A
54
 
></TD
55
 
><TD
56
 
WIDTH="80%"
57
 
ALIGN="center"
58
 
VALIGN="bottom"
59
 
>Chapter 7. Troubleshooting</TD
60
 
><TD
61
 
WIDTH="10%"
62
 
ALIGN="right"
63
 
VALIGN="bottom"
64
 
><A
65
 
HREF="pagenodata.htm"
66
 
>Next</A
67
 
></TD
68
 
></TR
69
 
></TABLE
70
 
><HR
71
 
ALIGN="LEFT"
72
 
WIDTH="100%"></DIV
73
 
><DIV
74
 
CLASS="SECT1"
75
 
><H1
76
 
CLASS="SECT1"
77
 
><A
78
 
NAME="LOGGING"
79
 
>Logging</A
80
 
></H1
81
 
><P
82
 
><SPAN
83
 
CLASS="PRODUCTNAME"
84
 
>FreeTDS</SPAN
85
 
> has quite extensive logging capabilities.  These are often invaluable in setting up new configurations, when it's hard to be sure precisely what configuration information is being used, and what communication is (not) working.   Often such questions can be quickly resolved by turning on logging and examining the logs.  
86
 
                        </P
87
 
><DIV
88
 
CLASS="SECT2"
89
 
><H2
90
 
CLASS="SECT2"
91
 
><A
92
 
NAME="ENVIRONMENT"
93
 
>Environment Variables that Control Logging</A
94
 
></H2
95
 
><P
96
 
></P
97
 
><DIV
98
 
CLASS="VARIABLELIST"
99
 
><DL
100
 
><DT
101
 
><TT
102
 
CLASS="ENVAR"
103
 
>TDSDUMP</TT
104
 
></DT
105
 
><DD
106
 
><P
107
 
>Log files can be turned on using the <TT
108
 
CLASS="ENVAR"
109
 
>TDSDUMP</TT
110
 
> environment variable.  For instance, setting the location of a dumpfile
111
 
<PRE
112
 
CLASS="SCREEN"
113
 
><TT
114
 
CLASS="PROMPT"
115
 
>$ </TT
116
 
><TT
117
 
CLASS="USERINPUT"
118
 
><B
119
 
>export TDSDUMP=/tmp/freetds.log</B
120
 
></TT
121
 
></PRE
122
 
>
123
 
Will generate a log file named <TT
124
 
CLASS="FILENAME"
125
 
>freetds.log</TT
126
 
> in the <TT
127
 
CLASS="FILENAME"
128
 
>/tmp</TT
129
 
> directory.
130
 
                        </P
131
 
></DD
132
 
><DT
133
 
><TT
134
 
CLASS="ENVAR"
135
 
>TDSDUMPCONFIG</TT
136
 
></DT
137
 
><DD
138
 
><P
139
 
>Set <TT
140
 
CLASS="ENVAR"
141
 
>TDSDUMPCONFIG</TT
142
 
> to a file to
143
 
write information to on how the configuration information is being
144
 
obtained, e.g. from environment variables, a <TT
145
 
CLASS="FILENAME"
146
 
>freetds.conf</TT
147
 
> file, or <TT
148
 
CLASS="FILENAME"
149
 
>interfaces</TT
150
 
> file.  Sometimes it's unclear what source of information <SPAN
151
 
CLASS="PRODUCTNAME"
152
 
>FreeTDS</SPAN
153
 
> is using to connect to a given dataserver.  This variable can make that bright and clear.  </P
154
 
><P
155
 
>If set to the null string, the log file name will default to <TT
156
 
CLASS="FILENAME"
157
 
>/tmp/tdsconfig.log.<TT
158
 
CLASS="REPLACEABLE"
159
 
><I
160
 
>9999</I
161
 
></TT
162
 
></TT
163
 
>, where <TT
164
 
CLASS="REPLACEABLE"
165
 
><I
166
 
>9999</I
167
 
></TT
168
 
> is the pid of the process generating the log. </P
169
 
></DD
170
 
></DL
171
 
></DIV
172
 
><DIV
173
 
CLASS="TIP"
174
 
><P
175
 
></P
176
 
><TABLE
177
 
CLASS="TIP"
178
 
WIDTH="100%"
179
 
BORDER="0"
180
 
><TR
181
 
><TD
182
 
WIDTH="25"
183
 
ALIGN="CENTER"
184
 
VALIGN="TOP"
185
 
><IMG
186
 
SRC="../images/tip.gif"
187
 
HSPACE="5"
188
 
ALT="Tip"></TD
189
 
><TD
190
 
ALIGN="LEFT"
191
 
VALIGN="TOP"
192
 
><P
193
 
>What if you were running <SPAN
194
 
CLASS="PRODUCTNAME"
195
 
>Apache</SPAN
196
 
>/PHP?  <SPAN
197
 
CLASS="PRODUCTNAME"
198
 
>Apache</SPAN
199
 
> has many children.
200
 
Setting the <TT
201
 
CLASS="ENVAR"
202
 
>TDSDUMP</TT
203
 
> variable to a null string will cause <SPAN
204
 
CLASS="PRODUCTNAME"
205
 
>FreeTDS</SPAN
206
 
> to open a log under every PID.
207
 
<PRE
208
 
CLASS="SCREEN"
209
 
><TT
210
 
CLASS="PROMPT"
211
 
>$ </TT
212
 
><TT
213
 
CLASS="USERINPUT"
214
 
><B
215
 
>export TDSDUMP=""</B
216
 
></TT
217
 
></PRE
218
 
>
219
 
The log files will be named <TT
220
 
CLASS="FILENAME"
221
 
>/tmp/freetds.log.<TT
222
 
CLASS="REPLACEABLE"
223
 
><I
224
 
>9999</I
225
 
></TT
226
 
></TT
227
 
>, where <TT
228
 
CLASS="REPLACEABLE"
229
 
><I
230
 
>9999</I
231
 
></TT
232
 
> is the pid number of the process generating the log.
233
 
                        </P
234
 
></TD
235
 
></TR
236
 
></TABLE
237
 
></DIV
238
 
><P
239
 
>A couple of important notes about using the logs with <SPAN
240
 
CLASS="PRODUCTNAME"
241
 
>FreeTDS</SPAN
242
 
>.  First,
243
 
the logs tend to grow large, so trim or archive them often.  Secondly,
244
 
<SPAN
245
 
CLASS="PRODUCTNAME"
246
 
>FreeTDS</SPAN
247
 
> will record certain network packets to the log, this
248
 
<I
249
 
CLASS="EMPHASIS"
250
 
>includes login packets which can contain clear text or clear text
251
 
equivalent passwords.</I
252
 
> So, if this is a concern (most likely
253
 
is) make sure that the files are not world readable, and avoid posting
254
 
them to mailing lists.
255
 
                        </P
256
 
><P
257
 
>Once in a while, someone writes to the mailing list, asking why <SPAN
258
 
CLASS="PRODUCTNAME"
259
 
>FreeTDS</SPAN
260
 
> is so <I
261
 
CLASS="EMPHASIS"
262
 
>slow</I
263
 
>.  It sometimes turns out that logging was left turned on.  Don't you be the next victim!  <SPAN
264
 
CLASS="PRODUCTNAME"
265
 
>FreeTDS</SPAN
266
 
> logs are meant for development and debugging, not as a system monitoring tool.  
267
 
                        </P
268
 
></DIV
269
 
></DIV
270
 
><DIV
271
 
CLASS="NAVFOOTER"
272
 
><HR
273
 
ALIGN="LEFT"
274
 
WIDTH="100%"><TABLE
275
 
WIDTH="100%"
276
 
BORDER="0"
277
 
CELLPADDING="0"
278
 
CELLSPACING="0"
279
 
><TR
280
 
><TD
281
 
WIDTH="33%"
282
 
ALIGN="left"
283
 
VALIGN="top"
284
 
><A
285
 
HREF="serverthere.htm"
286
 
>Prev</A
287
 
></TD
288
 
><TD
289
 
WIDTH="34%"
290
 
ALIGN="center"
291
 
VALIGN="top"
292
 
><A
293
 
HREF="index.htm"
294
 
>Home</A
295
 
></TD
296
 
><TD
297
 
WIDTH="33%"
298
 
ALIGN="right"
299
 
VALIGN="top"
300
 
><A
301
 
HREF="pagenodata.htm"
302
 
>Next</A
303
 
></TD
304
 
></TR
305
 
><TR
306
 
><TD
307
 
WIDTH="33%"
308
 
ALIGN="left"
309
 
VALIGN="top"
310
 
>Is the server there?</TD
311
 
><TD
312
 
WIDTH="34%"
313
 
ALIGN="center"
314
 
VALIGN="top"
315
 
><A
316
 
HREF="troubleshooting.htm"
317
 
>Up</A
318
 
></TD
319
 
><TD
320
 
WIDTH="33%"
321
 
ALIGN="right"
322
 
VALIGN="top"
323
 
>"Page contains no data"</TD
324
 
></TR
325
 
></TABLE
326
 
></DIV
327
 
></BODY
328
 
></HTML
329
 
>
 
 
b'\\ No newline at end of file'