create shardcatalog

Creates a shard catalog for the sharded database.

Syntax

create shardcatalog -database connect_identifier 
                   [-user username[/password]] 
                   [-region region_name_list] 
                   [-configname config_name] 
                   [-autovncr {ON | OFF}] 
                   [-force] 
                   [-sdb sdb_name] 
                   [-shardspace shardspace_name_list] 
                   [-agent_password password] 
                   [-repl DG]                                      [-sharding {system | composite | user}]                   [-chunks number] 
                   [-protectmode dg_protection_mode]
                   [-agent_port port]
                   [-for_federated_database] [-encryption encryption] 
                   [-repunits repunits]
                   [-encryption encryption]
                   [-validate_network]

Options

Table 2-40 GDSCTL create shardcatalog options

Command Option Description
-agent_password password

Specify the password to be used for remote scheduler agent registration with the catalog database.

-agent_port port

Port number for XDB to use. If NULL and no current value is set, then it will default to 8080. Execute on catalog as well.

-autovncr {ON|OFF}

This option enables (ON) or disables (OFF) auto VNCR mode. The default value is ON.

See the Usage Notes below for important information about this option.

-chunks number

Specify the default number of unique chunks in a shardspace. The value of -chunks must be greater than 2 times the size of the largest shardgroup in any shardspace.

This parameter does not apply to user-defined sharding or a federated database. It will apply to all shardspaces created for composite sharding if the number of chunks is not specified in the ADD SHARDSPACE command.

All shardgroups in a shardspace have the same number of chunks. If this parameter is not specified, the default number of chunks is determined at the time of execution of the first DEPLOY command and is 120 per database of the shardgroup with the biggest number of shards

-configname config_name

Specify the name of the GDS configuration. This name is used as the virtual DB_DOMAIN of the sharded database. The default configuration name is ORADBCLOUD.

The configuration name can be up to 32 bytes long and can contain an alphabetical character followed by zero or more alphanumeric ASCII characters, ‘_', or ‘#' and possibly separated by periods if there are multiple identifiers.

-database connect_identifier

Specify the connect identifier for the database in which you want to create the catalog.

-for_federated_database

Create a catalog for a federated database.

-force

Before creating the new catalog, delete an existing shard or GDS catalog on this database.

-protectmode dg_protection_mode

Specify the Data Guard protection mode: MAXPROTECTION, MAXAVAILABILITY, or MAXPERFORMANCE (default). For Data Guard replication this parameter applies to any shardspace created without specification of protection mode in the ADD SHARDSPACE command.

-region region_name_list

Specify a comma-delimited list of region names. This command creates each region and adds the regions to the catalog. If you do not specify a region, then a default region named REGIONORA is created.

-repl DG|NATIVE

Specify the technology used to replicate data in the sharded database. Only one value can be specified for this parameter: DG for Data Guard and NATIVE for native RAFT replication. The default value is DG. This parameter cannot be modified after the catalog has been created. This parameter cannot be modified after the catalog has been created.

-sdb sdb_name

Specify the virtual DB_UNIQUE_NAME for the sharded database. The default name is ORASDB.

The sharded database (SDB) 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 (_).

-sharding {system | composite | user}

Specify the sharding type: SYSTEM for system-managed (default), USER for user-defined, and COMPOSITE. This parameter cannot by modified after the catalog has been created. Oracle GoldenGate does not support the user-defined sharding method.

-repunits reunits Total number of replication units (this setting only applies to native RAFT replication). By default, Oracle Sharding determines the number of replication units (RUs) in a shardspace and the number of chunks in an RU. Note that in system-managed sharding there is one shardspace named SHARDSPACEORA.
-shardspace shardspace_name_list

Specify a comma-delimited list of shardspace names. This option creates specified shardspaces and adds them to the catalog. If you do not specify a shardspace, then a default shardspace named SHARDSPACEORA is created.

—user username[/password]

Specify a user (and optionally, the password) that has the administrator privileges on the catalog database. If you do not use this option, then GDSCTL prompts you for the name and the password of a user with administrator privileges. If you specify a user name but not the password for the user, then GDSCTL prompts you for the password.

-encryption

Encryption protocol for Advanced Network Option (ANO) used between GSM, GDSCTL and databases. OFF means that ANO is disabled. ( AES256 | AES192 | OFF).

-validate_network This flag enables several network validation checks, including checking network connectivity between hosts and checking VNCR entries are valid.

Usage Notes

The create shardcatalog command creates a GDS catalog specifically designed for a sharded database (SDB). This command cannot be used to create a conventional GDS catalog. Execution of this command is the first step required to create an SDB. The command is executed by the user with the GDS administrator or SYSDBA privileges.

Keep the following points in mind when using create shardcatalog:

  • Only a single sharded database can be created using a shard catalog. A shard catalog cannot be used for a regular GDS configuration.

  • Any arbitrary password can be specified for remote agent registration. If one is stipulated and an agent registration password already exists, it will be overridden with the new password. In order to successfully execute the GDSCTL CREATE SHARD command, an agent password must be set using CREATE SHARDCATALOG or MODIFY CATALOG.

  • CHUNKS defines the default number of unique chunks in a shardspace. It is applied to all shardspaces created for composite sharding if the number of chunks is not specified in the ADD SHARDSPACE command.

  • This command creates each region and adds the regions to the catalog. If you do not specify a region, then a default region named REGIONORA is created.

  • The default replication factor specified by REPFACTOR can be overridden for a particular shardgroup by specifying the replication factor in the corresponding ADD SHARDGROUP command. For automatically created default shardgroups the parameter cannot be overridden. A non-default shardgroup must be created to customize the replication factor.

  • The SHARDSPACE option creates specified shardspaces and adds them to the catalog. If you do not specify a shardspace, then a default shardspace named SHARDSPACEORA is created.

  • For Data Guard replication the PROTECTMODE parameter applies to any shardspace created without specification of protection mode in the ADD SHARDSPACE command.

  • The FOR_FEDERATED_DATABASE option is mutually exclusive with the SHARDING option.

  • Auto VNCR is best used in environments with simple private networks where ease of configuration is the most important consideration. To have the highest level of control over which hosts may participate in a GDS configuration, disable Auto VNCR and explicitly add the IP addresses of each database host to the VNCR configuration.

    When -autovncr is enabled, Oracle attempts to find the host name of the target shard when it is validated during add shard execution. This host is then automatically added to the VNCR list in the catalog as an invited node. This mechanism is not compatible with all network configurations and may not work in the following cases:

    • The catalog or global service manager host does not know how to translate the host name discovered on the target shard host to an real IP address. This can happen if they have different names in the hosts file or DNS on the catalog or global service manager host, or if they just do not exist on those hosts.

    • The target shard host has multiple public network addresses, and Oracle chooses an address that is different than the address used when the shard registers with the global service manager. This can happen if the host has multiple network cards or has configured virtual network interfaces.

    • The shard is running Oracle RAC, and other Oracle RAC instances run on a different subnet. This is not a recommended configuration for Oracle RAC. Refer to the Oracle RAC documentation for recommended configurations. With Oracle RAC, Oracle Database connects to a single shard host to validate the target, and returns a subnet mask that includes the entire subnet that the host is on. If other instances are on a different subnet, they have no valid VNCR entry, and registration is rejected.

    When —autoVNCR is not enabled, or, if any of the above cases apply, new hosts should be added manually using add invitednode (add invitedsubnet).

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

Examples

The following example creates a shard catalog on the mydb database.

GDSCTL> CREATE SHARDCATALOG –DATABASE mydb