3

I am evaluating DISKSHADOW utility to take MSSQL database snapshots. I use the below

set context persistent
set option rollbackrecover txfrecover
set verbose on
begin backup
add volume d: alias dbshadow
create

I can see that a snapshot is created. But I want to understand on what drive the snapshot is located. I need this to size the drive accordingly. With vssadmin I know this as we use addshadowstorage command. But with diskshadow I have no idea. I read through https://technet.microsoft.com/en-us/library/cc772172.aspx and https://technet.microsoft.com/en-us/library/cc966520.aspx#EEAA and googled, but I did not get much info. Any help is much appreciated. I am using the software provider from Microsoft

 * ProviderID: {b5946137-7b9f-4925-af80-51abd60b20d5}
     Type: [1] VSS_PROV_SYSTEM
     Name: Microsoft Software Shadow Copy provider 1.0
     Version: 1.0.0.7
     CLSID: {65ee1dba-8ff4-4a58-ac1c-3470ee2f376a}

Thanks

  • I would (in almost all cases) not use a storage level snapshot to "backup" or make snapshots of SQL Server. There are too many things that can and will not work as expected - most have to do with database recovery. If you want snapshots, either use the built in functionality of SQL Server or take native database backups. VSS I supported but I don't believe it's going to work the way you expect. – Sean Gallardy - Mostly Retired May 23 '15 at 01:29
  • Thanks Sean. I'm not using this for backups. We have a different backup solution.My understanding is that SQL Writer service works on top of VSS and the option rollback recover is to tell sql server to recover. In fact, I can see that action in sql server logs. I read technet documentation. Do you think it isn't reliable? – M N Manikantan May 25 '15 at 06:48

2 Answers2

1

I figured out that we have this cool tool called vssagent. This comes from windows SDK. I installed it and ran vssagent. This generates a xml file which gives all the information needed. In my case it was using C:. However, we can use vssadmin to define where we want to take snapshots and diskshadow would honor that. Pasting below is an excerpt from the file.

Volsnap.AllocatedSpace="3000 Mb" Volsnap.MaxSpace="0 Mb" DiffArea.Device="\Device\HarddiskVolume2" DiffArea.DriveLetter="C:"

1

I just realized that after taking snapshot, I can use vssadmin to find details about shadow storage

This is simpler and easy as we won't have to install anything else.

C:\Windows\system32>vssadmin list shadowstorage

vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool (C) Copyright 2001-2013 Microsoft Corp.

Shadow Copy Storage association
For volume: (D:)\\?\Volume{f4cae2c3-f955-11e4-80fa-12eebcc74673}\
Shadow Copy Storage volume: (C:)\\?\Volume{c48a7ec3-f954-11e4-80f9-806e6f6e6963}\
Used Shadow Copy Storage space: 3.61 MB (0%)
Allocated Shadow Copy Storage space: 2.93 GB (2%)
Maximum Shadow Copy Storage space: UNBOUNDED (100%)