Recovering the SMS Site

[Previous] [Next]

Recovery of an SMS site generally falls into two categories: recovering the site database and recovering the site server. If the SMS database fails for some reason, you can restore it from its backup using SQL Server Enterprise Manager. You need to have access to a current backup, of course, as well as to the SQL Server Enterprise Manager interface. There is no restore function in SMS because, presumably, if you need to restore the site in some fashion, you probably cannot open the SMS Administrator Console.

Recovering the Site Database

Recovering the SMS database itself is a fairly straightforward task—which is not to imply that it is a mundane or trivial matter, but rather that it is cut and dried. You recover the site database by restoring it from a current backup. For example, if you need to move the SMS database to another SQL server for some reason, you would follow these steps:

  1. Close all SMS-related tools, such as all SMS Administrator Consoles, that are accessing the current database, as well as all SMS site server services (including the SQL Monitor service on the SQL server). You don't want anything trying to update the database while you are managing it.
  2. Start SQL Server in single-user mode and back up the SMS database, or schedule a database backup through the SMS Administrator Console. The single-user mode option is set through the Properties window for the database accessible through the SQL Server Enterprise Manager.
  3. Locate (or install) the other SQL server, ensuring that the same database sort order has been used as on the original SQL server, as well as the same hardware platform.
  4. Create database and log devices or files (depending on the SQL Server version) that are at least as large as the backed up database.
  5. Restore the backed up SMS database to the new SQL server.
  6. Use the Reset option of the SMS Setup program on the site server to point the site server to the location of the new SQL server and the database.

You would follow similar steps if the database needed to be restored for any other reason, although if you were restoring to the same SQL server, you might not need to perform step 6.

Recovering the Site Server

If you encounter a situation in which the SMS site server itself needs to be recovered—perhaps it crashed or it had be moved to a different physical computer—the steps for recovery are somewhat more involved. First of all, your situation would probably be hopeless if you had not already created a current backup of your SMS database, so let's assume that you have been backing it up regularly.

As we've seen, other significant elements of the site server in addition to the SMS database need to be backed up in order to completely restore the site server to its previous state. These elements include the SMS and NAL registry keys, the site control file (\SMS\Inboxes\Sitectrl.box\Sitectrl.ct0), and the SMS directory structure and files.

The recovery process begins with the restoration of the SMS site database of course. However, it will also involve the restoration of the backed up elements. For example, if you need to reinstall SMS on the site server or install it on a new computer, you will restore the previous site by copying the backed up SMS directory and site control file over the new install or over the reinstall. Similarly, you can restore the SMS-related registry keys by using the Windows NT Registry Editor to replace the existing SMS keys (created when you reinstalled SMS or installed it to a new server) with the backed up versions of those keys.

You could restore just the database itself and let the SMS site server rebuild itself—which it will do eventually. However, any changes you made that were written to the registry but not yet updated to the database will probably be lost. Restoring the SMS site server completely, as described here, will ensure that all elements of the site server are properly synchronized.

NOTE
If you need to completely reinstall the SMS site server, all vestiges of the old site server must be cleaned off the server first. This includes uninstalling the SMS client software, removing the registry keys, and removing the remainder of the SMS directories and setup files not removed through the Remove SMS option of the Setup program. Then reinstall SMS, and restore the previous site as outlined above.

REAL WORLD  Using Preinst.exe

As you've seen throughout this book, the Microsoft BackOffice 4.5 Resource Kit, available through Microsoft Press, includes several useful tools designed to facilitate your administration of the SMS site. Pertinent to this chapter's discussion is the Site Utilities tool (Preinst.exe). This tool must be installed on a site server and is used to help diagnose problems, repair the site control file, delete incorrectly removed sites, or stop SMS site server services, among other things.

You'll find a complete explanation of the many functions of this tool in the Microsoft Systems Management Server 2.0 Resource Guide, one of the four volumes in the Microsoft BackOffice 4.5 Resource Kit. Let's look at three of this tool's command-line options here that can be of particular use in the SMS site server recovery and maintenance process: /DUMP, /DELSITE, and /DELJOB. You can run this Windows NT command-line tool through the SMS 2.0 Resource Kit Tools Management Console created when you install the Microsoft BackOffice 4.5 Resource Kit or by changing the path to the appropriate directory through a Windows NT command window and executing the tool.

Executing the PREINST /DUMP command causes a new site control image to be written to the root of the partition on which SMS was installed, shown in Figure 17-12. An image is a binary representation of the site control file. This image is based on the current site control data stored in the SMS database and is named SMS_sitecode.scf. This file can then be copied to the Site Control Manager's inbox (SMS\Inboxes\Sitectrl.box) and renamed Sitectrl.ct0 to rebuild the site's properties. This function is useful if the site control file becomes corrupted or if you do not have a current backup of it.

click to view at full size.

Figure 17-12. Sample site control binary image written by PREINST /DUMP.

PREINST /DELSITE can be used to remove a "phantom" child site. When a child site is to be removed from a parent site, the correct process is to break the parent-child relationship through the child site's properties, wait for the parent and child sites to update their respective databases, and then remove the addresses. A phantom child site occurs if the child site is removed from the parent site before the relationship has been broken or before the databases can be correctly updated, and references to the deleted child site may remain at the parent.

To delete the removed site from the parent site, execute PREINST /DELSITE: {childsitecode, parentsitecode}, where childsitecode represents the site code of the site that needs to be deleted and parentsitecode represents the parent's site code for the site that needs to be deleted. Once executed, the change will be replicated up the SMS site hierarchy.

Last, PREINST /DELJOB is designed to remove jobs or commands targeted to a specific site. This command can be used to remove jobs that may still be in the queue for the removed site but keep trying to be sent or executed, resulting in error status messages. Executing PREINST /DELJOB:sitecode will delete all commands that are targeting the specified site code.



Microsoft Systems Management Server 2.0 Administrator's Companion
Microsoft Systems Management Server 2.0 Administrators Companion (IT-Administrators Companion)
ISBN: 0735608342
EAN: 2147483647
Year: 1999
Pages: 167

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net