Restoring IQ Store Data When Restoring Database in a Different Location

Restore operations vary, depending on the location from which you restore.

Prerequisites
Task
  1. Shut down the original coordinator, then start the utility database from the coordinator server directory using the coordinator server’s name:
    % start_iq -n coordinator_svr -c 32MB 
    -x tcpip(port=1234) 
  2. Connect to the utility database (utility_db).
    % dbisql -c "eng=coordinator_svr;uid=DBA;pwd=SQL;
    dbn=utility_db" -host myhost -port 1234 
  3. Run the RESTORE command with a new location path for the database and its dbspaces. To restore certain dbspace files to a different path, specify a RENAME clause. Perform full and any incremental restore operations in sequence, without stopping the utility database.
    Warning!  Stopping the utility database between full and incremental restore operations may invalidate the catalog and render the restored database unusable.
  4. Start the restored database either by reconnecting to the utility_db server and specifying the restored database file name, or by stopping the server and restarting it with the restored database. If you restart the server, use the single-node and override flags (-iqmpx_sn 1 -iqmpx_ov 1).
  5. 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.

  6. Restart the coordinator without the single-node or override switch.
  7. Re-create all the secondary nodes with the correct location path, including the database file extension (.DB):
    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 server automatically shuts down, signifying conversion to multiplex.

  8. 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 7. Ignore this warning for now.
  9. Synchronize and restart the secondary servers.
  10. Connect to each secondary server and add files in IQ_SYSTEM_TEMP.
  11. 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, replace steps 5 through 11 with:

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

Related concepts
Before You Restore
Related reference
RESTORE DATABASE Statement
sp_iqdbspace Procedure