The following procedure replaces “Restoring the multiplex,” in Chapter 14, Sybase IQ System Administration Guide.
To restore the multiplex, you must first restore the Catalog Store and IQ Store, then restore any IQ Local Store(s) on query servers.
Confirm with Technical Support that a restore operation is needed.
If you have trouble opening your database on a query server, try doing a synchronize operation first. For details, see “Synchronizing Query Servers in Chapter 5, “Working with Database Objects,” Sybase IQ System Administration Guide.
Confirm that database home directories for each server still exist. If not, create them or restore them from file system backups:
Shut down every server in the multiplex (write server and query servers) using the Stop Multiplex command in Sybase Central.
If automatic start-up is enabled in your ODBC configuration, users on the same machine as the server may be able to start the server automatically and you will need to prevent this from happening while you are restoring the database.
After stopping all servers, verify that the database shut down successfully. If you see an active asiqsrv12 process with the server name of a server in the multiplex (in a start-up parameter) you should stop it.
To verify on a UNIX system, use the ps command. For example:
% ps -ef | grep asiqsrv12
fiona 434 1 1 May 19 ?? 0:05 asiqsrv12 -n myhost_myserver -c 32MB -x tcpip(port=1234) mpxdb.db fiona 4751 442 1 16:42:14 pts/5 0:00 grep asiqsrv12
To verify on a Windows system, use Task Manager. Look on the Processes tab for asiqsrv12.exe or find the IQ Server icon in the system tray and stop it using right-click and Shutdown.
Move files required for debugging and reconfiguring the multiplex.
Make a file system copy of the .iqmsg file.
On each server, preserve any dbname.iqtmp dbspace files, to reconfigure the multiplex. If the IQ Temporary store is damaged, use the start the server with the -iqnotemp switch to drop and recreate the temporary store dbspaces. For more information, see Sybase IQ Release Bulletin.
Delete the following files from the write server:
<database_home>/<dbname>.db
<database_home/<dbname>.log
If a query server is damaged, however, drop it and re-add it after RESTORE but do not synchronize it.
Start the utility database from the write server directory using the write server’s server name:
% start_asiq -n Alcott_Server1 -c 32MB -x tcpip(port=1234)
To restore the database to a different home directory or a different machine from the one that created the backup, you must start the utility database using the multiplex override switch (-iqmpx_ov)
Connect to the utility database (utility_db).
% dbisql -c "eng=Alcott_Server1;uid=DBA;pwd=SQL;dbn=utility_db"
Run the RESTORE command. Moving the database (restoring to a different machine) requires the RENAME clause. For details, see the Sybase IQ Reference Manual.
Shut down the write server.
Make sure that the temporary dbspaces exist as before, on raw devices or as files of the correct length. See “Backing up the IQ Store and Catalog Store,” Sybase IQ System Administration Guide. For information on starting without the IQ Temporary Store, see Sybase IQ Release Bulletin.
Start the write server and, if restoring to the same location, synchronize the multiplex. For more information, see “Synchronizing query servers,” in Chapter 5, “Working with Database Objects,” Sybase IQ System Administration Guide. When restoring to a new location, you must start the write server using the multiplex override switch (-iqmpx_ov 1), and you must not synchronize.
If restoring to a new location, you must connect to the write server using Interactive SQL (not Sybase Central) and drop the query servers after starting the multiplex. This removes the absolute paths to query servers in their former locations from the system tables. (If you do not know the names of the query servers, open the Multiplex container in Sybase Central to list them. Ignore any warnings that occur in this situation.)
To remove each query server, run the sp_iqmpxdropqueryserver stored procedure in DBISQL or DBISQLC for each query server. For example, to drop a query server named iqmpx_qs, enter:
sp_iqmpxdropqueryserver ('iqmpx_qs')
If you wish to make the database multiplex, you may create new query server(s).