Tchater maintenant avec le support
Tchattez avec un ingénieur du support

SharePlex 11.0 - SharePlex Reference Guide

About this guide Conventions used in this guide Revision History SharePlex Commands for Oracle SharePlex Commands for PostgreSQL SharePlex parameters General SharePlex utilities Database Setup utilities Oracle Cloud Infrastructure SharePlex environment variables

provision

Provision

Description

Use the provision utility to change a host name or IP address in the SharePlex configuration.

The SharePlex processes rely on the host names or IP addresses of the source and target machines to route data properly. The provision utility enables you to change host names or IP addresses within an active SharePlex instance, without reactivating a new configuration.

Note: The provision utility does not change anything in the database. It only affects SharePlex internal objects.

Supported databases

All databases supported by SharePlex on all supported platforms

Guidelines for using provision

  • provision is only valid for SharePlex version 6.1.1 and above.
  • (SharePlex 7.0.2 only) If provision is being used because the host name of a machine changed, contact Quest Support to request a new license. Otherwise SharePlex will not start after the change.
  • (SharePlex 7.0.2 only) Add the following parameter to the param-defaults file before you run provision:

    SP_CFP_DEBUG I live int() 0x00000000

  • If running SharePlex on an AIX machine, set EXTSHM before running provision.

    export EXTSHM=ON

  • Run provision on all of the machines in the SharePlex configuration. Each machine can reference the IP addresses of all the other machines.

Run provision

  1. Stop sp_cop. If sp_cop is running, provision will fail.

Note: provision prevents sp_cop from being started while it is running.

  1. Using the command line of the operating system, run provision from the SharePlex util sub-directory of productdir with the following syntax:

    provision -f old_name[:old_ipaddress] -t new_name[:new_ipaddress] [-p port] [-n]

    provision -h <new hostid> [-p <port>] -n
    provision -i [-p <port>]
    Argument Input
    -f old_hostname[:old_ipaddress]
    • -f is required and represents "from."
    • old_hostname is the old (current) host name.
    • old_IPaddress is the old IP address. Use if the IP address cannot be obtained from the network.
    -t new_hostname[:new_ipaddress]
    • -t is required and represents "to."
    • new_hostname is the new host name.
    • new_IPaddress is the new IP address. Use if the IP address cannot be obtained from the network.
    -p port

    For Windows systems, specifies the port of the SharePlex instance for which provision is being run.

    (You can run the "-p" port provision only on the Windows system.)

    -n

    Runs provision without actually making any changes. Generates a report on the changes that provision will make.

    Important! The best practice is to run provision with -n first, to make certain you agree with the potential changes, then run it without -n to make the changes.

    -h new_hostID
    • -h is required and represents changing host ID or replacing host ID
    • new_hostid is the new IP address
    -i -i is required and represents host information
    Example:

    provision -f oldname -t newname -n

    provision -h newid -n

    provision -i

  2. View the event log to view every change that was made. If the provision run fails or you do not agree with the changes that were made, you can undo them by running the undo_provision script. See Undo changes made by provision .

Undo changes made by provision

The provision utility creates an undo_provision script that can be used to restore the host names and IP addresses to their previous state. Run the undo_provision script from the util subdirectory of the SharePlex product directory. There are no input arguments to this script.

Known issues

The following may occur but do not affect the integrity of the replication environment:

  • The provision utility does not change the active configuration file. This means that the configuration file no longer represents the current state of replication after provision is run. If you need to run the compare config command, or if you decide to reactivate the configuration, update the host name or IP address in the configuration file first.
  • If an Export or Import error occurred when SharePlex connected to a machine before the name or address was changed, the error status persists and cannot be cleared.
  • If the new or changed machine is a source machine, provision generates new routing information, but the Read process may still have the old routing in its cache. When you start sp_cop, Read might generate a warning that the stored IP address does not match the one for the machine. You can ignore this error.
  • After provision is run for a source host, it might not update the "hostname" column in SHAREPLEX_ACTID table with the new host name details. If that column is not correctly updated, you must update the SHAREPLEX_ACTID table manually to specify the new host name. This is only required if the name change affected a source machine.

qview

Description

Through the qview utility, you can view queue names and remove old queue files. The qview tools described here do not deactivate the configuration.

IMPORTANT!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.

Supported databases

All SharePlex-supported databases on all supported platforms

Run qview

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.

Overview of qview commands

The qview utility provides the following commands:

Command Description
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.

List queues

Use the list command to list all queues for all active configurations on a system.

Description

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:

  • A capture queue is designated with a +C.
  • An export queue is designated with a +X.
  • A post queue is designated with a +P.
Example output:

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 (11.1.1.78)
elliot+P+o.ora11-o.ora11
subqueues range from 2 to 6
	WRITER +PI+elliot+sp_mport+0x0a01014e (11.1.1.78)
	READER +PP+elliot+sp_opst_mt+o.ora11-o.ora11

Syntax

list

Trim obsolete subqueues

Use the trim command to clean up obsolete subqueue files on the source system.

Description

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.

How to run this command

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.

Syntax

trim

Execute a full rollback

Use the otrans and fullrb commands to create a full rollback message.

Description

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.

How to run this command

Perform the follwing steps to to run Qview:

  1. Stop Capture.
  2. Run qview.
  3. 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
  4. 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)
  5. Start Capture.

    sp_ctrl> start capture

Syntax

otrans number

where: number is the number of messages to scan in the queue.

fullrb transaction_ID

where: transaction_ID is the transaction ID that was returned from otrans.

show_scn

Use the show_scn utility to view the correct Oracle SCN values to supply with the following commands during a Resume Replication recovery procedure:

  • activate config config_name scn=scn_value
  • reconcile queue queue_name for datasource-datadest scn scn_value

Supported databases

Oracle source and target

Run show_scn

The show_scn utility is run during the Resume Replication procedure after the source, target or both have failed. To use Resume Replication and the show_scn utility, there must be the following in place at the onset of replication:

  • A disaster recovery (DR) solution that provides a physically identical copy of the production source instance and another physical copy of the production target instance. Methods such as Oracle Data Guard or disk mirroring, tape backups and other methods support this requirement.
  • The SP_OPO_UPDATE_SCN parameter must be set to a value of 1. This parameter directs SharePlex to keep a record of the SCNs of the transactions that it processes. When you set this parameter to 1, it also disables the Post Enhanced Performance feature.

IMPORTANT: For more information about how to use show_scn in context, see "Resume replication after failure and recovery" in the SharePlex Administration Guide.

To run show_scn:

From the command line of the target system, run the show_scn utility from the bin subdirectory of the SharePlex product directory. For datasource, use the ORACLE_SID of the source database.

$ /productdir/bin/show_scn datasource

Output

The utility provides output similar to the following:

$> show_scn o.ora112

On source activate to scn=510012416

For resume replication from ora112

reconcile queue sp01 for o.ora112-o.ora112 scn 4517993781

reconcile queue sp02 for o.ora112-o.ora112 scn 4517994532

reconcile queue sp03 for o.ora112-o.ora112 scn 4517995633

socket_test

Description

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.

Supported databases

All databases supported on UNIX and Linux

Run socket_test

Perform the follwing steps to run socket_test:

  1. 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.

  2. 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:

  • The utility displays the message " SUCCESSFULLY read/write messages from server":
  • Additionally, the socket_test server output on the source machine from step 1 is appended with text similar to the following :
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.

Documents connexes

The document was helpful.

Sélectionner une évaluation

I easily found the information I needed.

Sélectionner une évaluation