• SQL_ME_RICH (5/16/2012)


    I guess I am wanting to know if I am going to need another 300+gb of disk space to create the snapshot, and then incremental amounts based on the original for every time I need to run DBCC CHECKDB?

    No, you do not. You need enough space to hold the changes made to the source database during the run of checkDB.

    What MSDN says is:

    The maximum size of a database snapshot is the size of the source database at snapshot creation.

    Now, if you expect that during a run of CheckDB all 300GB of the source database will change, then the snapshot will reach it's maximum size of 300 GB and you will need all 300GB on disk.

    If I have this correct (i.e. needing another 300+gb to do a snapshot for DBCC CHECKDB), then I am going to find a maintenance window to simply remove this RO FG, and be done with it

    As I've said more than once, CheckDB automatically takes a database snapshot before running, exactly the same way that you create one. Hence if a snapshot did require the full size of the database (which is does not), changing the read-only filegroup would change nothing as CheckDB would still take the snapshot itself and would still require that 300 GB.

    Snapshot sizes:

    To store the copied original pages, the snapshot uses one or more sparse files. When a snapshot is taken, the sparse file takes up little disk space. As the database is updated over time, however, a sparse file can grow into a very large file.

    http://msdn.microsoft.com/en-us/library/ms187054%28v=sql.90%29

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass