Sql Job Failing

  • Hello All,

    I am new to database. I created a sql job which takes backup of database once in a week. But its been failing. I receive below mentioned error.

    Code: 0xC002F210 Source: Check Database Integrity Task Execute SQL Task Description: Executing the query "DBCC CHECKDB(N'DB') WITH NO_INFOMSGS " failed with the following error: "The transaction log for database 'DB' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases A database snapshot cannot be created because it failed to start. The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline. The database could not be exclusively locked to perform the operation. Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details. Could not write a checkpoint record in database ID 5 because the log is out of space. Contact the database administrator to truncate the log or allocate more space to the database log files.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 11:00:01 AM Finished: 11:01:01 AM Elapsed: 60.157 seconds. The package execution failed. The step failed.

  • nautiyal.jalaj (9/29/2016)


    Hello All,

    I am new to database. I created a sql job which takes backup of database once in a week. But its been failing. I receive below mentioned error.

    Code: 0xC002F210 Source: Check Database Integrity Task Execute SQL Task Description: Executing the query "DBCC CHECKDB(N'DB') WITH NO_INFOMSGS " failed with the following error: "The transaction log for database 'DB' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases A database snapshot cannot be created because it failed to start. The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline. The database could not be exclusively locked to perform the operation. Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details. Could not write a checkpoint record in database ID 5 because the log is out of space. Contact the database administrator to truncate the log or allocate more space to the database log files.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 11:00:01 AM Finished: 11:01:01 AM Elapsed: 60.157 seconds. The package execution failed. The step failed.

    The cause of the error is in the message. It couldn't create a snapshot due to the previous error which was the transaction log for database DB is full. You need to backup the log of the database. Seems like you may need to set up some type of log backup schedule based on the recovery models of the databases and the business requirements related to recovery points and recovery times, data loss thresholds, etc.

    Sue

  • Thank you so much sue_H for your reply. I had created another sql job for transnational log backup in every 3 hours. It gave me the same error.

  • nautiyal.jalaj (9/29/2016)


    Thank you so much sue_H for your reply. I had created another sql job for transnational log backup in every 3 hours. It gave me the same error.

    You need to look at the log_reuse_wait_desc in sys.databases and move forward based on what that tells you. You may need to increase the log file just a bit for the backup if it's just log_backup, you may have a long running or hanging transaction to address, etc. This article identifies the different scenarios and possible solutions:

    https://msdn.microsoft.com/en-us/library/ms175495.aspx

    Sue

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply