Sunday, May 20, 2012

Tips: How to troubleshoot the Volume Shadow Copy Service

The Windows Server 2003 Service Pack 2 Operating System is capable of addressing some issues that usually affect the performance of VSS. You can find VSS by default in Windows 2003. If a requester (a backup program) uses the writers in the system, it will automatically run as it is set to start normally.
Before the backup operation runs, make sure that the Exchange Writer is set to the stable state and there is no error. Use the following command to determine state of the Exchange Writer.

VSSadmin list writers
You can restart the Microsoft Exchange Information Store service if the Exchange Writer is in the failed state. Then, you can run the VSSadmin list writers command to determine if the writer state returns to a stable state. Let’s have an example output that explains the Exchange Writer in a stable state.
Writer name: 'Microsoft Exchange Writer'

Writer Id: {GUID}

Writer Instance Id: {GUD}

State: [1] Stable

Last error: No error
If the output from the “VSSadmin list writer” command is blank, there are possibilities for a registry error that prevents the operating system from detecting and displaying the appropriate writer information.  Refer to this article for "Error: 0x8000FFFF".
By using the VSSadmin list provider command, you can list the registered Volume Shadow Copy providers on the computer. If you run this command, "Microsoft Software Shadow Copy provider 1.0" will be listed as one of the providers or as the only provider. Besides, there are some third party programs that use their own providers.
Check out the following example output shows the results from the VSSadmin list providers command.
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001 Microsoft Corp.
Provider name: 'Microsoft Software Shadow Copy provider 1.0'
Provider type: System
Provider Id: {GUID}
Version: 1.0.0.7

If you wish to have a successful backup, it is required to ensure that the providers are listed and the Exchange Writer is in a stable state. Use the command VSSadmin /? at a command prompt to get more information about other tests that you run.
If you still find difficulties with the backup process, the VSS tracing feature should be enabled. Here, you can create a batch file to set the registry entries. To do this, type or copy the following text into a text file. Then, save the file as "EnableVSSTracing.bat." This batch file saves tracing information in a file that is named C:\trace.txt.

net stop swprv
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSS\Debug\Tracing /v TraceFile /t REG_SZ /d C:\trace.txt /f
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSS\Debug\Tracing /v TraceLevel /t REG_DWORD /d 0xffffffff /f
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSS\Debug\Tracing /v TraceEnterExit /t REG_DWORD /d 1 /f
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSS\Debug\Tracing /v TraceToFile /t REG_DWORD /d 1 /f
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSS\Debug\Tracing /v TraceToDebugger /t REG_DWORD /d 1 /f
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSS\Debug\Tracing /v TraceFileLineInfo /t REG_DWORD /d 1 /f
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSS\Debug\Tracing /v TraceForceFlush /t REG_DWORD /d 0 /f

In order to trace VSS, go with the following steps:

Now, it is required to modify the Windows registry to enable tracing. You can run the EnableVSSTracing.bat file that you created.
Reproduce the VSS issue that you experience.
Once you receive the VSS error that corresponds to the issue that you wish to troubleshoot and stop the VSS services. Check out the commands to this.
net stop VSS
net stop SWPRV

Disable VSS tracing. To do this, run the following command:

reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSS\Debug\Tracing /f

Review the trace file that was generated when it is done.

B  y ,