Re: Viewing SQl transacion logs...
From: Brad Pears (donotreply_at_notreal.com)
Date: 11/02/04
- Next message: Greg: "Unspecified error on recordset open"
- Previous message: Narayana Vyas Kondreddi: "Re: BackUp - Device Activation Error"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Nov 2004 16:22:18 -0500
Thanks for that. Basically that is exactly what we are doing in our Access
DB right now. However, as you can imagine, the overhead to maintain an audit
trail of changes gets larger as time carry's on. I was thinking that since
we are converting to SQL server, if they were already keepijng those audit
trails, maybe I wouldn;t have to create triggeres to do this type of thing
anymore...
Thanks for your help...
"Ron Hinds" <__NoSpam__ron@__ramac__.com> wrote in message
news:ODHFcQTvEHA.3896@TK2MSFTNGP09.phx.gbl...
> "Brad Pears" <donotreply@notreal.com> wrote in message
> news:%23g2cKtSvEHA.2804@TK2MSFTNGP14.phx.gbl...
> > Since SQL server keeps track of every modification to a table during a
> > transaction, if I change a field value in a single row of a table, where
> do
> > I look to find the log file that was generated that will tell me what
the
> > old value was and what it is now?
> >
> > Also, is there a way to have SQL keep track of specifc changes
regardless
> of
> > whether or not the change was part of a transaction?
> >
> > Thanks,
> >
> > Brad
>
> The SQL Server Transaction logs keep track of *all* changes to the
database,
> whether or not they were contained in formal transactions (BEGIN TRANS,
> etc.). That is, *if* you have SQL Server's Recovery model set to either
Full
> or Bulk-logged. The transaction logs created are not viewable AFAIK; they
> are for restoring the database after a crash, etc. The scenario is: your
db
> server crashes - you rebuild it, then restore the last full backup, then
> apply the transaction log(s) and Bingo! you're back to where you were
before
> the problem!
>
> Now, as to whether SQL server can track specific changes. The short answer
> is yes. But it will require you to study some advanced concepts in SQL
Books
> Online, like Triggers. Basically a Trigger is code that executes in
> repsponse to a SQL statement. So you can have Insert, Update and Delete
> triggers on any table to create an audit trail. In the code of a trigger,
> you can write the data that is being changed to an audit table along with
> the user's name, date and time, etc.
>
>
- Next message: Greg: "Unspecified error on recordset open"
- Previous message: Narayana Vyas Kondreddi: "Re: BackUp - Device Activation Error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|