Restoring IQ store data in a different location [CR #623585, CR #633738]

There is an incorrect procedure in Using Sybase IQ Multiplex > Backing Up and Restoring Data in a Multiplex Environment > Backing up and restoring data in a multiplex environment > Restoring in the multiplex environment. This is the corrected procedure (steps 5, 6, 7, and 8 differ from the original version):

StepsRestoring IQ store data when restoring database in different location

  1. Confirm that database home directories for each server still exist. If not, create them or restore them from file system backups.

  2. If this is not the first time you have restored to the new location, shut down all multiplex servers running at the destination location (coordinator and secondary servers). In Sybase Central, right-click the multiplex and use the Stop Server wizard. The wizard lets you stop one or more servers. The multiplex at the original location where the backup was taken may continue running.

    NoteIf automatic startup is enabled in your ODBC configuration, users on the same machine as the server may be set up to automatically start the server. Prevent this from happening while you are restoring the database.

  3. After stopping all servers, confirm that the database shut down successfully. If you see an active iqsrv15 process with the name of a multiplex server, stop the process.

    To verify on a UNIX system, use the ps command. For example:

    % ps -ef | grep iqsrv15 
    
    fiona 434     1  1   May 19 ?? 0:05 start_iq
    -n myhost_myserver 
    -c 32MB -x tcpip(port=1234) mpxdb.db
    fiona 4751   442  1 16:42:14 pts/5 
    0:00 grep start_iq
    

    To verify on a Windows system, use Task Manager. Look on the Processes tab for iqsrv15.exe or find the IQ Server icon in the system tray and stop it using right-click and Shutdown.

  4. Move files required for debugging and reconfiguring the multiplex.

    Make a file system copy of the .iqmsg file. If you have message log archiving configured, see “Backing up the right files,” in System Administration Guide: Volume 1.

  5. Shut down the original coordinator, then start the utility database from the coordinator server directory. You may specify any valid identifier as a server name except the name of a registered secondary server. If you use the name of the coordinator, use that name when restoring.

    % start_iq -n utility_startup_svr -c 32MB 
    -x tcpip(port=1234) 
    
  6. Connect to the utility database (utility_db):

    % dbisql -c "eng=utility_startup_svr;uid=DBA;pwd=SQL;
    dbn=utility_db" -host myhost -port 1234 
    
  7. Run the RESTORE command with a new location path for the database and supply a RENAME clause for dbspaces to move. For details, see the RESTORE statement in Reference: Statements and Options.

  8. Start the restored database with single-node and override flags (-iqmpx_sn 1 -iqmpx_ov 1).

    When creating a shadow multiplex (on the same network but in a different location), do not start the restored database with the coordinator server name if the original multiplex is running with that server name. Either use a unique server name or start the database with -DoBroadcast=NO.

  9. Use DROP MULTIPLEX SERVER statement to drop all the secondary nodes. For example, DROP MULTIPLEX SERVER node_w3_skm.

    Once you drop the last secondary node, the coordinator shuts down automatically, signifying conversion to simplex.

  10. Restart the coordinator without the single node or override switch.

  11. Re-create all the secondary nodes with the correct location path. For example:

    CREATE MULTIPLEX SERVER node_r2_skm DATABASE
    '/sunx3005/mpx_simdb.db'
    HOST 'localhost' PORT 8998
    ROLE READER STATUS INCLUDED
    

    After you create the first secondary node, the coordinator automatically shuts down, signifying conversion to multiplex.

    NoteIn the preceding command, you must include the database file extension .db.

  12. When you restart the coordinator, you see a warning in the server log about the multiplex environment being invalid. This warning is generated if IQ_SYSTEM_TEMP dbspace does not contain any files, and is the case for all the secondary nodes you created in step 12. Ignore this warning for now.

  13. Synchronize the secondary servers, following the instructions in “Synchronizing secondary servers” on page 30.

  14. Start the secondary servers.

  15. Connect to each secondary server and add files in IQ_SYSTEM_TEMP.

  16. Run sp_iqmpxvalidate on the coordinator. It should report no error detected.

To restore an exact copy of the multiplex to a different location, when copies of all of the server's temporary files exist at the new location, you replace steps 9 through 17 with:

Use ALTER MULTIPLEX SERVER to alter the server name, host, port, and database path of each server.