connection
Use the connection command to configure SharePlex to connect to a database.
How to use the connection command
Use the connection command to establish connection properties for SharePlex to use when connecting to a database. Use this command only if there is no database setup utility available for the database. To determine whether a setup utility exists for the database, see Database Setup Utilities .
Use the connection command in the following ways:
- With the set option to set connection attributes. Issue one connection command per option used. The command does not support the stringing of multiple keyword/value pairs with one command.
- With the reset option to clear connection settings.
- With the show option to view the current connection settings.
Important: Make certain to stop and then restart the Post process after using this command.
Usage
Supported sources: |
Oracle |
Supported targets: |
All |
Authorization level: |
Operator (2) |
Issues on: |
source or target system |
Related commands: |
target |
Syntax
connection {o. | r.}database
{
set keyword=value |
show [all] |
reset [keyword]
} |
[user=username]
[password=password]
[tns_alias=alias]
[asm_sid=SID]
[asm_user=username]
[asm_password=password]
[asm_tns_alias=alias]
[wallet_location = path]
[wallet_automode = Y/N]
[dsn=DSN]
[server=servername]
[driver=path]
[port=portnumber]
[connect_string=string]
[plugin = pluginname]
[plugin_version = versionnumber]
[plugin_direction = source/target/both]
[sp_host_port = Hostname:port]
[admin_user = username]
[database = SID]
[dstype = Datastorename]
[version = versionnumber]
[hostaddr = IPaddress]
[host = servername]
[dbname = databasename]
[db_host = IP]
[db_port = portnumber]
[oracle_home = path]
[service_name = servicename] |
Not available |
Syntax description
{o. | r.}database |
The database for which you are configuring the connection. Use the following format:
Oracle:
o.SID
where: SID is the ORACLE_SID of the database.
Open Target (ODBC):
r.database
where: database is the name (not the DSN) of the database.
Note: The database specification must match the database specification on the datasource line or in the routing map of the configuration file. For example, if the routing map is myhost@r.mydb then a connection command would include the same database specification, like this: connection r.mydb set user=myuser |
set keyword=value |
Sets a connection property. See Keywords. |
show [all] |
show displays the current connection settings for the specified database. show all displays connection settings for all local databases. Do not use the database specification with show all, as in this example:connection show all |
reset [keyword] |
reset clears all of the connection settings for the specified database.
reset keyword clears the connection setting only for a specific connection property. See Keywords |
Keywords
user=username |
All |
The name of the database user that SharePlex will use to connect to the database specified with database. |
password=password |
All |
The password for the user specified with username. |
tns_alias=alias |
Oracle |
The TNS alias to which SharePlex will connect. Required if connections to the database are managed with a tnsnames.ora file. |
asm_sid=SID |
Oracle |
The Oracle SID of the ASM instance. Required if Oracle Automatic Storage Management is being used by the database. |
asm_user=username |
Oracle |
The name of the ASM user that SharePlex will use to connect to the ASM instance. |
asm_password=password |
Oracle |
The password of the ASM user. |
asm_tns_alias=alias |
Oracle |
The TNS alias of the ASM instance. Required if connections to the ASM instance are managed with a tnsnames.ora file. |
wallet_location = path |
Oracle |
If set, path to Oracle wallet file |
wallet_automode = Y/N |
Oracle |
Set to Y if setup for SharePlex auto open |
dsn=DSN |
Open Target (ODBC) |
The data source name (DSN) that is associated with the database. If a DSN exists for the database, this keyword plus the user and password keywords are the only required connection settings. |
server=servername |
Open Target (ODBC) |
The name or IP address of the server that hosts the database. |
driver=path |
Open Target (ODBC) |
The full path to the ODBC driver that supports ODBC connectivity to the database. |
port=portnumber |
Open Target (ODBC) |
The port number of the database. |
connect_string=string |
Open Target (ODBC) |
A user-defined connection string. When using your own connection string, make certain it includes all of the required elements to make a successful ODBC connection, but omit the user name and password. Use the connection command with the user and password options to supply user information. |
plugin = pluginname |
|
Name of plugin |
plugin_version = versionnumber |
|
Plugin version |
plugin_direction = source/target/both |
|
The plugin_direction value can be set as source, target or both. |
sp_host_port = Hostname:port |
Database (Non-Oracle) |
SharePlex host: port that ran setup |
admin_user = username |
|
Administrator user SQL Server |
database = SID |
|
Database name |
dstype = Datastorename |
|
Datastore name |
version = versionnumber |
|
|
hostaddr = IPaddress |
Database (Non-Oracle) |
The server IP address to which ODBC will connect |
host = servername |
Database (Non-Oracle) |
The server name to which ODBC will connect |
dbname = databasename |
Database (Non-Oracle) |
The database name to which ODBC will connect |
db_host = IP |
Database (Non-Oracle) |
The host of the database through DSN |
db_port = portnumber |
Database (Non-Oracle) |
The port used by the database through DSN |
oracle_home = path |
Oracle |
The path to Oracle Home |
service_name = servicename |
Oracle |
Oracle service name |
Examples
Oracle examples
connection o.myora12 set user=myuser
connection o.myora12 set password=mypassword
connection o.myora12 set tns_alias=myora12
Open Target examples
DSN exists
connection r.mydb set user=myuser
connection r.mydb set password=mypassword
connection r.mydb set dsn=mydsn
DSN does not exist
connection r.mydb set user=myuser
connection r.mydb set password=mypassword
connection r.mydb set port=1234
connection r.mydb set server=server1
connection r.mydb set driver=/database/ODBC/lib/databasedriver.so
DSN does not exist, use connection string
connection r.mydb set user=myuser
connection r.mydb set password=mypassword
connection r.mydb set connect_string=”driver=/database/ODBC/lib/databasedriver.so;server=server1;port=1234;uid=myuser;pwd=mypassword”
Remove a connection value
connection r.mydb reset port
connection r.mydb reset
View connection settings
connection r.mydb show
connection show all
copy cache
Use the copy cache command to copy the object cache from the source to the target.
If you find the following message in the SharePlex Event Log, include in the copy cache command the target host and target sid for the Post process, as well as the actid (activation ID) from the error message. This is the activation ID of the activation for which the Post process is currently posting.
Poster [SP-OPO01009] cannot read object cache for actid <nnnn>
If the copy cache command is issued with no options, SharePlex will identify the current activation ID on the source and copy the object cache for that activation ID from the source to all targets.
Usage
Supported sources: |
Oracle |
Supported targets: |
All |
Authorization level: |
Operator (2) |
Issues on: |
source system |
Related commands: |
show log |
Syntax
copy cache |
[actid actid]
[at target_host[@target_sid]] |
[ on host |
on host:portnumber |
on login/password@host |
on login/password@host:portnumber ] |
Syntax description
copy cache |
If you issue the copy cache command with no options, SharePlex determines the current activation ID (actid) on the source and copies the object cache for that actid to all targets. |
actid actid |
Specifies the activation ID for the object cache you want to copy to the specified target or to all targets (if no target is specified). |
attarget_host[@target_sid] |
Specifies the target to which you want to copy the object cache for the specified actid or for the current actid (if no actid is specified). |
Remote options
These options enable you to issue the command on a remote machine and to script commands that include a login name, password, port number, or combination of those items.
on host |
Execute the command on a remote system (one other than the one where the current sp_ctrl session is running). You are prompted for login credentials for the remote system. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on SysA |
on host:portnumber |
Execute the command on a remote system when a remote login and port number must be provided. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on SysA:8304 |
on login/password@host |
Execute the command on a remote system when a remote login, password, and host name must be provided. If used, must be the last component of the command syntax.
Example:sp_ctrl(sysB)>status on john/spot5489@SysA |
on login/password@host:portnumber |
Execute the command on a remote system when a remote login, password, host name, and port number must be provided. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on john/spot5489@SysA:8304 |
copy config
Use the copy config command to copy a configuration file and save the copy under a different file name.
Copying the configuration allows you to:
- Save a replica for backup purposes
- Use the copy as the basis for composing a new configuration using the edit config command
- Change an active configuration. You can make your changes to the copy with the edit config command while replication under the current configuration continues, and then activate the new configuration when you are ready.
This command copies the configuration to the same source system as the original configuration. To copy a configuration file to a different system, you can transfer the file via tape, CD, or FTP.
To see a list of configurations on a system, use the list config command. To view the contents of a configuration, use the view config command.
Usage
Supported sources: |
Oracle |
Supported targets: |
All |
Authorization level: |
Operator (2) |
Issues on: |
source system |
Related commands: |
activate config, create config, edit config, list config, remove config, rename config, show config, verify config view config |
Syntax
copy config filename tonewname |
[ on host |
on host:portnumber |
on login/password@host |
on login/password@host:portnumber ] |
Syntax description
filename to newname |
- filename is the name of the configuration that you want to copy. Configuration names are case-sensitive.
- to is a required part of the syntax.
- newname is the name you are giving to the copy. It must be unique among configurations on the system.
Example:
sp_ctrl(sysA)> copy config sales to sales2 |
Remote options
These options enable you to issue the command on a remote machine and to script commands that include a login name, password, port number, or combination of those items.
on host |
Execute the command on a remote system (one other than the one where the current sp_ctrl session is running). You are prompted for login credentials for the remote system. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on SysA |
on host:portnumber |
Execute the command on a remote system when a remote login and port number must be provided. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on SysA:8304 |
on login/password@host |
Execute the command on a remote system when a remote login, password, and host name must be provided. If used, must be the last component of the command syntax.
Example:sp_ctrl(sysB)>status on john/spot5489@SysA |
on login/password@host:portnumber |
Execute the command on a remote system when a remote login, password, host name, and port number must be provided. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on john/spot5489@SysA:8304 |
copy status
Use the copy status command to view the status of the last copy or append job run. The copy status command can be used to view detailed status on a copy or append job or a portion of a copy or append job, or to view status on all copy and append jobs for which SharePlex has history. For details and examples about using the copy status command, see the job status command.
Usage
Supported sources: |
Oracle |
Supported targets: |
Oracle |
Authorization level: |
Viewer |
Issued for: |
source or target |
Related commands: |
append status |
Syntax
job status |
[job_id]
[job_id.table_id]
[all]
[full]
[detail]
[status] |
[ on host |
on host:portnumber |
on login/password@host |
on login/password@host:portnumber ] |
Syntax description
job status |
Without options, the command shows the status of all jobs for which SharePlex has history. |
job_id |
Displays status history for the job with the specified SharePlex-assigned job ID. Example: sp_ctrl(sysA)> job status 2828.2 |
job_id.table_id |
Displays status history for the job with the specified SharePlex-assigned job ID and table.
Example: sp_ctrl(sysA)> job status 2828.HR.SRC_TEST3 |
all |
Displays a summary line for every job with history in the database.
Example: sp_ctrl(sysA)> job status all |
full |
Displays the status of every object in the job. By default, the job status command displays the status of those objects not completed, or completed with an exceptional status. Example: sp_ctrl(sysA)> job status2828 full |
detail |
Displays detail information for every object reported upon. By default, the job status command displays a summary line for every object reported upon. Note that the detail information is the same as is displayed for the job_id.table_id option. Example: sp_ctrl(sysA)> job status detail |
[status] |
Displays status history for previous jobs with the specified status. sp_ctrl(SysA)> job status “Error” |
Remote options
These options enable you to issue the command on a remote machine and to script commands that include a login name, password, port number, or combination of those items.
on host |
Execute the command on a remote system (one other than the one where the current sp_ctrl session is running). You are prompted for login credentials for the remote system. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on SysA |
on host:portnumber |
Execute the command on a remote system when a remote login and port number must be provided. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on SysA:8304 |
on login/password@host |
Execute the command on a remote system when a remote login, password, and host name must be provided. If used, must be the last component of the command syntax.
Example:sp_ctrl(sysB)>status on john/spot5489@SysA |
on login/password@host:portnumber |
Execute the command on a remote system when a remote login, password, host name, and port number must be provided. If used, must be the last component of the command syntax.
Example: sp_ctrl(sysB)>status on john/spot5489@SysA:8304 |