Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Viewing/Accessing Transaction Log in 2000

Author  Topic 

tjmojo
Starting Member

8 Posts

Posted - 2003-05-19 : 14:36:54
SQL Server 7.0 had a syslog table. For 2000 there are products out there to view the transaction log, such as Lumigent's log explorer. I was wondering whether there is some API, or some T-SQL statements or a description of the binary format of the log files so that I can get to the data contained in the transaction log 'on my own' ... I do not want to spend the license fees on a commercial product if all I need is access to the records of the transaction log so I can do my own 'processing' - any suggestions or experience? Help is much appreciated.

Shastryv
Posting Yak Master

145 Posts

Posted - 2003-05-19 : 15:38:35

You can use

DBCC LOG (DBID/DBNAME, Type = 1/2/3/4)

This gives you only limited info


Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-05-19 : 16:27:15
As shatryv mentioned, you can use DBCC LOG but it isn't going to give what you want. You will need to purchase a 3rd party product to get the transactions out of the transaction log. If you don't want to spend the money, then you can implement an auditing solution but that's going to add a lot of overhead which is going to cause performance problems.

Tara
Go to Top of Page

tjmojo
Starting Member

8 Posts

Posted - 2003-05-19 : 17:00:16
DBCC LOG looks good already.

SELECT * FROM :: fn_dblog(startLSN, endLSN) looks a little better (if I could find the max LSN without scanning the whole log). Fortunately, DBCC LOG has a bunch of additional options that allow more controlled retrieval of log information.

Thanks for the lead, Shastryv. I am going to investigate from here, but what I got so far looks very promising. Now I just have to de-cryptify all the flags, contexts, LOP_* commands and so on.

Tara, thanks for your post, too. The two options you mentioned were exactly what I tried to avoid ... and I thought, if Log Explorer can do it, so can I ;-).

BTW, syslog was 6.5, not 7.0 - misinformation happens if one has no clue what he/she is talking about and I never used 6.5 and only did basic stuff on 7.

Go to Top of Page
   

- Advertisement -