You cannot back up an Exchange Server 2007 server CCR node after you install Exchange Server 2007 CCR Service Pack 2 on the CCR node

Article translations Article translations
Article ID: 979227 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

Consider the following scenario. You install the Microsoft Exchange Server 2007 Cluster Continuous Replication (CCR) Service Pack 2 (SP2) on a CCR node. However, when you try performing a back up of an Exchange 2007 server CCR node, the backup fails. Additionally, the following error message is logged in the Application log:
Log Name: Application
Source: MSExchangeIS
Date: Date Time
Event ID: 9782
Task Category: Exchange VSS Writer
Level: Error
Keywords: Classic
User: N/A
Computer: Server_Name
Description:
Exchange VSS Writer (instance e0e81d26-6564-4b83-b923-aeb17068e5ff:3) has unsuccessfully completed the backup of storage group 'First Storage Group'. No log files have been truncated for this storage group.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="MSExchangeIS" />
<EventID Qualifiers="49193">9782</EventID>
<Level>2</Level>
<Task>41</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="System_Time" />
<EventRecordID>1396</EventRecordID>
<Channel>Application</Channel>
<Computer>Server_Name</Computer>
<Security />
</System>
<EventData>
<Data>e0e81d26-6564-4b83-b923-aeb17068e5ff:3</Data>
<Data>First Storage Group</Data>
<Binary>46756C6C00</Binary>
</EventData>
</Event>

CAUSE

This issue occurs because the Exchange backup extension was not installed during the Exchange 2007 CCR SP2 installation. The Exchange backup extension is only installed when you run the Exchange 2007 CCR service pack Setup program by using the /upgradecms switch.

RESOLUTION

To resolve this issue, you must run the following PowerShell script within Exchange Management Shell. To do this, follow these steps:
  1. Create a blank document in Notepad.
  2. Copy the PowerShell script shown underneath into the Notepad document.
  3. Save the file in the Exchange scripts folder and name it Register-WSBExchange.ps1.
  4. Close Notepad.
  5. Click Start, point to All Programs, point to Microsoft Exchange Server 2007, and then click Exchange Management Shell.
  6. At the command line, type Register-WSBExchange.ps1 and then press ENTER.

PowerShell script Register-WSBExchange.ps1:

#
# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK
# OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
#
# Synopsis: This script is to be used to help register and unregister
#           the WSBPlugin for Exchange 2007

# Define the script parameters
param([switch] $Register   = $false,
      [switch] $UnRegister = $false);

# Define global variables
$script:WsbBinPath = "";
$script:reg= join-path (join-path $env:SystemRoot system32) reg.exe;
$script:servicecmd = join-path (join-path $env:SystemRoot system32) sc.exe;
$script:InstallPath

# This function will Register the WSB extension for Exchange backup/restore
function Register-WSBExchange
{	
    if ([Environment]::OSVersion.Version.Major -ge 6)
    {      	
    	if ((get-service wsbexchange* | where {$_.name -eq "wsbexchange"}))
    	{
    	      if ((get-service wsbexchange).Status -eq "Running")
    	      {
    	          Start-SetupProcess -Name:"$servicecmd" -Args:"stop wsbexchange";
    	      }
    	      Start-SetupProcess -Name:"$servicecmd" -Args:"delete wsbexchange";
    	}
    	
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKCR\CLSID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /t REG_SZ /d  `"CExchangeHelper Class`" /f";
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKCR\CLSID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /v AppId /t REG_SZ /d `"{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /f";
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKCR\CLSID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}\LocalServer32`" /t REG_SZ /d `"$WsbBinPath`" /f";
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKCR\APPID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /t REG_SZ /d `"CExchangeHelper Class`" /f";
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKCR\APPID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /v LocalService /t REG_SZ /d `"wsbexchange`" /f";
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKCR\APPID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /v LaunchPermission /t REG_BINARY /d `"010004806000000070000000000000001400000002004c0003000000000014001f000000010100000000000512000000000018001f000000010200000000000520000000200200000000180003000000010200000000000520000000270200000102000000000005200000002002000001020000000000052000000020020000`" /f";
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKCR\APPID\wsbexchange.exe`" /v AppId /t REG_SZ /d `"{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /f";    	
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKLM\Software\Microsoft\windows nt\currentversion\WindowsServerBackup\Application Support\{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}`"  /v `"Application Identifier`" /t REG_SZ /d Exchange /f";
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKLM\Software\Microsoft\windows nt\currentversion\WindowsServerBackup\Application Support\{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}`" /v CLSID /t REG_SZ /d `"{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /f";    	
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKLM\Software\Microsoft\windows nt\currentversion\WSBAppExchangeHelper`" /v AutoMarkDbRecoverable /t REG_DWORD /d 1 /f";
    	Start-SetupProcess -Name:"$reg" -Args:"add `"HKLM\Software\Microsoft\windows nt\currentversion\WSBAppExchangeHelper`" /v AutoMountOnPITRecovery /t REG_DWORD /d 1 /f";

    	Start-SetupProcess -Name:"$servicecmd" -Args:"create wsbexchange binpath= `"$WsbBinPath`" type= own start= demand error= ignore obj= LocalSystem DisplayName= `"Microsoft Exchange Server Extension for Windows Server Backup`"";
    	Start-SetupProcess -Name:"$servicecmd" -Args:"description wsbexchange `"Enables Windows Server Backup users to back up and recover application data for Microsoft Exchange Server.`"";
    }
}

# This function will UnRegister the WSB extension for Exchange backup/restore
function UnRegister-WSBExchange
{
    if ([Environment]::OSVersion.Version.Major -ge 6)
    {
                  
    	if ((get-service wsbexchange* | where {$_.name -eq "wsbexchange"}))
    	{
    	  if ((get-service wsbexchange).Status -eq "Running")
    	  {
    	      Start-SetupProcess -Name:"$servicecmd" -Args:"stop wsbexchange";
    	  }
          
    	  Start-SetupProcess -Name:"$servicecmd" -Args:"delete wsbexchange";
          
    	  Start-SetupProcess -Name:"$reg" -Args:"delete `"HKCR\CLSID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /f";
    	  Start-SetupProcess -Name:"$reg" -Args:"delete `"HKCR\APPID\{D8A2E312-3B17-4293-B71E-CD72A7C04BF3}`" /f";
    	  Start-SetupProcess -Name:"$reg" -Args:"delete `"HKCR\APPID\wsbexchange.exe`" /f";
    	  Start-SetupProcess -Name:"$reg" -Args:"delete `"HKLM\Software\Microsoft\windows nt\currentversion\WindowsServerBackup\Application Support\{76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}`" /f"; 
    	  Start-SetupProcess -Name:"$reg" -Args:"delete `"HKLM\Software\Microsoft\windows nt\currentversion\WSBAppExchangeHelper`" /f";
    	}
    }
}

# This funciton will validate the script parameters
function Validate-Parameters
{
  $validParams = $true;
  $errorString =  "`n`n################################################################################`n"
  $errorString += "# There were errors validating the script parameters!                          #`n"
  $errorString += "################################################################################`n"
  
  if (!$Register -and !$UnRegister)
  {
    # User specified neither the Register or UnRegister action
    $validParams = $false;
    $errorString += "`nERROR: You must specify either the `"Register`" or `"UnRegister`" action.`n"
  }
  
  if ($Register -and $UnRegister)
  {
    # User specified both the Register and UnRegister actions
    $validParams = $false;
    $errorString += "`nERROR: You can only specify either the `"Register`" or `"UnRegister`" action, but not both.`n"
  }
  
  if (!$validParams)
  {
    $errorString += "`n`nUse -? to see the usage of the script.`n"
    Write-Warning "$errorString`n`n"
  }
  else
  {
    # Get the FQDN for this server
    $ipGlobalProperties = [System.Net.NetworkInformation.IPGlobalProperties]::GetIPGlobalProperties();

    # Get Exchange setup path
    $Reg_ExSetup = "SOFTWARE\\Microsoft\\Exchange\\Setup"
    $SetupPathVALUE = "MsiInstallPath"
     
	# Open remote registry
	$registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $ipGlobalProperties.HostName);
 
	# Set regKey for MsiInstallPath
	$regKey= $registry.OpenSubKey($REG_ExSetup)
 
	# Get Install Path from Registry and replace : with $
	$script:InstallPath = $regkey.getvalue($SetupPathVALUE)
 
	# Set WSBExchange.exe path
	$binFile = "Bin\wsbexchange.exe"
    $script:WsbBinPath = [System.IO.Path]::Combine($installPath, $binFile);
  }
    
  return $validParams;
}

function Usage
{
@"
********************************************************************************

SUMMARY:

This script assists in the registration of WSB extension for Exchange 2007 
database backup restore plugin. 

********************************************************************************

USAGE:

Register-WSBExchange.ps1 <-Register | -UnRegister> [-ExchangeBinPath]

-Register`tRegister WSBExchange.

-UnRegister`tRemove WSBExchange.

********************************************************************************

"@
}

####################################################################################################
# Script starts here
####################################################################################################

# Check for Usage Statement Request
if (($args.Count -gt 0) -and ($args[0] -imatch "-{1,2}[?h]"))
{
  # User wants the Usage Statement
  Usage
  return
}

# Check if user specified either the Register or UnRegister switches
if (Validate-Parameters)
{
  # Change to the bin directory where Exchange was installed.
  pushd $InstallPath;
  
  # Simply add necessary cmdlet  
  Remove-PSSnapin "Microsoft.Exchange.Management.PowerShell.Admin"
  Add-PSSnapin "Microsoft.Exchange.Management.PowerShell.Setup"
 
  if ($Register)
  {
    Write-Host "Now installing WSBExchange...";
    Register-WSBExchange
  }
  elseif ($UnRegister)
  {
    Write-Host "Now uninstalling WSBExchange...";
    UnRegister-WSBExchange
  }
  
  # Restore Exchange Powershell snapin
  Remove-PSSnapin "Microsoft.Exchange.Management.PowerShell.Setup"
  Add-PSSnapin "Microsoft.Exchange.Management.PowerShell.Admin"
}

Properties

Article ID: 979227 - Last Review: May 6, 2010 - Revision: 1.0
APPLIES TO
  • Microsoft Exchange Server 2007 Service Pack 2, when used with:
    • Microsoft Exchange Server 2007 Enterprise Edition
    • Microsoft Exchange Server 2007 Standard Edition
Keywords: 
kbsetup kbinstallation kbbackup kbexpertiseadvanced kbtshoot kbsurveynew kbprb KB979227

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com