What can I do when I receive this message:
The transaction log for database 'xxx' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases in EXEC.
First check if you have no free space in your hard disk.
If you want to reduce your log file you can follow this steps:
1 - Backup the log at SQL Server Management Studio > Object Explorer > Databases > Right click your database > Tasks > Back Up and set "Transaction Log" in Backup Type field;
2 - alter database YourDataBaseName set recovery simple;
3 - dbcc shrinkfile ('YourDataBaseLogName', NewLogSize);
E.g.: dbcc shrinkfile ('StoreDb_log', 1);
4 - alter database YourDataBaseName set recovery full;
Solved!
No comments:
Post a Comment