.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>shsql: transaction logs and error logs</title>
<body bgcolor=99cc99 vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td align=right><a href="shsql_home.html">
<img src="img/shsql.gif" border=0><br><small>SQL database system</a> &nbsp; </td></tr>
<td>
.>>

.TH transaction logs and error logs TDH "18-MAR-2004   TDH scg@jax.org" 

.SH Transaction logs 
A log containing entries for each database transaction is maintained.
The name of this file is \fClogs/dbtranslog\fR.
The format of the transaction log is:
.LP
\fCfilename  op  user  yy/mm/dd  hh:mm:ss  field1 .. fieldn\fR
.IP
\fBfilename\fR is the data file that was updated.
.IP
\fBop\fR describes what was done and may be one of:
.RS
.IP
add = new record appended to file
.br
update_old = single record update.. previous contents
.br
update_new = single record update.. new contents
.br
delete = single record deletion.. tracked in subsequent pair of replace records
.RE
.IP
\fBuser\fR is the identity of the user, which can be set using
.ig >>
<a href="identity.html">
.>>
\0IDENTITY.
.ig >>
</a>
.>>
If no identity has been set, this field will be an equals-sign.
.IP
\fBdate\fR and \fBtime\fR indicate when the transaction occurred
.IP
Finally, all data fields on the affected record are present.
.LP
No concurrency control is maintained on the transaction log file; simultaneous
updates may result in scrambled or interleaved transaction log entries.
If this is a concern, transaction logs can be maintained one per user by setting
\fCdbtranslog_byuser\fR in the
.ig >>
<a href="config.html#dbtranslog_byuser">
.>>
\0project config file
.ig >>
</a>
.>>
The \fCdbtranslog\fR name will be used, with the user identity appended,
separated by a dot (.).

 
.ig >>
<br><br><br>
.>>

.SH Error logs
When an error occurs it is captured and written to an error log.
The name of this file is \fClogs/dberrorlog\fR.
The format of the error log is:
.LP
\fCdate  time  errornum  user  message\fR
.IP
\fBdate\fR and \fBtime\fR indicate when the error occurred;
.IP
\fBerrornum\fR is the error code;
.IP
\fBuser\fR is the identity of the user, which can be set using
.ig >>
<a href="identity.html">
.>>
\0IDENTITY.
.ig >>
</a>
.>>
If no identity has been set, this field will be an equals-sign.
.IP
\fBmessage\fR describes the error.

.ig >>
<br><br><br>
.>>

.SH Notes
There is no concurrency control on the transaction log or error log, however
as noted above the transaction log can be split up by user.
.LP
Since there is no server, there's no process that persistently has an open file
descriptor on the log files.  

.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="shsql_home.html">
<img src="img/shsql.gif" border=0></a><br>
<a href="Copyright.html">Copyright Steve Grubb</a> &nbsp;
</td></tr>
</table>
.>>
