raikar_raviraj
19th September 2006, 06:46
The sql transaction log file has gone to 32 GB. The harddisk space allocated to that particular drive where sql is installed is 45GB. We have taken backup of transaction log as well as data but still it isnt truncating the log file. The file that has been generated on the drive is .ldf file.
Please anyone can guide me in tackling this problem effectively. Can we delete the file?
NirajKakodkar
20th September 2006, 08:03
HI ,
You dont have to use any third party tool for this , you can do this using SQL - SERVER Enterprise Manager ,
For more details click the link
http://niraj.kakodkar.googlepages.com/sql
Picdaieeee
26th September 2006, 16:11
.ldf file is very important on sqlserver. please do not delete it; if you do, you might not be able to open your database.
You can truncate the log simply by trying to back only the transaction log. in enterprise manager, right clik on the database, all activities, backup, backup transaction log.
ciao
raikar_raviraj
28th September 2006, 08:51
Thanks for your reply.
i have taken the backup of the transaction log file. But could you tell me what would be the reason behind generation of this .ldf file? Is it a regular process? or is it something we need to seriously think about..
NirajKakodkar
28th September 2006, 09:20
hi ravi ,
can i call u ravi ?
It is basically a log file created when there is some kind of crash occurs , so that it can revert back
Regards,
Niraj
raikar_raviraj
28th September 2006, 11:11
sorry i dont have a cell..
thanks for ur info..
u seem to be knowing a lot..
NirajKakodkar
9th October 2006, 15:17
Ne time buddy
Regards,
Niraj
chris_kzn
4th November 2006, 10:08
raikar_raviraj, NirajKakodkar is correct in saying that this is a log file. An alternative solution is to stop the BaaN server and the detach the BaaN database using SQL Query Analyzer (EXEC sp_detach_db @dbname = 'Database Name'), move the log file to another part of the hard drive and then re-attach the database using SQL Query Analyzer (EXEC sp_attach_single_file_db @dbname = 'Database Name', @physname = 'c:\Path to Database\database.mdf'). This will cause a new log file to be created of a smaller amount.
chris_kzn
4th November 2006, 10:23
An alternative solution is to follow these steps thanks to NirajKakodkar (link: http://niraj.kakodkar.googlepages.com/sql)
1. Open SQL-SERVER Enterprise Manager
2. Move down to select your database
3. Right Click
4. Click on All Tasks
5. Click Shrink Database
6. On the " Shrink Database Dialog box " , click on Files .
7. Another dialog box opens
8. Select the the log file
9. Give the size ( Shrink size ) of the log file ( MInimum value is displayed )
10.Click Ok.
:)