add shardgroup

Add a shardgroup to a shardspace.

Syntax

add shardgroup -shardgroup shardgroup_name 
              [-region region_name] 
              [-shardspace shardspace_name]
              [-deploy_as {PRIMARY | STANDBY | ACTIVE_STANDBY}]
              [-repfactor number]

Options

Table 2-14 GDSCTL add shardgroup Options

Option Description

-shardgroup shardgroup_name

Specify the name of the shardgroup. The name must be unique across all shardspaces.

The shardgroup name can be up to 30 characters long and can be an alphabetical character followed by zero or more alphanumeric ASCII characters or an underscore (_).

-region region_name

Specify the name of the region. If not specified, a default region will be used.

-shardspace shardspace_name

Specify the name of the shardspace to which to add the shardgroup.

-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 valid values are:

If the parameter is not specified, the default value is STANDBY

  • 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

-repfactor number

Specify the replication factor - the number of replicas for each piece of data stored in this shardgroup. This parameter can only be used with Oracle GoldenGate replication and is mandatory unless the default value of replication factor was specified in CREATE SHARDCATALOG command. This parameter does not apply to user-defined sharding because GoldenGate does not support that sharding methods.

Usage Notes

This command can only be used with system-managed or composite sharding, not user-defined sharding.

Note: Oracle GoldenGate replication support for Oracle Sharding High Availability is deprecated in Oracle Database 21c.

Examples

Add the GROUP1 shardgroup in the WEST region within the GOLD shardspace.

GDSCTL> add shardgroup -shardgroup group1 -region west –shardspace gold