on 09-01-2014 9:03 PM
BH
Hi, I'm trying to delete the database log file, because it is getting too big. Before we were using the mirror server, i was able to just stop the database, delete the log file, restart the database, and it would automatically create a new log file.
Now (with mirror server) i've tried to stop the server (both on primary and secondary), delete the log files (on both primary and secondary), and restart the server. However, it would give an error and would not start. So what is the correct way to delete log files?
Thanks
Aron
Hi Aron,
Deleting the log file between server starts is not recommended in a mirrored or non-mirrored setup. The log file is used for recovery in the event of database failure. Having said that, there are log file maintenance procedures available to help take care of log file growth. Transaction log maintenance can be done either through truncation or renaming. Renaming may be the preferred method, and is required for incremental backups.
Having said that, transaction log maintenance does become a bit more limited with database mirroring. Truncation is no longer an option, but renaming the transaction log is. After a period of time (e.g. scheduled database event), old renamed logs can be deleted from the file system (although care should be taken to ensure the logs are no longer required).
See the link below for more information:
Hope this helps,
Tyson
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.