Active Server Pages Programming (ASP)/SQL Server 2000

Advertisement


Question
Pardon me , but i really don't know how do i go about viewing the transaction log. I've found the path of the log in my Enterprise Manager, but whenever i tried to view it in notepad, it says 'file in use'.

Any help ?
-------------------------
Followup To
Question -
Is there anyway i can log all the transaction for a particular database so that i can keep a record of what are the fields that have been modified?
I'm doing this cause i want to audit whatever is going on in the database.

Another question is is there anyway to do a 'quick and dirty' web form and link it up with a database? That means i just drag and drop the textfields and link them with my table fields, then just press a button and the record are inserted. (without actually me having to code it all). Its something like a prototype.
Answer -
hi

1. You can read the Transaction Log to get the fileds modified values for particular DB.

2. I saw something like that in ASP.NET sample code...  If you search in GOOGLE you may get..

Happy Programming!!

-Srini


Answer
Hi

You can't view the transaction log from notepad its part of sql server

Here is the steps

SQL Server 7.0/2000
There is no syslogs system table in SQL Server 7.0/2000. The database log is now an operating system file. So, this SQL statement:

SELECT xactid AS TRAN_ID, op AS LOG_RECORD FROM syslogs

will return error:

Server: Msg 208, Level 16, State 1, Line 1
Invalid object name 'syslogs'.




You can use the following undocumented command in this case:

DBCC log ( {dbid|dbname}, [, type={0|1|2|3|4}] )

PARAMETERS:
Dbid or dbname - Enter either the dbid or the name of the database in question.

type - is the type of output:

0 - minimum information (operation, context, transaction id)

1 - more information (plus flags, tags, row length)

2 - very detailed information (plus object name, index name, page id, slot id)

3 - full information about each operation

4 - full information about each operation plus hexadecimal dump of the current transaction log's row.

by default type = 0

To view the transaction log for the master database, you can use the following command:

DBCC log (master)


Happy programming!

-Srini

Active Server Pages Programming (ASP)

All Answers


Answers by Expert:


Ask Experts

Volunteer


Srini Nagarajan

Expertise

I can answer any kind of questions in ASP.NET, C#, VB.NET, SharePoint 2007, ASP, Coldfusion, Powerbuilder 7.00 / 8.00, JAVA servlets, MS SQL 2000 / MSSQL7, Sybase

Experience

Contact me if you need any custom development on ASP.NET, ASP, SharePoint 2007, Coldfusion, Powerbuilder.

©2012 About.com, a part of The New York Times Company. All rights reserved.