i tried that but it did not create a new log file and the working programs halted. so i had to restore it from backup.
by the way where will i write the script? never mind, i understand nothing from sql server.
Basically "Dump Tran" is a Command used in SQL Server 6.5 which is equivalent to "Backup Tran" in SQL Server 7.0 and 2000.
Dump Tran/Backup Tran with "NO_LOG" will clear the log file which must be used only at critical times if you dont worry about losing data.
Dump Tran/Backup Tran will not reduce the size of the log file, unless you have enabled "Auto Shrink" for the database. I can say in 2 steps the same thing, 1. Clear transactions in log files and then 2. Shrink the log file.Thats the concept involved on this.
Originally posted by cutcopypaste excuse me for posting again but this was one of the missing.
how can i shrink _log.ldf file? it is about 1,39 gb. thanks...
Assuming that you are using SQL 2000, what may be happening is that the log file will not shrink unless the database is backed up. Microsofts new "feature" that makes you use the SQL backup.
The best way to keep the log file from ever becoming large is to create a backup device and then set a regularly scheduled backup for your database.
When we upgraded to SQL 2000 we had a similar problem on a database.
To setup a backup device:
Open Enterprise Manager, open Management
right click on backup and select new backup device
pick a name, then select Filename and select where you want the file stored then select ok.
Now that you have a backup device.
right click on your database, all tasks, backup database
Click on backup device, then select your device from the list, select ok
Select Database complete (or database differential if size is a concern and using this as an additional restore option is unimportant).
Select Overwrite existing media
click in the schedule checkbox then open the schedule screen
select recurring then setup how often you want this to occur. Keep in mind that this will overwrite your existing file, but sounds like this is not your primary backup.