Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Sever log file

Status
Not open for further replies.

Faheemi

Programmer
Sep 2, 2001
59
0
0
HK
Hi there,

I have created a SQL server 2000 database and it automatically created a log database. An the log database keeps growing with the activity in the main database. I want to know for what purpose the log datbase is used. Can I read it? how can I read that?

Thanks for all of your inputs

Regards

Faheem Hameed
 
The transaction logs are a critical and essential component of a SQL Server database. The SQL Books Online (BOL) contain information about the purpose of transaction logs. You can also read about logs at the MSDN website.


Transaction logs continue to grow until you backup the database or truncate the log. If you care about data recovery, you will backup the database rather than truncate logs.

You'll want to read about shrinking the logs after you determine how to stop growth. HINT: backup the database regularly and frequently. Read about shrinking logs in SQL BOL or at MSDN.


You may also want to read the article at
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
I forgot to answer your questions about reading the transaction logs. You can view some of the transaction log with the undocumented DBCC LOG command.

dbcc log (master)

Read about command options at.

I've not used it much and have read that it is not very helpful. Moist people prefer a third party tool such as Lumigens Log Explorer for SQL Server.

Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
If the database is non-essential - set the database to truncate the log on checkpoint. This will keep the log very small if your transactions are small.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top