Thursday, March 22, 2012

Errors: Recovery Mode: Full and Simple

Hi
I have a production database that is set to Recovery Mode: Simple.
However I decided to change this to Recovery Mode: Full. A scheduled
backup of the database was then run that night.
Unfortunately I was then told to reset the Recovery Mode back to
Simple as not enough testing had been done. So I did this.
The next day we received error messages that "The log file for the
database is full. Back up the transaction log for the database to free
up some log space."
The production db was then unusable for the apps. As a quick solution
I changed the recovery mode back to full and backed up the transaction
log ( because you cannot backup the transaction log in simple mode).
This made the database operational again.
I then changed the Recovery mode back to simple for the next night's
scheduled backup.
So..... the nightly backup goes ahead with the db still in simple
mode.
HOWEVER we are still getting the log full error messages and I keep
having to change to recovery mode full and backup the transaction log
and then swap back again to simple mode.
I realise that if the database is set to Recovery Mode: Full then the
transaction log must be backed up regularly. But we are no longer
running in Full mode and I don’t not want to run in full mode
and the transaction logs never used to get full in Simple mode and we
never had to back them up.
I would just like things to get back to how they were - the database
running in simple mode and nightly backups taking place. Then those
nightly backups - which are in one file - restoring ok on a test
machine.
Has anyone got any ideas?
Many thanks!
Thiko!Thiko
How large is your transaction log? Even with simple
recovery model the transaction log is still used.
It is just cleared when transactions complete. If you have
some/one very large transaction running on the system you
may still fill up the transaction log even in simple
recovery mode.
If your transaction log is quite small, you may solve your
problem by increasing it.
Regards
Johnsql

No comments:

Post a Comment