- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Server Management - Systems Insight Manager
- >
- Shrinking the LDF file
Server Management - Systems Insight Manager
1824708
Members
3921
Online
109674
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 05:51 AM
тАО12-22-2004 05:51 AM
Shrinking the LDF file
My database is 80mb in size (mdf) and my transaction log is 6.7gb (ldf). Is there something that I should be doing to reduce the size of the LDF file?
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 09:42 PM
тАО12-22-2004 09:42 PM
Re: Shrinking the LDF file
Hi Tyler.
I had the same issue. I do the following to reduce the size :
Go to start/program/Microsoft SQL server/Query analyzer. Enter the sa password then OK.
In the toolbar, select the insight database, it should display the master database by default.
Now find the name of SIM database in program files/microsoft sql server/mssql$sim(or your database instance)/data. Here you will find an insight_xxx.mdf file and an insight_xxx_log.ldf file. The name to remember is insight_xxx (mine is insight_v1_0_14224218). Go back to the query analyzer window.
In the window, type :
backup log insight_xxx with no_log
for example :
backup log insight_v0_1_14224218 with no_log
then press F5 to run.
Delete the line then type :
dbcc shrinkfile(insight_xxx_log,sizeinMB)
for example :
dbcc shrinkfile(insight_v1_0_14224218_log,40)
then press F5 to run
This should reduce the log file to 40 MB.
You can also set the log file not to grow above xxMB in the SQL enterprise manager but this could lead you to some issues when the log is full. Check in this forum about cpu usage, I have posted a message about this.
These commands can also be used in a dos session with isql, I try now to automatize the file size check then launch the shrinkfile sql commands if the size is too large.
In my case, also, after the shrinkfile, the log files reduces itself after a few hours. Is it today at 1,5 MB after beeing reduced at 40 MB yesterday.
Hope this helps.
Regards.
I had the same issue. I do the following to reduce the size :
Go to start/program/Microsoft SQL server/Query analyzer. Enter the sa password then OK.
In the toolbar, select the insight database, it should display the master database by default.
Now find the name of SIM database in program files/microsoft sql server/mssql$sim(or your database instance)/data. Here you will find an insight_xxx.mdf file and an insight_xxx_log.ldf file. The name to remember is insight_xxx (mine is insight_v1_0_14224218). Go back to the query analyzer window.
In the window, type :
backup log insight_xxx with no_log
for example :
backup log insight_v0_1_14224218 with no_log
then press F5 to run.
Delete the line then type :
dbcc shrinkfile(insight_xxx_log,sizeinMB)
for example :
dbcc shrinkfile(insight_v1_0_14224218_log,40)
then press F5 to run
This should reduce the log file to 40 MB.
You can also set the log file not to grow above xxMB in the SQL enterprise manager but this could lead you to some issues when the log is full. Check in this forum about cpu usage, I have posted a message about this.
These commands can also be used in a dos session with isql, I try now to automatize the file size check then launch the shrinkfile sql commands if the size is too large.
In my case, also, after the shrinkfile, the log files reduces itself after a few hours. Is it today at 1,5 MB after beeing reduced at 40 MB yesterday.
Hope this helps.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2004 10:27 PM
тАО12-22-2004 10:27 PM
Re: Shrinking the LDF file
Hello,
if you are running MSSQL2000 you can also modify the DB Maintenance plan ( Transactionlogbackup ) and add a second step using this sql commands
-------------------------------------
use Insight_v1_0
DBCC SHRINKfile(Insight_v1_0_log, 0)
-------------------------------------
just adjust the database name to your db name and the logfilename also.
I run the transactionlog backup every 30 minutes, my database ist ~450MB.
It produces round about 600-800 MB transactionlogs per hour.
I also set up to kill every transactionlogbackup that is older than 2 hrs. this keeps the amount of data low.
if you are running MSSQL2000 you can also modify the DB Maintenance plan ( Transactionlogbackup ) and add a second step using this sql commands
-------------------------------------
use Insight_v1_0
DBCC SHRINKfile(Insight_v1_0_log, 0)
-------------------------------------
just adjust the database name to your db name and the logfilename also.
I run the transactionlog backup every 30 minutes, my database ist ~450MB.
It produces round about 600-800 MB transactionlogs per hour.
I also set up to kill every transactionlogbackup that is older than 2 hrs. this keeps the amount of data low.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2004 02:21 AM
тАО12-23-2004 02:21 AM
Re: Shrinking the LDF file
Thank you to both of you. The shrinking worked, and I will get it scheduled. I was surprised this worked when I thought I had tried the same idea throught the GUI Enterprise Manager and it accomplished nothing. Oh well. It is a solution!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP