次の方法で共有


W2K8 COM+ Catalog Backup & Restore

In very rare conditions in the past, it may have been necessary to take steps to rebuild the COM+ catalog. In Windows 2003, for example, this was performed by walking through Add / Remove Windows Components, however, in Windows 2008, this is no longer an option.

Instead, we now need to us the ICOMAdminCatalog interface, which provides two methods ( among others ): one to save a backup of the current catalog and another to restore a previous backup. These two methods are:

RestoreREGDB

BackupREGDB

*** It is very important to note, however, that restoring a COM+ catalog should be a last step effort to rememdy an issue, as restoring the catalog does not effect any settings / data that is kept in the registry ( such as COM+ applications that run as a service ), entires in Active Directory for queue components, or anything else not stored in the catalog! ***

 

Here is a very simple script sample that will create a backup of the current catalog ( ex. save as C:\backupcom.vbs ):

     Dim objComCatalog

Set objComCatalog = CreateObject("COMAdmin.COMAdminCatalog")
objComCatalog.BackupREGDB "C:\my_com_catalog.clb"

Set objComCatalog = Nothing

 

Here is another sample that will restore a previously saved catalog ( ex. save as C:\restorecom.vbs ):

     Dim objComCatalog

Set objComCatalog = CreateObject("COMAdmin.COMAdminCatalog")
objComCatalog.RestoreREGDB "C:\my_com_catalog.clb"

Set objComCatalog = Nothing

 

In order to run any of the sample scripts, simply use cscript.exe from a command prompt as an Administrator ( start -> run, cmd.exe, then enter cscript.exe C:\restorecom.vbs or cscript.exe C:\backupcom.vbs ).

 

What if I don't have a prior backup and need to restore a COM+ catalog?

In the event that you need to restore a COM+ catalog but do not currently have a back up, you may try to restore the first catalog that was used on the system. In order to do this, simply copy the catalog to a 'simple' path, either from installation media or the server ( dir /s %windir%\WinSxs\*.clb, look for R000000000001.clb ):

ex. copy %windir%\WinSxs\R000000000001.clb C:\R000000000001.clb

Now change the file name in the sample restore script to R000000000001 and execute as mentioned above, then reboot.

* Note, that after restoring a COM+ catalog, the server should be rebooted for the change to take effect.

Comments

  • Anonymous
    October 23, 2013
    The comment has been removed