Converting Simplex Databases To Multiplex
Converting Simplex Databases To Multiplex
To change a simplex database to a multiplex, you simply connect to the simplex database and add a
multiplex server. The simplex database server becomes the coordinator and the servers you add are
called the secondary servers. You may use Sybase Central or Interactive SQL statements to create
multiplex servers.
5. In Interactive SQL, run the CREATE MULTIPLEX SERVER command, for example:
6. CREATE MULTIPLEX SERVER mpxnode_w1 DATABASE 'host2/mpx/mpxtest.db'
HOST 'host2' PORT 2957 ROLE WRITER STATUS INCLUDED
10. Back up the catalog store to the directory where the secondary server will run. From the
secondary node machine, run this backup command from the computer where the secondary node
will run, because the .DB file should be on a local disk. For example, run the following command from
the directory where the secondary node’s .DB file resides:
11. dbbackup -y -d -c
"uid=DBA;pwd=sql;links=tcpip{port=2763};eng=mpxnode_c" .
If you have changed to the directory where the secondary node’s .DB file will reside, you can specify
a dot (.) instead of the path on the dbbackup command.
12. Make sure that you remove the transaction log files in the directory where the secondary
server will run:
13. rm -rf mpxtest.log
18. Start Interactive SQL and connect to the secondary multiplex node.
19. dbisql -c "uid=DBA;pwd=sql;eng=mpxnode_w1;links=tcpip{port=2957}"
20. Add the temporary dbfile in Interactive SQL using the ALTER DBSPACE statement.
(Secondary servers do not allow CREATE DBSPACE.) For example:
21. ALTER DBSPACE IQ_SYSTEM_TEMP ADD FILE mpxnode_w1_temp
'w1_temp1.iqtmp' SIZE 500
Starting the server creates a message log for you, but you must create the temporary store file
yourself. You must connect to the secondary server to add a temp store file for that server. Adding
temporary store files in multiplex always adds a file specifically to the server to which you are
connected.You can start the server, but cannot run IQ queries until a temporary store is added.
For command reference details, see the ALTER DBSPACE statement in Chapter 1, “SQL
Statements,” in Reference: Statements and Options.