tiras gans
asked on
vcdb_log.ldf is getting too big.
My logs grew again but steady at 120GB. I did a shrink again.
vcbd.mdf is normal 3GB.
What's the normal size for the log file and why is it getting so large?
Please advice. Thank you.
vcbd.mdf is normal 3GB.
What's the normal size for the log file and why is it getting so large?
Please advice. Thank you.
If you could shrink it, that log space must have been needed at some point in time, within a single transaction. Maybe you are doing bulk inserts or deletes sometimes?
Hi,
The log file will grew as much as is SQL needs it to grow.
You should not shrink your log file.
You should set up a maintanance plan to schedule a regularl transaction log backup.
This will stop it from excessively growing.
The log file will grew as much as is SQL needs it to grow.
You should not shrink your log file.
You should set up a maintanance plan to schedule a regularl transaction log backup.
This will stop it from excessively growing.
I don't think you have your database in bulk-logged or full recovery mode - because then you would not have been able to shrink it.
However, if the DB is in full recovery mode, your transaction log backup is running to seldom. Try increasing the frequency of log backup.
I would not try and limit the autogrow - if the log file reaches that limit, the database will refuse any modify operation, since it cannot be logged anymore. This is until the DB has free space in the log file again, e.g. by performing a transaction log backup, or commit (in single recovery mode).
However, if the DB is in full recovery mode, your transaction log backup is running to seldom. Try increasing the frequency of log backup.
I would not try and limit the autogrow - if the log file reaches that limit, the database will refuse any modify operation, since it cannot be logged anymore. This is until the DB has free space in the log file again, e.g. by performing a transaction log backup, or commit (in single recovery mode).
What level of logging are you doing? Is it tuned for your environment?
Logging level can create a DB Size runaway in so many ways, so I would validate you didnt have an admin increase the logging level "just because"
Let us know!
-Virt
Logging level can create a DB Size runaway in so many ways, so I would validate you didnt have an admin increase the logging level "just because"
Let us know!
-Virt
If you need to reduce the size of log then first take full database backup and then truncate the log using log backup
Take a look at the rollup jobs under SQL Server Agent and make sure that they are completing successfully. I've seen where they weren't running for awhile and then when they do start running, they fill up the log trying to pare down the data. If that's the case, you'll probably see that your vpx_hist_stat1 table is huge and you're gonna need to truncate the table or run a query to delete old entries.
ASKER
Dan, I don't have rollup jobs under SQL Server Agent. Am I looking into the right place? Attached.
SQL-Server-Agent.jpg
SQL-Server-Agent.jpg
Expand the Jobs folder and you can see if they've been running by double-clicking on the Job Activity Monitor
ASKER
Yes looks like they've been running
Job-Activity-monitor.jpg
Job-Activity-monitor.jpg
Looks healthy, so I would turn my attention back to the database and the previous comments.
Got it. Let me review the database and trunkate/shrink.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I agree with making the recovery SIMPLE especially if you're using SQL 2005 Express. If you have it on FULL create a maintenance plan to shrink the logs, otherwise the 4GB limit will cause issues.
ASKER
Where do I change from Full to Simple?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you! And how can I view what I have now?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Recovery Model: Bulk-logged.
ASKER
If I switch it to Simple. Do I need to stop the virtual center?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Okay done. Now after I purge, truncate, and shrink the problem hopefully will go away...
Thank you.
Thank you.
ASKER
Okay I switched that to Simple Recovery Model. Shrink it again. Now it's down to 100MB. Looks good.
We'll see how long it will stay this way.
Thoughts?
We'll see how long it will stay this way.
Thoughts?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No. The last backup time is showed in the "General" tab.