Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

Clearing Space Used By .LDF files

There is a data warehouse running on SQL Server 2000. During migration I see that Warehouse_Log.LDF has become 5+ GB in size. I did a checkpoint in Query Analyzer and shrank the database from the enterprise manager and yet this value does not go down in size.

What can I do to free up this space

Thanks

Shariq
0
shariq
Asked:
shariq
3 Solutions
 
Anthony PerkinsCommented:
Please maintain your open questions:

1 04/23/2003 50 Output Table Data Into Fixed Length Form...  Open 3rd Party Applications and Development Tools
2 09/09/2003 75 Convert From Oracle to MS-SQL  Open Microsoft SQL Server

Thanks,
Anthony
0
 
kaufCommented:
Hello Shariq,
If it is a secondary Transaction log you can resize / delete it by:
BACKUP LOG [DatabaseName] WITH TRUNCATE_ONLY

And then modifing the data in enterprise Manager.
i once tried to shrink a primary file, but only was able to do this through detaching and attaching the database.
0
 
kaufCommented:
Ah yes, first - check that you've not checked automatically grow in the transaction log options to prevent even more size...
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
htarlowCommented:
If the database recovery type is full or bulk logged, backup the logfile to shrink it.
0
 
arbertCommented:
"grow in the transaction log options to prevent even more size... "

agree with the above suggestions to backup with truncate_only and then shrinking the log file.  HOWEVER, I would not suggest you turning the auto grow off opn the logfile--just bite you in the butt later when you have big inserts or updates....
0
 
kaufCommented:
in an emergency case, you can set a temporary (secondary) transaction log anytime (this you can delete after BACKUP LOG... w/o problems)
0
 
arbertCommented:
"in an emergency case, you can set a temporary (secondary) transaction log anytime (this you can delete after BACKUP LOG... w/o problems) "


why go through the extra effort.  MS SQL Server best practices say that the log file should be set to auto grow....
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now