add shard
Add a shard to the shard catalog.
Syntax
add shard -connect connect_identifier
[-pwd password]
[-savename]
[-region region_name]
[-force]
[-cdb cdb_name]
[-cpu_threshold cpu]
[-disk_threshold disk]
[{-shardgroup shardgroup_name | -shardspace shardspace_name}]
[-deploy_as {PRIMARY | STANDBY | ACTIVE_STANDBY}]
[-rack rack_id]
[-replace old_db_name]
[-gg_service (http|https):ogg_host:sm_port/GGHOME_directory]
[-validate_network]
Options
Table 2-13 GDSCTL add shard Options
| Option | Description |
|---|---|
-connect connect_identifier |
Specify an Oracle Net connect descriptor or net service name that resolves to a connect descriptor for the database being added as the shard. |
-pwd password |
Enter the GSMUSER password. If not specified, the user is prompted for the password. |
-savename |
Store in the shard catalog a net service name
specified with the |
-region region_name |
Specify the GDS region that this shard belongs to. This parameter is only valid for user-defined sharding. For other sharing methods it is specified per shardgroup. |
-force |
If specified, the existing GDS and sharding configuration on the shard and in the shard catalog with information about this shard will be rewritten. |
-cdb cdb_name |
If this parameter is used, the shard must be a PDB and the CDB must already exist in the catalog. |
-cpu_threshold cpu |
Specify the CPU Utilization percentage threshold. |
-disk_threshold disk |
Specify the average latency in milliseconds of a synchronous single-block read. |
{-shardgroup shardgroup_name |
-shardspace shardspace_name} |
Specify the name of the shardgroup or shardspace that this shard is being added to. Use |
-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:
If the parameter is not specified, the default value is STANDBY |
-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. |
—replace old_db_name |
This parameter specifies db_unique_name of
the old shard when replacing it. The existing
parameters of the This parameter is not supported in an Oracle GoldenGate environment. |
-gg_service (http|https):ogg_host:sm_port/deployment |
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:
|
-validate_network |
This flag enables several network validation checks, including checking network connectivity between hosts and checking VNCR entries are valid. |
Usage Notes
Before running add shard, you must validate the shard by running the validateShard procedure as described in Oracle Globally
Distributed AI Database
-
The shard will become part of the sharded database after a
DEPLOYcommand is executed, except in the case of-replace. - Any databases added to a sharding configuration using
ADD SHARDmust not have ever been deployed as a shard in another configuration (unless-replaceis specified). Re-adding a previously deployed shard will cause theADD SHARDcommand to succeed, but the shard will be unable to successfully deploy and register with the shard director (GSM) when theDEPLOYcommand is eventually run. -
ADD SHARDonly registers the database (shard) with GDS. Replication is not configured on a newly added database and data from other databases is not distributed to it untilDEPLOYis run. - With the introduction of Oracle AI Database, The default behavior when adding a shard to the topology has changed so that a current version of the schema is captured and applied on the new shard. Previously, all accumulated DDL on the sharded database was applied to the new shard, one by one in order, some of which might be negated by later DDL
-
With Data Guard replication, a shard can be added as a standby to a preexisting Data Guard configuration. There is no need to re-shard the data. It is expected that the shard being added is in a the correct state for configuration; the standbys should be cloned from the primary and have the same DBID. When you run
DEPLOY, the existing primary and standby databases are matched with each other, using the DBID to form a broker configuration. If the broker has not been configured, it is configured, otherwise it is validated that it has been configured correctly. Once the broker is configured, Data Guard does its work, and it should be able to perform catch-up on the standbys if needed before bringing them online. Note that the broker is not configured for a federated database. - The
-DEPLOY_ASoption cannot be used in conjunction with-SHARDGROUPfor system/composite sharding. -
When using the
-replaceparameter, see Oracle Globally Distributed AI Database for more information about its usage.
Note: Oracle GoldenGate replication support for Oracle Sharding High Availability is deprecated in Oracle Database 21c.
Examples
Add the shard to shardgroup GROUP1 of the DB11 database.
GDSCTL> add shard –connect db11 –shardgroup group1
Replace shard SH1 with database DB11.
GDSCTL> add shard –replace sh1 –connect db11