Changes in This Release for Oracle Sharding

This preface contains:

Changes in Oracle Database 19c

The following are changes in Using Oracle Sharding for Oracle Database 19c.

New Features

The following features are new in this release:

Multiple Table Family Support for System-Managed Sharding

The Oracle Sharding feature for Oracle Database 18c supported only one table family (a set of related tables sharing the same sharding key) for each sharded database. In Oracle Database 19c, Oracle Sharding includes support for multiple table families where all data from different table families reside in the same chunks. This feature applies to system-managed sharded databases only. Different applications accessing different table families can now be hosted on one sharded database.

There is one new GDSCTL command, CONFIG TABLE FAMILY, and several other commands are extended to support this feature: ADD SERVICE, MODIFY SERVICE, CONFIG SERVICE, CONFIG CHUNKS, STATUS ROUTING, and VALIDATE CATALOG.

There are no new SQL keywords or statements introduced with this feature; however, some restrictions are changed with the use of CREATE SHARDED TABLE and TABLESPACE SET.

See

Support for Multiple PDB-Shards in the Same CDB

In Oracle Database 18c, Oracle Sharding introduced the capability for using a single PDB in a CDB as a shard or a shard catalog database. In Oracle Database 19c, Oracle Sharding enables you to use more than one PDB in a CDB for shards or shard catalog databases, with certain restrictions. For example, this feature allows a CDB to contain shard PDBs from different sharded databases (SDBs), each with their own separate catalog databases.

See

Generation of Unique Sequence Numbers Across Shards

Before Oracle Database 19c, if you needed a unique number across shards you had to manage it yourself. In Oracle Database 19c, Oracle Sharding allows you to independently generate sequence numbers on each shard which are unique across all shards.

To support this feature, new SEQUENCE object clauses, SHARD and NOSHARD, are included in the SEQUENCE object DDL syntax.

See

Support for Multi-Shard Query Coordinators on Shard Catalog Standbys

Before Oracle Database 19c, only the primary shard catalog database could be used as the multi-shard query coordinator. In Oracle Database 19c you can also enable the multi-shard query coordinator on Oracle Active Data Guard standbys of the shard catalog database. This improves the scalability and availability of multi-shard query workload.

See

Propagation of Parameter Settings Across Shards

Before Oracle Database 19c, database administrators had to configure ALTER SYSTEM parameter settings on each shard in a sharded database. This feature provides ease of manageability by allowing administrators to centrally manage and propagate parameter settings from the shard catalog to all of the database shards. Once settings are configured at the shard catalog, they are automatically propagated to all shards of the sharded database.

See Propagation of Parameter Settings Across Shards

Deprecation and Desupport

The following features are deprecated or desupported in this release:

Desupport of Setting Passwords in GDSCTL Command Line

To enhance security, starting with Oracle Database 19c, the ability to specify passwords from the Global Data Services Control Utility (GDSCTL) command-line when called from the operating system prompt is no longer supported.

This desupport applies only to password changes where GDSCTL is called from a user command-line prompt. For example, the following command is desupported:

$ gdsctl add database -connect inst1 -pwd gsm_password

Specifying the password from the GDSCTL utility itself is still valid. For example, the following command is valid:

GDSCTL> add database -connect inst1 -pwd gsm_password

This deprecation addresses the security vulnerability when specifying passwords in GDSCTL commands called from the operating system prompt.

Changes in Oracle Database 18c

The following are changes in Using Oracle Sharding for Oracle Database 18c.

New Features

The following features are new in this release:

User-Defined Sharding Method

User-defined sharding allows you to explicitly specify mapping of data to individual shards. It is used when, because of performance, regulatory, or other reasons, certain data needs to be stored on a particular shard and you must have full control moving data between shards. This method allows you to define LIST or RANGE based sharding.

See

Support for PDBs as Shards

Use a PDB in a CDB for shards or a shard catalog database. In this release Oracle Sharding supports a shard or shard catalog as a single PDB in a CDB. The GDSCTL command ADD SHARD is extended and new commands ADD CDB, MODIFY CDB, CONFIG CDB, and REMOVE CDB are implemented so that Oracle Sharding can support a multitenant architecture.

See

Support for Oracle GoldenGate Replication

Oracle GoldenGate is used for fine-grained active-active replication where all shards are writable, and each shard can be partially replicated to other shards within a shardgroup. The Automatic Conflict Detection and Resolution feature added in Oracle 12.2 is used to handle any conflicts due to the active-active replication

See Shard-Level High Availability

Centralized Diagnostics

The SQL SHARDS() clause lets you query Oracle supplied objects, such as V$, DBA/USER/ALL views, dictionary tables, and so on, across all shards.

See Querying System Objects Across Shards

Multi-Shard Query Consistency Level

You can use the initialization parameter MULTISHARD_QUERY_DATA_CONSISTENCY to set different consistency levels when executing multi-shard queries.

See Specifying Consistency Levels in a Multi-Shard Query

Sharding Support for JSON, LOBs and Spatial Objects

This release enables JSON operators that generate temporary LOBs, large JSON documents (those that require LOB Storage), Spatial Objects, Index and Operators and Persistent LOBs to be used in a sharded environment.

The following interfaces are new or changed as part of this feature.

  • Query and DML statements

    Cross shard queries involving LOBs are supported.

    DMLs involving more than one shard are not supported. This behavior is similar to scalar columns.

    DMLs involving a single shard are supported from coordinator.

    Locator selected from a shard can be passed as bind value to the same shard.

  • OCILob

    All non-BFILE related OCILob APIs in a sharding environment are supported. with some restrictions.

    On the coordinator, the OCI_ATTR_LOB_REMOTE attribute of a LOB descriptor returns TRUE if the LOB was obtained from a sharded table.

    Restrictions: For APIs that take two locators as input, OCILobAppend, OCILobCompare for example, both of the locators should be obtained from the same shard. If locators are from different shards an error is given.

  • DBMS_LOB

    All non-BFILE related DBMS_LOB APIs in a sharding environment are supported, with some restrictions. On the coordinator, DBMS_LOB.isremote returns TRUE if the LOB was obtained from a sharded table.

    Restrictions: For APIs that take two locators as input, DBMS_LOB.append and DBMS_LOB.compare for example, both of the locators should be obtained from the same shard. If the locators are from different shards an error given.

See Creating a Schema for a System-Managed Sharded Database, Creating a Schema for a User-Defined SDB, and Creating a Schema for a Composite SDB for examples of using LOBs in sharded database deployment.

Optimizer Enhancements for Multi-Shard Queries

Various enhancements were made to improve the robustness and fault tolerance of shard queries. The query explain plan is enhanced to display information for all shards participating in the query.

See Supported Query Shapes in Proxy Routing and Execution Plans for Proxy Routing for updated information about these topics.

Shard Replacement

If a shard fails and is unrecoverable, you can replace it using the ADD SHARD -REPLACE command in GDSCTL. You can also use the -replace command option to move a shard to new equipment for any reason.

See Replacing a Shard

Oracle RAC Sharding

Oracle RAC Sharding creates an affinity for table partitions to particular Oracle RAC instances, and routes database requests that specify a partitioning key to the instance that logically holds the corresponding partition. This provides better cache utilization and dramatically reduces block pings across instances. The partitioning key can only be added to the most performance critical requests. Requests that don’t specify the key still work transparently and can be routed to any instance. No changes to the database schema are required to enable this feature.

See Oracle Real Application Clusters Administration and Deployment Guide

Other Changes

The following are additional changes in the release:

  • Sharding Content Moved to New Book

    In Oracle Database 12c Release 2 (12.2.0.2) the Oracle Sharding content was part of the Oracle Database Administrator’s Guide. Starting in Oracle Database 18c the Oracle Sharding content is contained in its own book, Using Oracle Sharding.