Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 626

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="Function: trace_on - Virtuoso Functions Guide" />
  <meta name="dc.subject" content="Function: trace_on - Virtuoso Functions Guide" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="functions.html" title="Chapter Contents" />
  <link rel="prev" href="appendixa.html" title="Appendix" />
  <link rel="next" href="functions.html#.html" title="" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>Function: trace_on - Virtuoso Functions Guide</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="fn_trace_on" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>22. Virtuoso Functions Guide - trace_on</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="functions.html">Chapter Contents</a> | <a class="link" href="fn_trace_off.html" title="trace_off">Prev</a> | <a class="link" href="functions.html#dict" title="Dictionary Manipulation">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div>
      <a class="selected" href="functions.html">Virtuoso Functions Guide</a>
   </div>
    <br />
   <div>
      <a href="functions.html#admin">Administration</a>
   </div>
   <div>
      <a href="functions.html#aggr">Aggregate Functions</a>
   </div>
   <div>
      <a href="functions.html#array">Array Manipulation</a>
   </div>
   <div>
      <a href="functions.html#bpel">BPEL APIs</a>
   </div>
   <div>
      <a href="functions.html#backup">Backup</a>
   </div>
   <div>
      <a href="functions.html#compression">Compression</a>
   </div>
   <div>
      <a href="functions.html#cursors">Cursor</a>
   </div>
   <div>
      <a href="functions.html#time">Date &amp; Time Manipulation</a>
   </div>
   <div>
      <a class="selected" href="functions.html#debug">Debug</a>
   </div>
   <div class="selected">
    <div>
        <a href="fn_cov_load.html">cov_load</a>
    </div>
    <div>
        <a href="fn_cov_report.html">cov_report</a>
    </div>
    <div>
        <a href="fn_cov_store.html">cov_store</a>
    </div>
    <div>
        <a href="fn_dbg_obj_print.html">dbg_obj_print</a>
    </div>
    <div>
        <a href="fn_dbg_printf.html">dbg_printf</a>
    </div>
    <div>
        <a href="fn_explain.html">explain</a>
    </div>
    <div>
        <a href="fn_pldbg_stats.html">pldbg_stats</a>
    </div>
    <div>
        <a href="fn_pldbg_stats_load.html">pldbg_stats_load</a>
    </div>
    <div>
        <a href="fn_trace_off.html">trace_off</a>
    </div>
    <div>
        <a class="selected" href="fn_trace_on.html">trace_on</a>
    </div>
   </div>
   <div>
      <a href="functions.html#dict">Dictionary Manipulation</a>
   </div>
   <div>
      <a href="functions.html#encoding">Encoding &amp; Decoding</a>
   </div>
   <div>
      <a href="functions.html#file">File Manipulation</a>
   </div>
   <div>
      <a href="functions.html#ft">Free Text</a>
   </div>
   <div>
      <a href="functions.html#hash">Hashing / Cryptographic</a>
   </div>
   <div>
      <a href="functions.html#ldap">LDAP</a>
   </div>
   <div>
      <a href="functions.html#localization">Locale</a>
   </div>
   <div>
      <a href="functions.html#mail">Mail</a>
   </div>
   <div>
      <a href="functions.html#misc">Miscellaneous</a>
   </div>
   <div>
      <a href="functions.html#number">Number</a>
   </div>
   <div>
      <a href="functions.html#phrz">Phrases</a>
   </div>
   <div>
      <a href="functions.html#rdf">RDF data</a>
   </div>
   <div>
      <a href="functions.html#rmt">Remote SQL Data Source</a>
   </div>
   <div>
      <a href="functions.html#repl">Replication</a>
   </div>
   <div>
      <a href="functions.html#soap">SOAP</a>
   </div>
   <div>
      <a href="functions.html#sql">SQL</a>
   </div>
   <div>
      <a href="functions.html#string">String</a>
   </div>
   <div>
      <a href="functions.html#txn">Transaction</a>
   </div>
   <div>
      <a href="functions.html#type">Type Mapping</a>
   </div>
   <div>
      <a href="functions.html#uddi">UDDI</a>
   </div>
   <div>
      <a href="functions.html#udt">User Defined Types &amp; The CLR</a>
   </div>
   <div>
      <a href="functions.html#vad">VAD</a>
   </div>
   <div>
      <a href="functions.html#jvmpl">Virtuoso Java PL API</a>
   </div>
   <div>
      <a href="functions.html#bif">Virtuoso Server Extension Interface (VSEI)</a>
   </div>
   <div>
      <a href="functions.html#ws">Web &amp; Internet</a>
   </div>
   <div>
      <a href="functions.html#xml">XML</a>
   </div>
   <div>
      <a href="functions.html#XPATH">XPATH &amp; XQUERY</a>
   </div>
    <br />
   <div>
      <a href="functionidx.html">Functions Index</a>
   </div>
    <br />
  </div>
  <div id="text">
    <h2>trace_on</h2>
    <div class="refpurpose">Enable extra debug logging</div>
    <div class="funcsynopsis">
        <span class="funcdef">integer <span class="function">trace_on</span>
      </span>
        (<span class="paramdef">in <span class="parameter">parameter</span> varchar</span>);
      </div>
  
  
  
  <div class="refsect1">
    <div class="refsect1title">Description</div>
    <p>This function requires dba privileges.</p>
  <p>
  This function enables logging specified server operations for debugging purposes.
  The log entries will be shown at the server console (if started with foreground option) and will be written into the server message log file.
  The traceable events are divided into several groups: user activity, transactions, compilation of the SQL statements, DDL statements, statements execution and VDB actions.
  </p>
  </div>
  <div class="refsect1">
     <div class="refsect1title">Parameters</div>
     <p>The following options are available for logging:</p>
     <ul>
        <li>
          <strong>user_names</strong> - include the full user name,
         otherwise user ID will be logged.</li>
        <li>
          <strong>user_log</strong> - log the connects/disconnects for users.</li>
        <li>
          <strong>failed_log</strong> - log  incorrect logins.</li>
        <li>
          <strong>compile</strong> - log the  names of procedures / triggers
         name compiled.</li>
        <li>
          <strong>ddl_log</strong> - log the DDL statements execution.</li>
        <li>
          <strong>client_sql</strong> - log the compilation of the
         client&#39;s SQL statements (first 500 chars).</li>
        <li>
          <strong>errors</strong> - log all server errors.</li>
        <li>
          <strong>dsn</strong> - log the connection/disconnection
         to DSNs, registration and removal of the DSNs, compilation of the
         SQL statements executed thru the VDB.</li>
        <li>
          <strong>sql_send</strong> - log the compilation of SQL
         statements executed thru the VDB.</li>
        <li>
          <strong>transact</strong> - log the transactions.</li>
        <li>
          <strong>remote_transact</strong> - log the remote transactions.</li>
        <li>
          <strong>exec</strong> - log  SQL statement execution.</li>
        <li>
          <strong>soap</strong> - log  SOAP server requests and responses.</li>
        <li>
          <strong>thread</strong> - log  THRD_1 %ld OS threads freed.
This is when OS threads are freed due to inactivity (being idle for more
than ThreadCleanupInterval time).</li>
        <li>
          <strong>cursor</strong> - log   CURS_[0-9] - various VDB statements actions.</li>
      </ul>
</div>
<div class="refsect1">
      <div class="refsect1title">Return Types</div>
 <p>Upon success zero will be returned, otherwise an error is signalled.</p>
    <p>The message log file and/or server debug screen will list details for activated
    log options.  The formats are as follows:</p>

<div>
        <pre class="screen">
USER_0 (user) (IP) (peer) logout
USER_1 (user) (IP) (peer) login
</pre>
      </div>
<div>
        <pre class="screen">
FAIL_0 (user) (IP) (peer)
</pre>
      </div>
<div>
        <pre class="screen">
COMP_0 (user) (IP) (peer) trigger (name)
COMP_1 (user) (IP) (peer) procedure (name)
</pre>
      </div>
<div>
        <pre class="screen">
DDLC_0 (user) (IP) (peer) Create table (name)
DDLC_1 (user) (IP) (peer) Drop table (name)
DDLC_2 (user) (IP) (peer) Create procedure (name)
DDLC_3 (user) Drop procedure (name)
DDLC_4 (user) Create view (name)
DDLC_5 (user) Create index (name) or (table name)
DDLC_6 (user) Drop index (name) or (table name)
DDLC_7 (user) Rename table (new name) or (old name)
DDLC_8 (user) Create trigger (name) or (table name)
DDLC_9 (user) drop trigger (name) or (table name)
</pre>
      </div>
<div>
        <pre class="screen">
CSLQ_0 (user) (IP) (peer) (sql)
</pre>
      </div>
<div>
        <pre class="screen">
ERRS_0 (code) (server code) (error text)
</pre>
      </div>
<div>
        <pre class="screen">
DSNL_0 (dsn) (sql)
DSNL_1 Disconnecting DSN (name)
DSNL_2 (user) (IP) Registration remote data source (name)
DSNL_3 (user) Disconnect remote data source (name)
</pre>
      </div>
<div>
        <pre class="screen">
DSNS_0 (dsn) (sql) (prepare)
DSNS_1 (dsn) (sql) (execute)
</pre>
      </div>
<div>
        <pre class="screen">
LTRS_0 (user) (from) (peer) Begin transact tnx
LTRS_1 (user) (from) (peer) (Commit / Rollback) transact txn
LTRS_2 (user) (from) (peer) Restart transact txn
</pre>
      </div>
<div>
        <pre class="screen">
RTRS_0 (user) (from) (peer) (dsn) Begin transact tnx autocommit: (on/off)
RTRS_1 (user) (from) (peer) (dsn) (Commit / Rollback) transact tnx autocommit: (on/off)
</pre>
      </div>
<div>
        <pre class="screen">
EXEC_0 (user) (from) (peer) Exec cursor (stmt)
EXEC_1 (user) (from) (peer) (stmt) Exec (n) time(s)
</pre>
      </div>
<div>
        <pre class="screen">
SOAP_0 (request)
SOAP_1 (response)
</pre>
      </div>

</div>
<div class="refsect1title">Errors</div>
    <table class="data">
      
        
          <tr>
            <th class="data">SQLState</th>
        <th class="data">Error Code</th>
        <th class="data">Error Text</th>
          </tr>
        
        
          <tr>
            <td class="data">
          <a name="err22005" />
          <span class="errorcode">22005</span>
        </td>
            <td class="data">
          <a name="errSR322" />
          <span class="errorcode">SR322</span>
        </td>
            <td class="data">
          <span class="errorname">&quot;option&quot; is not valid trace_on option</span>
        </td>
          </tr>
        
      
    </table>
    <br />
  <p />
  <p />
   <div class="refsect1">
     <div class="refsect1title">Examples</div>
     <a name="ex_trace_on" />
      <div class="example">
        <div class="exampletitle">Simple example</div>
       <p>To show users logging in to the server and failed user logins</p>
	<div>
          <pre class="screen">
SQL&gt; trace_on (&#39;user_log&#39;, &#39;failed_log&#39;);

Done. -- 0 msec.
SQL&gt;

The server console  and log file may thus contain lines such as:
...
17:17:24 Server online at 1111 (pid 2173)
17:17:36 USER_0 0 xxx.xx.xx.xxx 1111:2 logout
17:17:40 USER_1 0 xxx.xx.xx.xxx 1111:3 login
17:17:45 USER_0 0 xxx.xx.xx.xxx 1111:3 logout
17:18:04 FAIL_0 dba xxx.xx.xx.xxx
...
	</pre>
        </div>
    </div>
  </div>
  <div class="refsect1">
      <div class="refsect1title">See Also</div>
    <p>
        <a href="fn_trace_off.html">trace_off()</a>
      </p>
    <p>
        <a href="fn_trace_status.html">trace_status()</a>
      </p>
  </div>
</div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>