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!

Need some information 1

Status
Not open for further replies.

Ravi29

Programmer
Sep 30, 2002
15
0
0
IN
hi!
I need some information about Log - files(.ldf). Its Created while i was installing SQL server 7.0. But i don't get any problem about that. But it take more hard disk space.How i can utilize that?.if one known, give me some information.
 
U should be regularly truncating it.

1. Check that u have set up truncate log on checkpoint option in your server settings.
2. Regular database backups also result in log being truncated.
RT
 
Here's what happens:

You have a database with 10 rows. You update one row, that's a transaction and you now have one row in the transaction log. You insert 10 more rows, again that's a transaction and you now have 11 rows in the log. You update five of those rows, yep, another transaction and you now have 16 rows in the log. You delete five rows, and now there are 21 rows in the log, but only 15 rows in the database. As you see, the log is getting bigger that the database. If you never do a full backup of the database, or never truncate the transaction log, it is possible for the log to get several times larger than the database.

Please take a look at:
FAQ183-1534
FAQ183-345
and the Books Online for more information.

-SQLBill
 
Be aware that if you truncate the log manually, you cannot recover any data past the last backup. If your database is transaction-oriented, you should be doing transaction log backups periodically to keep the log size down and to give yourself the ability to recover as many transactions as possible. How often you do the transaction backups depends on your management and how much data they are willing to lose. (Get this in writing especially if they say anything more than an hour's worth!) We generally do these backups every 15-30 minutes depending on the traffic on the database. You can also perform large imports of data as nonlogged operations, but you should then follow them immediately with a full backup.

Truncation won't shrink the file size either, it just removes the records that have already been committed. You can periodically shrink the files, but they won't get any smaller unless you have recently run backup or manually truncated the log.
 
hi!
Here every one said how i want to maintaine that log -file. Thanks for your kind of information.But shall you give me some more how i utilize that?. Suppose i have been created one database, within that i had created one table. This table involved more than one transaction such as insert some records,deleted some records and updated some records. Now i want to visulize what are the transaction made on that table. Is it possible from extracting infromation from log file?. If yes, tell me how i want to do.
 
hi!
Here every one said how i want to maintaine that log -file. Thanks for your kind of information.But shall you give me some more how i utilize that?. Suppose i have been created one database, within that i had created one table. This table involved more than one transaction such as insert some records,deleted some records and updated some records. Now i want to visulize what are the transaction made on that table. Is it possible from extracting infromation from log file?. If yes, tell me how i want to do
 
You can't do it with MS SQL Server. However, there is a third-party program that lets you look at the transaction log(s). I don't know the name off the top of my head. I'll look for it and let you know (unless someone else answers you first.)

-SQLBill
 
Got the answer. It's Log Explorer by Lumigent (
However, check out these threads first:

thread183-85990
thread183-130322
thread183-111526

They have more on the subject of reading/viewing log files.

-SQLBill
 
hi SqlBill!
Your answer is more suitable for my needs. I tell lots of thank to you regarding that answer. I have seen that third party tools for extracting information from .ldf formated file. Nice one.

bye
Ravichandran.V
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top