cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting a log file when using mirror server.

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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:

DocCommentXchange

Hope this helps,

Tyson

Answers (0)