My Oracle Support Banner

CLIENT CONNECTION ROUTING IN SHARDED DATABASE ENVIRONMENT (Doc ID 2385973.1)

Last updated on FEBRUARY 04, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

Goal

NOTE: In the images and/or the document content below, the user information and environment data used represents
fictitious data from the Oracle sample schema(s),Public Documentation delivered with an Oracle database product or
other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental
and not intended in any manner.

For the purposes of this document, the following fictitious environment is used as an example
to describe the procedure:

GSM: SHARDIRECTOR1
REGIONS: REGIONORA
SHARDED DATABASES EMP_SDB
DATABASES SH1, SH2, SH3, SH4
SHARD GROUPS: PRIM, STBY,
SHARD SPACES SHARDSPACEORA
TABLESPACES: PRODUCTS_TSP, TSP_SET, USERS
TABLES: LINEITEMS, CUSTOMERS, ORDERS
NETWORK_NAME: emp_sdb.oradbcloud

 

Oracle Sharding supports two types of routing.

The following topics describe routing in an SDB environment.

Direct Routing to a Shard:
Oracle clients and connections pools are able to recognize sharding keys specified in the connection string for high performance data dependent routing. A shard routing cache in the connection layer is used to route database requests directly to the shard where the data resides.

Queries and DMLs via Proxy Routing in an SDB:
Sharding supports routing for queries that do not specify a sharding key. This allows the flexibility for any database application to execute SQL statements (including SELECT and DML) in a system where tables are sharded or duplicated without the need to specify the shards where the query should be executed.

We will discuss below two methods to connect to sharded database.

1- Connect to a shard by specifying a sharding_key
2- Connect to the shardcatalog via GDS$CATALOG service

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.