HOWTO: Restoring MQIS from SQL Backup
ID: Q191535
|
The information in this article applies to:
-
Microsoft Message Queue Server version 1.0
SUMMARY
In Microsoft Message Queue Server (MSMQ), the Primary Enterprise Controller
(PEC), Primary Site Controller (PSC), and Backup Site Controller (BSC) can
be restored using a backup copy of the Message Queue Information Store
(MQIS) database. However, a backup copy of the MQIS must exist to retain a
previous MSMQ Enterprise configuration.
MORE INFORMATION
The MQIS database stores MSMQ Enterprise configuration information. No
messages are stored in the MQIS database. Backing up or recovering the MQIS
database will not recover messages that may have existed in queues.
Before you attempt to rebuild a PEC, PSC, or BSC, you should take note of the following very important facts:
- This document includes steps necessary for recovering an MQIS database on both SQL 6.5 and SQL 7.0. The procedures differ significantly. Please refer to the appropriate section for the version of SQL you have.
NOTE: An MQIS database backed up using SQL 6.5 CANNOT be recovered using SQL 7.0. An MQIS database backed up using SQL 7.0 CANNOT be recovered using SQL 6.5.
- All MSMQ computers retain a SiteID in the Registry. If you need to rebuild a PSC, and you must retain the PSC's previous Site configuration, you must restore this Registry Key. This step is necessary only for PSC's.
- It is not necessary to restore the MQIS if a BSC is rebuilt by reinstalling MSMQ as a BSC. The creation of the BSC MQIS is automatically replicated from the PSC it will support. The exception is when clients are configured to use a BSC as their primary server.
- SQL Server does not allow you to restore a backup of a database from another SQL Server with a different sort order. The default sort order configuration option for the retail versions of SQL Server is 51.
For additional information about creating a backup copy of the MQIS
database, please see the following article in the Microsoft Knowledge Base:
Q191536 Backing Up the MQIS Database
To rebuild PEC MQIS using SQL 6.5
NOTE: The procedure for recovering the MQIS for PECs, PSCs, and BSCs is the same. Each of these devices contains an exact copy of the PEC's MQIS database. A PEC can be recovered with a PSC's or BSC's database, and so forth. However, PSC's require an additional step to recover the SiteID entry in the registry.
You must first re-create the MQIS database and database device.
- Make sure there are no existing MQIS database files. In Windows Explorer locate the (by default) C:\Program Files\MSMQ folder. If there is a file named Mqisdata.dat and Mqislog.dat either rename it or move it to a temp folder.
- Open SQL Enterprise Manager, open the server, and then register the server if necessary. Right-click the Database Devices folder and then click New Device.
- In the Name field of the Create New Database Device dialog box, type MQISdata, enter the size (80 MB is default MQ size), and click Create Now. Repeat this step for the MQISlog, but in the Name field type MQISlog, enter the size (20 MB is default MQ log size), and click Create Now. Close the Create New Device dialog box. The MQIS should be restored into the C:\Program Files\MSMQ folder.
- Right-click the Databases folder in SQL Enterprise Manager and click New Database.
- In the New Database dialog box enter MQIS in the Name field, in the Database Device list click MQISdata, in the Log Device list click MQISlog, and then click Create Now. This will build the MQIS database ready for recovery from the database backup file.
- In SQL Enterprise Manager, on the Tools menu, click Backup\Restore and the Database Backup\Restore dialog box appears. Click the Restore tab and click From Device. Select the device you created when you backed up the MQIS database in the Devices and Files window. Select the backup file in the Backup information window, under the Database Device list, select MQIS, and click Restore Now.
You are now ready to re-install your MSMQ Server.
- Start the Windows NT 4.0 Option Pack Setup program and install MSMQ.
- In the Select MSMQ Device dialog box, click the MSMQ server type you are restoring, and click Continue.
- In the Enter Enterprise Name and Enter Enterprise Site fields enter the name of your Enterprise and Site name. (These entries are ignored when Setup detects the existing MQIS database.) Click Continue.
- The reinstallation of MSMQ begins and the progress is shown on the status bar. A dialog box appears stating that an MQIS database already exists. Click Modify Existing Database and then click Continue. MSMQ continues and the installation completes. Your MSMQ PEC And Enterprise configuration has now been recovered.
- If you have completely rebuilt the Operating System and are installing an MSMQ PEC, PSC, or BSC to a restored MQIS from scratch, and there are additional PSC's, BSC's in the Enterprise you must renew the Cryptographic Keys.
After setup is complete, open MSMQ Explorer and verify the configuration
information.
To rebuild PEC MQIS using SQL 7.0
NOTE: The procedure for recovering the MQIS for PECs, PSCs, and BSCs is the same. Each of these devices contains an exact copy of the PEC's MQIS database. A PEC can be recovered with a PSC's or BSC's database, and so forth. However, PSC's require an additional step to recover the SiteID entry in the registry.
NOTE: This procedure requires a copy of the Isql.exe file from SQL 6.5. This file can be found on the Option Pack CD with the sample copy of SQL 6.5 and on the NT Server Enterprise Edition CD2.
You must first re-create the MQIS database.
- Make sure there are no existing MQIS database files. In Windows Explorer locate the (by default) C:\Program Files\MSMQ folder. If there is a file named Mqisdata.dat and Mqislog.dat either rename it or move it to a temp folder.
- In Windows Explorer locate the C:\Program Files\MSMQ folder. If one does not exist, create it. This Path MUST be the same as your previous installation. MSMQ Setup checks for this path for a previous installation and MQIS database.
- Open SQL Enterprise Manager, open the server, register the server if necessary.
- In SQL Enterprise Manager, on the Tools menu, click Restore Database, the Restore Database window appears. On the General tab click the down arrow of the Restore as Database drop down listbox. If MQIS is listed select it, if it is not listed, type MQIS in all caps in the listbox.
- With Database selected in the Restore options; in Parameters, click on the Show backups of database dropdown listbox, select MQIS if it exists, verify the backup set date and path and click OK. The database will be restored and a message box will appear stating that "Restore of database 'MQIS' completed successfully". Proceed to Step 6. If MQIS does not appear in Show backups of database dropdown listbox; in the Restore options, select From Device, click Select Devices, in the Choose Restore Devices window, click Add. In the Choose Restore Destination window, select the Backup Device option and choose MQIS from the drop-down listbox (if you backed up the MQIS using another name, select it). Click OK. If you backed up your MQIS to the default SQL backup directory, C:\MSSQL7\BACKUP\MQIS.bak appears under Device Name in the Restore From section of the Choose Restore Devices window. Click OK. You be in the Restore Database window. Restore as Database should be MQIS, C:\MSSQL7\BACKUP\MQIS.BAK should appear in the Devices window. All other options should be left at default. Click OK. The database will be restored and a message box will appear stating that "Restore of database 'MQIS' completed successfully".
- In SQL Enterprise Manager under the selected server, open the Database folder. Verify that there is an MQIS database. Right-click on the MQIS database and select Properties, select the Options tab, if Single User box is selected, unselect it.
Replace the file Isql.exe in C:\MSSQL7\Binn with an Isql.exe from SQL 6.5 prior to running MSMQ Setup. MSMQ Setup of the MQIS database requires a feature that no longer exists in the SQL7 version of Isql.exe. After the MSMQ Server has been recovered, the SQL 6.5 version of Isql.exe can be replaced with the original Isql.exe from SQL 7. If Isql.exe is not replaced, step 6 will not allow the option of modifying the existing database.
- In C:\MSSQL7\Binn, copy Isql.exe to a temp folder.
- Copy Isql.exe from SQL 6.5 to the C:\MSSQL7\Binn folder, replace the existing file.
You are now ready to re-install your MSMQ Server.
- Start the Windows NT 4.0 Option Pack Setup program and install MSMQ.
- In the Select MSMQ Device dialog box, click the MSMQ server type you are restoring, and click Continue.
- In the Enter Enterprise Name and Enter Enterprise Site fields enter the name of your Enterprise and Site name. (These entries are ignored when Setup detects the existing MQIS database.) Click Continue.
- The reinstallation of MSMQ begins and the progress is shown on the status bar. Near the end, a dialog box appears stating that an MQIS database already exists. Click Modify Existing Database and then click Continue. MSMQ continues and the installation completes. Your MSMQ PEC And Enterprise configuration has now been recovered.
- After setup is complete, open MSMQ Explorer and verify the configuration information.
- Copy the SQL 7 version of Isql.exe from the temp folder back to C:\MSSQL7\Binn.
- If you have completely rebuilt the Operating System and are installing an MSMQ PEC, PSC, or BSC to a restored MQIS from scratch, and there are additional PSC's, BSC's in the Enterprise you must renew the Cryptographic Keys.
NOTE: Please note that the MQIS database stores MSMQ Enterprise
configuration information. No messages are stored in the MQIS database.
Backing up or recovering the MQIS database will not recover messages that
may have existed in queues. Queues on the failed machine may also need to
be re-created if the drive has been formatted or the queues have been
deleted.
Renewing Cryptographic Keys: (from Windows NT Option Pack release notes)
All MSMQ computers except dependent clients use cryptographic keys.
These cryptographic keys are used for various security operations in MSMQ.
Users can renew the cryptographic keys using MS Message Queue applet in Control Panel.
For independent clients and MSMQ routing servers, the only implication of renewing the cryptographic keys is that private (encrypted) messages, which were encrypted according to the previous keys and were then sent to the computer, are rejected. This happens until the new public keys are propagated to all MQIS servers and the sending computers start using the new public key.
If you renew the cryptographic keys for a PEC, the enterprise PSCs reject any MQIS replication messages sent from the PEC. If you renew the cryptographic keys for a PSC, all its BSCs reject any MQIS replication messages sent from the PSC. This problem occurs only if the MQIS servers are not configured for secure communication.
If you renew the cryptographic keys of an MQIS server and all your MQIS servers are not configured for secure communication, use the following procedure to correct the problem.
On the MQIS server that you change the cryptographic keys, click Start, click Run, and then type mqsrvkey newkey.key , where newkey.key is the output file name you want to use. The mqsrvkey command line utility is installed in the MSMQ folder by default (typically C:\Program Files\MSMQ). If you changed the cryptographic keys on a PEC, copy the file you created to each PSC. If you changed the cryptographic keys on a PSC, copy the file you created to each BSC. On each PSC or BSC to which you copied the file, run mqsrvkey and specify the name of the file you copied.
Additional query words:
MQIS backup recovery back up
Keywords :
Version : winnt:1.0
Platform : winnt
Issue type : kbhowto
|