SQL Server Transaction Log Full Error
Error:
Cause:
Good
Reference Link: http://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/MSSQLServerAdmin/do-not-truncate-your-ldf-files
"The
transaction log for database "DatabaseName" is full. To find out why space in
the log cannot be reused, see the log_reuse_wait_desc column in Sys.database on
"Source where sql statement is run from the code"
transaction log for database "DatabaseName" is full. To find out why space in
the log cannot be reused, see the log_reuse_wait_desc column in Sys.database on
"Source where sql statement is run from the code"
Cause:
SQL
Server trying to log the changes in database to its log file .LDF and the disk
space is out or it hits the limits allowed by SQL Server.
Server trying to log the changes in database to its log file .LDF and the disk
space is out or it hits the limits allowed by SQL Server.
In
Sql Server Management Studio -> Right click on Database -> Select
Properties -> Select Files to find out where the .MDF and .LDF files are
stored
Sql Server Management Studio -> Right click on Database -> Select
Properties -> Select Files to find out where the .MDF and .LDF files are
stored
->
Look at the AutoGrouth column
Fix:Look at the AutoGrouth column
Backup
your DB and shrink the log file
your DB and shrink the log file
USE
YourDatabase;
YourDatabase;
GO
ALTER
DATABASE YourDatabase SET RECOVERY SIMPLE;
DATABASE YourDatabase SET RECOVERY SIMPLE;
GO
DBCC
SHRINKFILE (YourDatabase_Log, 10); --10MB
SHRINKFILE (YourDatabase_Log, 10); --10MB
GO
ALTER
DATABASE AdventureWorks SET RECOVERY FULL;
DATABASE AdventureWorks SET RECOVERY FULL;
GO
Good
Reference Link: http://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/MSSQLServerAdmin/do-not-truncate-your-ldf-files
No comments:
Post a Comment