Maintenance plan backup activity screwed by adding a snapshot

  • Hi guys,

    I am running sql server 2005 on a server dedicated to hosting a couple of rather large databases.

    I have setup a maintenance plan that runs nightly, and among other things does a full backup of all databases (through the backup database task).

    Everything was running fine until i added a snapshot of one of the user databases. Now I get the following error:

    Executing the query "DBCC CHECKDB WITH NO_INFOMSGS

    " failed with the following error: "A database snapshot cannot be created because it failed to start.

    Write to sparse file 'C:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\DATA\\MSDBData.mdf:MSSQL_DBCC7' failed due to lack of disk space.

    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.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

    Firstly, are snapshots included in the "All Databases" option of the backup databases task. And if so, is the only way to exclude them to use a custom T-SQL task instead of a backup database task?

    Any help would be much appreciated 🙂

    Thanks,

    Scott

  • This actually does not have anything to do with the database snapshot that you created. If you look at the message, the error is on the MSDB database:

    Executing the query "DBCC CHECKDB WITH NO_INFOMSGS

    " failed with the following error: "A database snapshot cannot be created because it failed to start.

    Write to sparse file 'C:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\DATA\\MSDBData.mdf:MSSQL_DBCC7' failed due to lack of disk space.

    And, the failure is due to a lack of space on the volume containing that database. Integrity checks are not performed on the actual database, but are normally performed on an internal snapshot of the database.

    When the system cannot generate the sparse file - or the sparse file being used for the snapshot runs out of space, you get the above error message.

    Simple put, you have run out of space on the C:\ drive. Identify what is taking up all of the space and purge it, or expand the volume.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Cool, thanks you are absolutly right.

    I don't want to back-up snapshot databases which means I will have to use T-SQL script instead of a database backup task in the maintenance plan (which is a pain) to backup all user databases.

    Apparently you can check to not include snapshots in sql server 2008, unfortunatly I am stuck with sql server 2005.

    Thanks for your help.

  • Scozzard (9/21/2009)


    Cool, thanks you are absolutly right.

    I don't want to back-up snapshot databases which means I will have to use T-SQL script instead of a database backup task in the maintenance plan (which is a pain) to backup all user databases.

    Apparently you can check to not include snapshots in sql server 2008, unfortunatly I am stuck with sql server 2005.

    Thanks for your help.

    Not sure what this has to do with running out of space on your C:\ drive. Until you free up space, your integrity checks are going to fail.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • It means I freed up space and it works fine now.

    I did go on a rather disjointed tangent to explain i noticed another issue but that is for another topic / another day.

    Thanks for your help.

  • Scozzard (9/21/2009)


    It means I freed up space and it works fine now.

    I did go on a rather disjointed tangent to explain i noticed another issue but that is for another topic / another day.

    Thanks for your help.

    Okay - that explains it, I was confused for a moment. Thanks for the update and happy to have been able to help.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 6 posts - 1 through 5 (of 5 total)

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