There may be circumstances requiring that you move the site database or software metering database to another SQL Server computer. For example, there might be a plan to move the SMS databases to a more powerful SQL Server computer to accommodate network growth. There are two ways to move the SMS databases:
Before moving the databases to another SQL Server computer, make sure that the following preliminary tasks are completed:
Make sure the same database sort order is used, or the database restore will fail. Also make sure the new SQL Server uses the same hardware platform as the previous SQL Server. For example, do not move SQL Server from an x86 computer to an Alpha computer.
After all the preparatory steps are completed, the following tasks are used to move the SMS databases to a different SQL Server computer:
Figure 13-6. The Systems Management Server Setup Wizard Database Modification window.
Moving the site database is a simple process of backing up and restoring the database, as discussed earlier in this lesson. For a SQL Server computer configured differently than the original database server, the process of resetting the database configuration in SMS setup modifies the SQL Server to support the site database. This reconfiguration is necessary because the site database server stores configuration data in the registry, then reads the site control file. Therefore, it is important to save more than the database devices to fully recover a failed site database server.
The SMS database is uniquely tied to several SMS files. The backup of the database should coincide with saving the SMS registry key, the network abstraction layer (NAL) registry key, the master site control file, and the SMS directory on the site server.
If the database needs to be restored, and these SMS files are not also restored, the old database may not reflect the newer registry settings or the site configuration. For example, if a logon point has been added since the last database backup, the new logon point will not be recognized in the restored database.
When you run the `site modify or reset' operation from SMS Setup, it resynchronizes the database, the registry, and the site control file.
Key files include registry keys, the site control file, and the SMS directory.
SMS Registry Key
Using the registry editor, export the following registry keys on the site server to a file:
The SERVICES registry key should be part of the backup, but will not need to be restored if the services are not reconfigured since the last backup.
For more detailed information about the Windows NT Registry Editor, see the Windows NT documentation.
Site Control File
The Sitectrl.ct0 file is located in the smsdir\INBOXES\SITECTRL.BOX directory on the site server.
Site Server SMS Directory
The SMS directory contains items that are used to maintain the site and the SMS components. It also contains files such as 16-bit client computer inventory history (used by Inventory Processor to report changes to the client computer inventory), error history (used by SMS services to report status on a specific event), trace logs, compressed packages, and pending send requests.
Many of the files in the SMS installation directory are never modified between backups; the executable files in the smsdir\BIN\platform directory are good examples. You may want to pick and choose which files in the SMS installation directory to back up, depending upon your needs.
Naming the Backup Components
Decide on a naming convention for the backup files that incorporates the site code. This makes it easier to back up several sites and keep file naming unique for each site. The following table contains suggested naming conventions for the components to be backed up, with xxx being the site code.
|Name of item||File Name|
|Site control file||Sitectrl.xxx|
|SMS registry key||Smsreg.xxx|
|Site server SMS directory||SiteInstallDir.xxx|
As seen in the table, the name of the backup directory includes the date of the backup.
Consider using an automated backup system or the Backup SMS Site Server task to back up all critical computer data rather than individually backing up each SMS component.
Make sure that SMS services are stopped on the site server and any component servers. In addition, make sure any SMS Administrator consoles connected to the site are closed.
SMS Database Restore
Use SQL Server Enterprise Manager to restore the database and any transaction logs. Also, if you need to restore the database because you had to reinstall SQL Server, consider restoring the master database as well. The master database has the original settings and options.
SMS File and Registry Key Restore
If it is necessary to restore the site database, it may also be necessary to restore the site control file and registry keys included in the backup. This is required if a site's configuration has changed since the last SMS backup. If you restore a database that is older than the configuration of the site server, the site server's registry may reflect changes made after the database was backed up. In this case, there will be inconsistency in the site.
For example, if distribution points have been added to the site after the last backup, they will not show up in the SMS Administrator console, but they will appear in the registry of the site server. Following are the registry keys that must be restored:
Registry keys can be restored by running Regedt32.exe and then selecting Restore from the Registry menu. Then load the backed-up SMS registry keys.
SMS Installation Directory
If necessary, restore the site server's SMS installation directory. Restoring this directory produces a smoother recovery because it contains inventory history files, any collected files, and trace logs, as well as the master site control file.
If the original SMS directory is not restored, remember to reapply all SMS service packs and copy the backup of the master site control file to \smsdir\INBOXES\SITECTRL.BOX\SITECTRL.CT0.
If there is no backup of the site control file, generate a new one from the database by using Preinst.exe (located on the SMS installation CD-ROM in the SUPPORT\RESKIT\BIN\platform\DBMAINT directory). There is no need to copy PREINST.EXE to a local fixed disk, as it regenerates a site control file on the root of the partition containing smsdir when running the following command:
The site control file generated by PREINST is named SMS_xxx.SCF. The xxx in the prefix is the site code for the site. Rename the SMS_xxx.SCF file for the site you are backing up to SITECTRL.CT0.
Use SMS setup to reset SMS to use the new database, if there were any changes in the computer name, server configuration, or mandatory accounts since SMS was reinstalled.
Running the SMS setup 'Modify or reset the current installation' option resets the site. As a result the following activities take place:
If both the site database server and the site server fail, and need to be replaced, the process for replacement is similar to restoring a site database server. However, in this case you also need to reinstall SMS. Care must be taken to duplicate the original site server configuration.
If the site server or SQL Server fails, services on the other site systems and client computers will continue to run. Client computers continue to report inventory, run advertised programs, and meter software. However, data and status messages from these activities will not be updated if the site server is not running.
The key to recovering an SMS site server is to back up site information on a regular schedule, as discussed earlier.
Assuming that the original site database server must be replaced and that the site server must be reinstalled, you must have at minimum:
These three items are the minimum requirement for a complete restoration of a damaged primary site server.
Consider using disk fault tolerance to protect the data on the site server. Using disk fault tolerance will reduce the chance of site server failure.
Before the original site server is reinstalled, make sure that all traces of the previous SMS installation are removed from the site server. This is not necessary if a new computer will be used as the site server. Make sure the following files are deleted:
It may be necessary to clean out previous registry control sets on the site server as well, because they may contain an SMS registry key.
Before reinstalling SMS, make sure the following tasks have been completed:
If you reinstall SMS on a new computer, it must use the same computer name, domain name, and processor type as the original computer. It is not possible to reinstall an x86 SMS site on an Alpha-based computer. Likewise, it is not possible to move an x86 site server to an Alpha-based computer.
Because the site database stores drive and directory information, use the same drive and directory name for the SMS installation.
When SMS is reinstalled, it creates a new site database and, optionally, a new software metering database. Therefore, restoring to a new installation of SMS is a bit different than simply restoring the database into new devices created in SQL Server.
In the case of SQL Server version 6.5, make sure the devices and the transaction logs that will be used by the databases are large enough to accommodate the database and transaction log restores. The devices and log files in SQL Server version 6.5 and the database files in SQL Server version 7.0 are configured to the appropriate size in SQL Server Enterprise Manager or through Transact-SQL commands. In SQL Server version 7.0, consider configuring the database files for automatic file growth.
For information on how to run a restore in SQL Server Enterprise Manager, refer to SQL Server Books Online.
It is not necessary to back up the SMS directory structure for a logon point, distribution point, CAP, or software metering server. The site server will rebuild a logon point, CAP, or software metering server that has failed. A distribution point will receive a new set of packages when distribution points are updated or refreshed. To find out which packages should be on a particular distribution point, view the Package Status system, as shown in Figure 13-7.
Figure 13-7. Viewing the Package Status system in the SMS Administrator console.
Logon points, CAPs, software metering servers, and distribution points are easily restored by SMS.