• No results found

Create a new shard and add it to a shardspace or shardgroup.

Syntax

create shard [{-shardgroup shardgroup_name | –shardspace shardspace_name}]

[-region region_name]

[-deploy_as {primary | standby | active_standby}]

[-rack rack_id]

[-gg_service (http|https):ogg_host:sm_port/deployment -gg_password gg_user_password]

-destination destination_name {-credential credential_name | -osaccount account_name -ospassword password

[-windows_domain domain_name]}

[-dbparam db_parameter_file | -dbparamfile db_parameter_file]

[-dbtemplate db_template_file | -dbtemplatefile db_template_file]

[-netparam net_parameter_file | -netparamfile net_parameter_file]

[-serviceuserpassword pwd]

[-sys_password]

[-system_password]

Options

Table C-36 GDSCTL create shard Options

Option Description

-credential credential_name The name of the credential object.

create shard

Table C-36 (Cont.) GDSCTL create shard Options

Option Description

-dbparam db_parameter_file Specify a file object containing Database

Configuration Assistant (DBCA) parameters to use during database creation on the remote machine.

-dbparamfile db_parameter_file Specify an operating system file name

containing Database Configuration Assistant (DBCA) parameters to use during database creation on the remote machine. GDSCTL uses this to open a local file on the machine on which it is running.

-dbtemplate db_template_file Specify a file object containing Database

Configuration Assistant (DBCA) database template information to use during database creation on the remote machine.

-dbtemplatefile db_template_file

Specify an operating system file name containing Database Configuration Assistant (DBCA) database template information to use during database creation on the remote machine. GDSCTL uses this to open a local file on the machine on which it is running.

-deploy_as {PRIMARY | STANDBY

| ACTIVE_STANDBY}

Specify the role that is assigned to a shard added to the shardgroup after deployment. This parameter is only used with Data Guard replication. The specified role will be assigned to the shard database after deployment. The valid values are:

PRIMARY – the shard should be deployed as the primary database

STANDBY – the shard should be deployed as a Data Guard standby (mounted)

ACTIVE_STANDBY – the shard should be deployed as an Active Data Guard standby If the parameter is not specified, the default value is STANDBY

-destination destination_name The name of the remote executable agent through which the database will be created as listed in the ALL_SCHEDULER_EXTERNAL_DESTS view.

-gg_password gg_user_password Specifies the password for the user account that will be created on the shard database that the Oracle GoldenGate replication processes will use.

This parameter is mandatory for Oracle GoldenGate replication.

-gg_service hostname:port/

GGHOME_directory

This parameter is mandatory for Oracle GoldenGate replication and specifies the URI for the GoldenGate Admin Server that will manage the GoldenGate replication at this shard. The format will be as follows Example:

https:shard1.example.com:9005/

shard1.

-netparam net_parameter_file Specify a file object containing Net Configuration Assistant (NETCA) parameters to use during network listener setup on the remote machine.

create shard

Table C-36 (Cont.) GDSCTL create shard Options

Option Description

-netparamfile net_parameter_file

Specify an operating system file name containing Net Configuration Assistant (NETCA) parameters to use during network listener setup on the remote machine.

GDSCTL uses this to open a local file on the machine on which it is running.

-osaccount account_name Specify the operating system account which will be used for remote jobs

-ospassword password Specify the corresponding password for the account name specified in the -osaccount parameter.

-rack rack_id Specify an identifier of a rack (hardware cabinet), or another physical grouping of nodes with similar availability characteristics. If specified, GDS will enforce that databases that contain replicated data are not placed in the same rack. If this is not possible an error is raised.

-region region_name Specify the GDS region database, catalog, shard, shardgroup, or shard director (global service manager) that this shard belongs to. This parameter is only valid for user-defined sharding. For other sharing methods it is specified per shardgroup.

-serviceuserpassword pwd The password for the operating system account under which Windows RDBMS and TNSLSNR services run.

{-shardgroup shardgroup_name | -shardspace shardspace_name}

Specify the name of the shardgroup or shardspace that this shard is being added to.

Use -shardspace when using this command in a user-defined sharding configuration. Use -shardgroup with system-managed and composite sharding configurations.

-sys_password SYS account password.

-system_password SYSTEM account password.

-windows_domain domain_name Specify a corresponding domain name for an account if a Windows account has been specified in the -osaccount parameter.

Usage Notes

CREATE SHARD causes a new database to be created using DBCA and NETCA.

CREATE SHARD only registers the database with GDS. The database is not created and replication is not configured on a newly create database, and data from other databases is not distributed to it until DEPLOY is executed.

The —DEPLOY_AS option can only be specified if a shard is being added to a shardspace. If a shard is being added to a shardgroup, its role will determined by the role of the shardgroup. The role is assigned when the shard gets deployed.

If the —CREDENTIAL option is specified, the credential name must have previously been created with the ADD CREDENTIAL command. If —CREDENTIAL is not specified, then OSACCOUNT and OSPASSWORD (and optionally WINDOWS_DOMAIN) must be specified.

create shard

The value for DBPARAM, DBTEMPLATE, or NETPARAM must be the name of a file object as previously specified in the ADD FILE command. The file content specified by the -netparam or -netparamfile parameter in CREATE SHARD is a NETCA response file. Examples can be found in $ORACLE_HOME/assistants/netca. By default, port 1521 is used with a listener name of LISTENER_shard_name. These values can be changed by modifying a sample response file and specifying it using the -netparam or --netparamfile parameters. The file content specified by the -dbtemplate or -dbtemplatefile parameter in CREATE SHARD is a DBCA template file. Examples of template files can be found in $ORACLE_HOME/assistants/dbca/templates. If not specified, the General_Purpose.dbc file located in the above directory on the shard destination host will be used. The format of the file contents specified in the -dbparam or -dbparamfile command is a space-delimited list of DBCA command line parameters and values on one or more lines. For example, the following is an example of a valid parameter file: -gdbName shard1.example.com -initParams sort_area_size=200000. For a complete list of possible DBCA parameters, run dbca -help -createDatabase.

See Working with Oracle GoldenGate Sharding in the Fusion Middleware Using the Oracle GoldenGate Microservices Architecture guide for more information about using Oracle GoldenGate with Oracle Sharding.

Note: Oracle GoldenGate replication support for Oracle Sharding High Availability is deprecated in Oracle Database 21c, and will be desupported in Oracle Database 22c.

Example Create a shard.

GDSCTL> create shard –shardgroup group1 –destination dbdest –credential group1_cred

–dbparam group1_db_params

Related documents