The SharePlex utilities help you configure, test, and manage the SharePlex environment.
Through the qview utility, you can view queue names and remove old queue files. The qview tools described here do not deactivate the configuration.
Warning! Do not use qview for the first time without the assistance of Quest Technical Support. If this utility is not used properly, it can damage the replication environment and require resynchronization and reactivation.
All SharePlex-supported databases on all supported platforms
Log on to the system as a SharePlex Administrator, and use the command line of the operating system to run qview from the bin sub-directory of the SharePlex product directory. The utility is an interactive command session.
To run qview on the Windows platform while the SharePlex service is running, log onto the system as the Administrator user. On Windows, there is only one Administrator user. Other users, whether or not they have Administrator privileges (members of Administrators group), cannot run qview. Other Windows users with Administrator privileges can run qview if the SharePlex service is shut down.
On Windows, run qview with the -p option to specify the port number of the SharePlex instance for which you want to view queues.
qview -pport list
The qview utility provides the following commands:
|list||Lists all queues for all active configurations on a system.|
|trim||Clean up obsolete subqueue files.|
|fullrb||Create a full rollback message.|
|otrans||Scans for a specified number of messages in the Capture queue.|
Use the list command to list all queues for all active configurations on a system.
The qview list command lists each queue, the replication process that writes to it, and the replication process that reads it. For example, for the capture queue, it lists the Capture process and the Read process. The queues are designated as follows:
In this example, the writer to the capture queue o.ora11+C is the Capture process, as indicated by the sp_ocap in its name string. The reader is the Read process, as indicated by the sp_ord in its name string. The same naming logic applies to the other queues shown in the output (export queue expdsg+X and post queue expdsg+P).
The following queues exist: o.ora11+C WRITER +PA+o.ora11+sp_ocap+o.ora11 READER +PR+o.ora11+sp_ordr+o.ora11 elliot+X WRITER +PR+o.ora11+sp_ordr+o.ora11 READER +PX+elliot+sp_xport+0x0a01014e (18.104.22.168) elliot+P+o.ora11-o.ora11 subqueues range from 2 to 6 WRITER +PI+elliot+sp_mport+0x0a01014e (22.214.171.124) READER +PP+elliot+sp_opst_mt+o.ora11-o.ora11
Use the trim command to clean up obsolete subqueue files on the source system.
The SharePlex post queue actually consists of a number of subqueues, each approximately corresponding to a user session on the source system. The Post process uses the subqueues to establish Oracle sessions for the target instance. The number of subqueues that exist at a given time on a target system reflects the peak activity on the source system since replication started.
SharePlex routinely writes replicated data from the subqueues to associated datafiles on disk as part of its checkpoint recovery system. Each subqueue can have one or more datafiles associated with it, each with a default size of 8 MB. If the entire 8 MB file size is not consumed, a datafile remains on the system even though the data was posted and read/released. Consequently, the higher the activity level on the source system, the more datafiles on disk. The size in megabytes (MB) for the post queue in a qstatus display is the actual disk space that the datafiles occupy.
For example, suppose there were 100 concurrent sessions on the source system, creating 100 subqueues in the post queue on the target system. And, suppose the datafiles were only partially full when the activity level dropped—half full, for example, or 4 MB of 8 MB used—and thus were not deleted. The post queue on that system would consist of 100 datafiles at 4 MB each, totalling 400 MB of disk space.
Using the trim command in qview, you can routinely eliminate obsolete subqueue files that were read-released, while preserving the ones containing data not yet committed to the target database. The trim command does not eliminate queue files for subqueues 0 or 1, because those are the most heavily used subqueues.
Run this command on the target system only.
Stop Import and Post before running qview to issue this command. You can leave sp_cop running.
Note: If one or both of those processes is not stopped, qview returns this error message: que_INUSE: Que is already open.
You can only trim one queue at a time. If there are more than one post queue, you are prompted to select the one you want the command to affect:
Queue zac+P+o.ora920-o.ora920 (y/n) <n>? n Queue elliot+P+o.ora920-o.ora920 (y/n) <n>? y
Note: If you do not select a queue, qview returns this error message: que_NOEXIST: Queue does not exist.
Use the otrans and fullrb commands to create a full rollback message.
Use the otrans command to scan a specified number of messages in the Capture queue, starting at the read release point. The qview utility then prints the transaction id, the number of operations (records), the DML type operation (if there is only one) and the object id modified (if there is only one).
Use the transaction id obtained from otrans to execute fullrb. The qview utility opens the Capture queue, writes an out-of-band full rollback message to the Capture queue, and then writes a commit.
Issue the otrans command.
vqiew> otrans 500000
The output is similar to the following:
Full rollback 8(7).752562-3(139) --- 99999 Update operations on object id 466857 Open transaction 8(23).752700-2(14162) --- 2001 Update operations (1000 backward operations) on object id 466857
Issue the fullrb command using the transaction ID from the otrans output.
vqiew> fullrb 8(7).752562-3(139)
The output is similar to the following:
Current queue o.ora920+C user +PA+o.ora920+sp_ocap+o.ora920 Full rollback record written to capture queue at 378744, id 1102 odr_magic 0x4f445235 odr_op ODR_FULL_ROLLBACK (50) odr_trans 8(7).752562-3(139) odr_time 01/01/88 00:00:00 (0)
sp_ctrl> start capture
where: number is the number of messages to scan in the queue.
where: transaction_ID is the transaction ID that was returned from otrans.
Use the socket_test utility to debug networking and firewall issues for the Compare/Repair feature. If the socket_test utility is successful, there are no network or firewall issues to prevent the source and target from communicating.
This section explains how to use this utility in an environment configured with Network Address Translation (NAT). NAT enables a local-area network (LAN) to use one set of IP addresses for private internal traffic and another set of addresses for public external traffic. NAT acts as a bridge and an interpreter between the two networks, for example a private LAN and the public Internet, or a secure network and an insecure network.
To determine whether your system is using NAT, execute nslookup from the source machine, and then again from the target machines. Use the same host name for all tests. If the results reflect different values, then it is likely that the systems are working in a NAT configured environment.
The socket_test utility is in the util sub-directory of the SharePlex product directory. There are two components: a server component and a client component.
All databases supported on UNIX and Linux
On the source machine, use the following syntax to execute socket_test with the server option to run the server component.
$ proddir/util/socket_test server
The utility displays platform information, the host name, the host IP address and the port number as shown in the following example. The server remains in a waiting state until the socket_test client component (step 2) connects to it.
socket_test - version: 1.2 HP-UX irvqasuf B.11.11 U 9000/800 1141089608 unlimited-user license Program executing as server..., Thu Mar 9 19:58:22 2006 SP_SYS_HOST_NAME was not set. server host name: irvqasuf server IP: 10.1.0.146 Port Number: 57370
On the target machine, use the following syntax to execute socket_test with the client option to run the client component. Provide the NAT IP address of the source machine and the port number issued by the socket_test server test in the previous step.
$ proddir/util/socket_test client IP_address
If the test is successful, two things happen:
socket_test - version: 1.2 SunOS irvlabu01 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Fire-880 Program executing as client..., Thu Mar 9 19:52:40 2006 SP_SYS_HOST_NAME was not set. client host name: irvlabu01 client IP: 10.1.0.36 Client is try to connect to..... Server Host: 10.1.0.146 Server Port: 57370 rb(512):ReadWriteCnt = 0, readCnt=0, readBytes=0, writeCnt=0, writeBytes=0re:ReadWriteCnt = 1, readCnt=1, totalRBytes=512, writeCnt=0, totalWBytes=0 -m,0,0,-s,0,-l,10000000,-t,0,-r,0,-o,0,-x,0,0,0,0,0,0, SUCCESSFULLY read/write messages from server CE:ReadWriteCnt = 1, readCnt=1, totalRBytes=512, writeCnt=0, totalWBytes=0 Client completed successfully, Thu Mar 9 19:52:40 2006 Program exiting..., Thu Mar 9 19:52:40 2006
Connected to client WB(512):ReadWriteCnt = 0, readCnt=0, readBytes=0, writeCnt=0, writeBytes=0 WE:ReadWriteCnt = 1, readCnt=0, totalRBytes=0, writeCnt=1, totalWBytes=512 SE:ReadWriteCnt = 1, readCnt=0, totalRBytes=0, writeCnt=1, totalWBytes=512 Server completed successfully, Thu Mar 9 20:00:07 2006 Program exiting..., Thu Mar 9 20:00:07 2006
If the test is not successful, the utility displays error messages as in the following example, and the socket_test server remains in a waiting state.
socket_test - version: 1.2 SunOS irvlabu01 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Fire-880 Program executing as client..., Thu Mar 9 20:02:26 2006 SP_SYS_HOST_NAME was not set. client host name: irvlabu01 client IP: 10.1.0.36 Client is try to connect to..... Server Host: 10.1.0.146 Server Port: 57370 Error calling connect in connect_to_server Error 146: Connection refused Error 146 calling connect_to_server CE:ReadWriteCnt = 0, readCnt=0, totalRBytes=0, writeCnt=0, totalWBytes=0 Error in client, Thu Mar 9 20:02:26 2006
If the socket test fails, execute the Ctrl-C command on the source machine to exit out of the socket_test server.
Use the sp-bininfo utility to verify that a new release of SharePlex includes past one-off builds of SharePlex that you received from Support between GA releases.
The output shows the following for each one-off that is installed for your current version of SharePlex:
Figure 2: Sample sp-bininfo output
(6) sp_ocap: build 171 of SharePlex_Oracle (ONEOFF-CR123456-CR654321-CR789102-oracle110) 8.6.3 for rh-40-amd64 by jdoe Shareplex shared lib(s): libspwildcard.so.126.96.36.199 libsporacle.so.188.8.131.52 libsporalog.so.184.108.40.206 libspshareplex.so.220.127.116.11 libspspo.uname.so.18.104.22.168 libspdb.so.22.214.171.124 libspodb.so.126.96.36.199 libspspo.typecheck.so.188.8.131.52 libspcore.so.184.108.40.206 libspext.so.220.127.116.11 libspspo.memory.impl.so.18.104.22.168 libspspo.memory.stub.so.22.214.171.124 libspspo.shim.so.126.96.36.199 libspspymdb.so.188.8.131.52
Linux and Unix
Run the sp-bininfo utility from the util subdirectory of the product directory of your current SharePlex installation.
$ cd path_to_SharePlex_proddir/util