The transaction log for database 'dbname' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
Issue:
InnerException: System.Data.SqlClient.SqlException (0x80131904): The transaction log for database 'dbname' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
Analysys:
The issue says that the transaction log has reached its configured size or disk does not have sufficient space. , so we need to make space.
Solution 1:
Clear the log file and freeing disk space
Use [dbname]
Find log file name using below query and pass it in DBCC SHRINKFILE query
Select * from sys.database_files
ALTER DATABASE [dbname] SET RECOVERY SIMPLE
DBCC SHRINKFILE ('dbname_Log', 1)
Solution 2:
Move log file on another drive
Please follow steps mentioned in below article,
http://anrorathod.blogspot.com/2018/02/how-to-move-or-change-datamdf-file-or.html
For more information you can refer,
Please follow steps mentioned in below article,
http://anrorathod.blogspot.com/2018/02/how-to-move-or-change-datamdf-file-or.html
For more information you can refer,
Troubleshoot a Full Transaction Log (SQL Server Error 9002)
https://docs.microsoft.com/en-us/sql/relational-databases/logs/troubleshoot-a-full-transaction-log-sql-server-error-9002?view=sql-server-2017
Hope this will help you and save your time.
https://docs.microsoft.com/en-us/sql/relational-databases/logs/troubleshoot-a-full-transaction-log-sql-server-error-9002?view=sql-server-2017
Hope this will help you and save your time.
Enjoy !!!
:)
No comments:
Post a Comment