Thursday, July 8, 2021
ORAPKI commands, oracle wallets ,OHS certificate import export update
ORAPKI commands, oracle wallets ,OHS certificate import export update
Oracel wallets are used to store SSL certificates for producst as OID, OVD, OHS, think of it a combination of Keystore and Truststore which stores both Identity(termed 'User certificate') and Trust certificates .
ORAPKI is the utility provided by oracle to manage public key infrastructure (PKI) elements, such as wallets , on the command line.
this is available under MIDDLEWARE_HOME/ oracle_common/ bin path.
**The other way will be to use EM console for OID or OVD, or to use Oracel Wallet Manager tool(OWM) , I'll have to check it after this** SSL for OID and SSL for OVD.
The syntax for orapki is : orapki module command -parameter value
module will be the object you're working with : wallet (Oracle wallet), crl (certificate revocation list), or cert (PKI digital certificate).
Display a wallet :
./orapki wallet display -wallet /app/Oracle/Middleware/wallet-wam.xxx.com-2017
This will give you an update such as :
User Certificates:
Subject: CN=XXX.XXX.com,OU=TRC,O=XXX.,L=,ST=LA,C=IT
Trusted Certificates:
Subject: OU=Class 1 Public Primary Certification Authority,O=VeriSign\, Inc.,C=US
Subject: CN=XXX-SUBCA,DC=xxxnet,DC=xxx,DC=intranet
Display a certificate :
orapki cert display -cert certificate_location -summary(for brief info) | -complete
Export a cert from a wallet :
orapki wallet export -wallet wallet_location -dn certificate_dn -cert certificate_filename.
./orapki wallet export -wallet /apps/Oracle/Middleware/wallet-abc.xxx.com -dn "CN=XXX-SUBCA,DC=xxxnet,DC=xxx,DC=intranet"-cert /apps/Oracle/Middleware/NEW_CERTNAME.cer
ERRORS :
PKI-04006 : No matching private key in the wallet.
Cause: Attempted to install a user certificate, but no matching private key was found in the wallet.
Action: Make sure that the user certificate is being installed to the wallet where the certificate request was created.
We can not export a user certificate and add it to another wallet since the certification request was not generated from the second wallet.
PKI-02008 : Unable to modify a read-only Auto-login wallet.
Cause: Attempted to update a read-only Auto-login wallet.
Action: Specify the associated Password-protected wallet.
For this error, you'll have to use the -pwd option with the password in the add command itself, if you don't , you'll be prompted to enter the password but it'll not work.
If you don't already have a wallet, or just wanna create a new one :
STEP 1 :
Create a wallet :
./orapki wallet create -wallet /apps/Oracle/Middleware/wallet-abc.xxx.com/ -pwd xxx123 -auto_login
This command creates a wallet with auto-login enabled, or it can also be used to enable auto-login on an existing wallet. If the wallet_location already contains a wallet, then auto-login will be enabled for it. To disable the auto-login feature, delete cwallet.sso.
STEP 2 :
Add a certificate request to an Oracle wallet :
orapki wallet add -wallet wallet_location -dn user_dn -keySize 512|1024|2048
./orapki wallet add -wallet /apps/Oracle/Middleware/wallet-wam.xxx.com-2017/ -dn "CN=abc.xxx.com,OU=ICT,O=xxx S.p.A.,L=San Donato Milanese,ST=Milano,C=IT" -pwd ***123 -keysize 2048 -validity 1024
STEP 3 :
Export the certificate request and share it with you CA to generate a certificate :
orapki wallet export -wallet wallet_location -dn certificate_request_dn -request certificate_request_filename
./orapki wallet export -wallet /apps/Oracle/Middleware/wallet-wam.xxx.com-2017/ -dn "CN=wam.xxx.com,OU=ICT,O=xxx S.p.A.,L=San Donato Milanese,ST=Milano,C=IT" -request /apps/Oracle/Middleware/wallet-wam.xxx.com-2017/wam.xxx.com.csr
To add user certificate :
orapki wallet add -wallet wallet_location -user_cert -cert certificate_location
./orapki wallet add -wallet /apps/Oracle/Middleware/wallet-wam.xxx.com-2017/ -user_cert -cert /apps/Oracle/Middleware/wallet-wam.xxx.com-2017/wam.cer -pwd xxx123
To add a trusted certificate to an Oracle wallet : (we must add all the trust certificates before adding an user certificate)
orapki wallet add -wallet wallet_location -trusted_cert -cert certificate_location
./orapki wallet add -wallet /apps/Oracle/Middleware/wallet-wam.xxx.com-2017/ -trusted_cert -cert /apps/Oracle/Middleware/wallet-wam.xxx.com-2017/xxx_SUBCA.cer -pwd xxx123
To add a root certificate to an Oracle wallet :
orapki wallet add -wallet wallet_location -dn certificate_dn -keySize 512|1024|2048 -self_signed -validity number_of_days
Since I was working with OHS , the way to find the wallet is :
Go to /Middleware_HOME/Oracle_WT1/instances/instance1/config/OHS/password_host1
open the ssl.conf
look for SSLWallet entry , to find the wallet.
As always, thanks for reading !
http://bitoshok-das.blogspot.com/2019/07/orapki-commands-oracle-wallets-ohs_24.html
http://h2hdba.blogspot.com/2016/11/managing-oracle-wallets-and.html
Table or Index Recommendation for reorg
set lines 300 pages 200
col INDEX_NAME for a25
col TABLE_NAME for a35
col INDEX_NAME for a30
SELECT UT.TABLE_NAME, UI.INDEX_NAME, US.BLOCKS AS "TABLE BLOCKS", UI.CLUSTERING_FACTOR AS "INDEX CLUSTERING FACTOR", UT.NUM_ROWS AS "TABLE ROWS",
TRUNC((UT.NUM_ROWS/UI.CLUSTERING_FACTOR)/(UT.NUM_ROWS/UT.BLOCKS),2) as CF
FROM USER_INDEXES UI,
USER_TABLES UT,
USER_CONSTRAINTS UC,
USER_SEGMENTS US
WHERE UI.TABLE_NAME = UT.TABLE_NAME
AND UT.TABLE_NAME = UC.TABLE_NAME
AND UI.INDEX_NAME = UC.INDEX_NAME
AND UT.TABLE_NAME = US.SEGMENT_NAME
AND US.SEGMENT_TYPE = 'TABLE'
AND UC.CONSTRAINT_TYPE = 'P'
AND UI.CLUSTERING_FACTOR > 0
AND UT.BLOCKS > 0
AND UT.NUM_ROWS > 0
AND TRUNC((UT.NUM_ROWS/UI.CLUSTERING_FACTOR)/(UT.NUM_ROWS/UT.BLOCKS),2) < 0.75
and UT.TABLE_NAME not like '%RDF%'
ORDER BY CF;
set lines 300 pages 200
col INDEX_NAME for a25
col TABLE_NAME for a15
SELECT UT.TABLE_NAME, UI.INDEX_NAME, US.BLOCKS AS "TABLE BLOCKS", UI.CLUSTERING_FACTOR AS "INDEX CLUSTERING FACTOR", UT.NUM_ROWS AS "TABLE ROWS",
TRUNC((UT.NUM_ROWS/UI.CLUSTERING_FACTOR)/(UT.NUM_ROWS/UT.BLOCKS),2) CF
FROM USER_INDEXES UI,
USER_TABLES UT,
USER_CONSTRAINTS UC,
USER_SEGMENTS US
WHERE UI.TABLE_NAME = UT.TABLE_NAME
AND UT.TABLE_NAME = UC.TABLE_NAME
AND UI.INDEX_NAME = UC.INDEX_NAME
AND UT.TABLE_NAME = US.SEGMENT_NAME
AND US.SEGMENT_TYPE = 'TABLE'
AND UC.CONSTRAINT_TYPE = 'P'
AND UT.TABLE_NAME IN ('SALES_DATA','MDP_MATRIX','ITEMS','T_EP_CTO_DATA','T_EP_CTO_MATRIX','GPS_OPPTY_DATA','GPS_OPPTY_DATES','GE_OPPTY','GE_OPPTY_MATRIX')
;
eDB360 and SQLd360 | performance Tools
SQL Tuning scripts
https://github.com/Apress/pro-oracle-sql/tree/master/Pro%20Oracle%20SQL
https://github.com/Apress/pro-oracle-sql/tree/master/Pro%20Oracle%20SQL/chapter16_scripts
https://github.com/tanelpoder/tpt-oracle
https://github.com/sqldb360/sqldb360
https://carlos-sierra.net/2016/11/23/edb360-takes-long-to-execute/
https://mauro-pagano.com/2018/06/11/introducing-sqldb360-merging-edb360-and-sqld360-while-rising-the-bar-to-community-engagement/
12.2 E-Business Suite Technology Stack Summary Of The iAS / HTTP Server Login Process And What To Expect When One Of The Login Components Fails (Doc ID 1984710.1)
12.2 E-Business Suite Technology Stack Summary Of The iAS / HTTP Server Login Process And What To Expect When One Of The Login Components Fails (Doc ID 1984710.1)
Using Load Balancers with Oracle E-Business Suite Release 12.2 (Doc ID 1375686.1)
Oracle Applications E-Business Suite 12.2 Fusion Middleware Log Files: Locate,View, and Control (Doc ID 1366187.1)
Oracle E-Business Suite 12.2 Patching Technology Components Guide (Doc ID 1355068.1)
Oracle E-Business Suite Release 12.2 Technology Stack Documentation Roadmap (Doc ID 1934915.1)
Primary Note For Oracle Recovery Manager (RMAN) (Doc ID 1116484.1)
ocument
Details
Actions
Introduction
Getting started with RMAN
Backing up Database files using RMAN and Maintaining the backup records.
Restore and recovery techniques/scenarios using RMAN.
Tablespace point in time recovery
Rman Transportable tablespaces and database.
Rman Performance.
RMAN and Media managers
Rman and Dataguard
Rman and Rac
Rman and Corruption
Related Primary Notes
Using My Oracle Support Effectively
Generic Links
References
APPLIES TO:
Oracle Database Cloud Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 10.1.0.2 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Information in this document applies to any platform.
DETAILS
This Primary Note is intended to provide an index and references to the most frequently used My Oracle Support Notes with respect to Oracle Recovery Manager (RMAN).
This Primary Note is subdivided into categories to allow for easy access and reference to notes that are applicable to your area of interest, within RMAN.This includes the following categories:
Getting started with RMAN
Rman compatibility
Flash Recovery Area
Configuring the environment for RMAN backups
Recovery catalog for RMAN backups
Backing up database files using RMAN and maintaining the backup records
Restore and recovery techniques/scenarios using RMAN
Tablespace point in time recovery (TSPITR)
RMAN Transportable tablespaces and database
RMAN Duplicate database
RMAN Performance.
RMAN and Media managers.
RMAN and Dataguard
RMAN and Rac
RMAN and Corruption
Related Primary Notes
Using My Oracle Support Effectively
Generic Links
ACTIONS
Introduction
Recovery Manager is Oracle’s utility to manage the backup, and more importantly the recovery, of the database. It eliminates operational complexity while providing superior performance and availability of the database. Recovery Manager debuted with Oracle8 to provide DBAs an integrated backup and recovery solution.
Recovery Manager determines the most efficient method of executing the requested backup, restore, or recovery operation and then executes these operations in concert with the Oracle database server. Recovery Manager and the server automatically identify modifications to the structure of the database and dynamically adjust the required operation to adapt to the changes.
This note applies to the following versions of these products:
Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 10.2.0.x
Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.x
Oracle Server - Enterprise Edition - Version: 11.2.0.1 to 11.2.0.x
Oracle Server - Enterprise Edition - Version: 12.1.0.1 to 12.2.0.x
Getting started with RMAN
The articles in this section give you a overview of the oracle utility RMAN, the new features of RMAN in Oracle 11 release 1,2,12.1,12.2 and FAQ on RMAN.
Note.360416.1 Getting Started with Recovery Manager (RMAN)
Note.469777.1 RMAN - Frequently Asked Question (FAQ)
Note 809867.1 RMAN 11gR1: New Features
Note 1115423.1 RMAN Enhancements In Oracle 11g.
Note 1534487.1 RMAN Enhancements in Oracle 12c
Note 1521005.1 RMAN Pluggable Database Backup and Recovery in a Multitenant Environment
Note 1521075.1 RMAN Pluggable Database Point in Time Recovery
Rman compatibility
Note.73431.1 RMAN Compatibility Matrix
Flash Recovery Area
The flash recovery area is an Oracle-managed directory, file system, or Automatic Storage Management disk group that provides a centralized disk location for backup and recovery files. All the files you need to completely recover a database from a media failure are part of the Flash Recovery Area. Oracle creates archived logs and flashback logs in the flash recovery area. RMAN can store its backup sets and image copies in the flash recovery area, and it uses it when restoring files during media recovery. The flash recovery area also acts as a disk cache for tape.
The articles mentioned in the following section help you in understanding the concepts and working of flash recovery area, RMAN integration with the flash recovery area, troubleshooting flash recovery area issues.
Note.305648.1 What is a Flash Recovery Area and how to configure it?
Note.305796.1 RMAN and Flash Recovery Area
Note.833663.1 Flash Recovery Area - FAQ
Note.560133.1 Benefits Of Using Flash Recovery Area
Note.315098.1 How is the space pressure managed in the Flash Recovery Area - An Example.
Note.305812.1 Flash Recovery area - Space management Warning & Alerts
Note.829755.1 Space issue in Flash Recovery Area(FRA)
Note.305810.1 Configuring file creation in Flash recovery area and order of Precedence
Note.305651.1 How to change Flash Recovery Area to a new location?
Document 2308215.1 12.2 Perform Flashback at PDB Level
Document 1521524.1 RMAN RECOVER TABLE Feature New to Oracle Database 12c
Configuring the Environment for RMAN Backups
To simplify ongoing use of RMAN, you can set a number of persistent configuration settings for each target database. These settings control many aspects of RMAN behavior. For example, you can configure the backup retention policy, default destinations for backups, default backup device type, and so on. You can use the SHOW and CONFIGURE commands to view and change RMAN configurations.
The articles mentioned in the following section help you in configuring the rman persistent configurations, understanding their behavior and troubleshooting them.
Note.462978.1 Rman backup retention policy
Note.463875.1 Frequently asked questions on Rman backup retention policy
Note.351455.1 Oracle Suggested Strategy & Backup Retention
Recovery Catalog for Rman backups.
A recovery catalog is a set of tables and views that Recovery Manager (RMAN) uses to store metadata (information about a database structure, archived redo logs, backup sets, and data file copies) about a target database (database that RMAN backups or restores). RMAN uses this metadata to conduct its backup, recovery, and maintenance operations. Recovery catalog is optional, i.e., if a recovery catalog is not created, RMAN uses the target database’s control file to store the metadata about the target database. Although RMAN can conduct all major backup and recovery operations by using the control file, some RMAN commands work only if a recovery catalog exists.
The articles in the following section describe the configuration, management of recovery catalog and some of the known issues related to recovery catalog.
Note.452529.1 Recovery catalog for RMAN backup
Note.467969.1 How To Configure RMAN Recovery Catalog Using Enterprise Manager DB Console.
Note 2039848.1 Known Issues with RMAN Oracle12c Catalog
Backing up Database files using RMAN and Maintaining the backup records.
The articles and links in the following section describe the different methods to perform backups and useful rman backup methods.
Oracle Database Backup and Recovery Advanced User's Guide
Rman backup concepts - http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#i1006083
Backing up database - http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmbckba.htm#i1005689
Advanced backups - http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmbckad.htm#CEGHFJCF
Backup maintenance - http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmmaint.htm#j1006083
NOTE:388422.1 Top 10 Backup and Recovery best practices
Note 262853.1 10G RMAN Fast Incremental Backups
Note.745798.1 Merged Incremental Backup Strategies
Note.735953.1 How To Configure RMAN Backups To Tape via Oracle Enterprise Manager
Note.550082.1 How To Catalog Tape Backup Pieces
Note.137181.1 RMAN Backup Shell Script Example
Restore and recovery techniques/scenarios using RMAN.
The articles in this section provide various restore and recovery techniques and scenarios what can be achieved using rman.
Note.144911.1 RMAN: Block-Level Media Recovery - Concept & Example
NOTE:388422.1 Top 10 Backup and Recovery best practices
Note.94114.1 Backup and Recovery Scenarios
Note.372996.1 Using RMAN to Restore and Recover a Database When the Repository and Spfile/Init.ora Files Are Also Lost
Note.223543.1 How to Recover From a DROP / TRUNCATE / DELETE TABLE with RMAN
Note.403883.1 How To Restore Controlfile From A Backupset Without A Catalog Or Autobackup
Note.580414.1 RMAN - How to restore the controlfile using RMAN
Note.419137.1 How To Restore Rman Backups On A Different Node When The Directory Structures Are Different
Note.415579.1 HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node
Note.472536.1 10g RMAN Benefits of Simplified Recovery Through Resetlogs.
Note.358171.1 Oracle10g RMAN will not restore in parallel from tape
Document 2300465.1 12.2 NEW FEATURE : -RECOVER DATABASE UNTIL AVAILABLE REDO
Tablespace point in time recovery
Recovery Manager (RMAN) Automatic TSPITR enables quick recovery of one or more tablespaces in a database to an earlier time without affecting the rest of the tablespaces and objects in the database.Here are a few articles which explain the steps involved in performing a TSPITR:
Note 335851.1 Automatic TSPITR in 10G RMAN -A walk Through
Note 1531202.1 RMAN TSPITR Tips and Tricks
Note 304305.1 Limitations of RMAN TSPITR
Rman Transportable tablespaces and database.
Rman can be used to create transportable tablespace sets and can be used to convert the datafiles for cross platform transportable tablespace and database. Here are a few articles which provide all the required information to understand the procedures:
Note.371556.1 How move tablespaces across platforms using Transportable Tablespaces with RMAN
Note.455593.1 Creating a transportable tablespace set from RMAN backupsets
Note.831223.1 Using Rman Incremental backups To Update Transportable Tablespaces.
Note.1401921.1 Cross-Platform Database Migration (across same endian) using RMAN Transportable Database
Note.733205.1 Migration of Oracle Database Instances Across OS Platforms
Note 1389592.1 11G - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
Note 2005729.1 12C - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
Document 2307383.1 12.2 RMAN Cross Platform Tablespace Transport Over Network
Document 2307358.1 12.2 RMAN Cross Platform Transport Of TDE-encrypted tablespace
Rman Duplicate Database
Database duplication is the use of the DUPLICATE command to copy all or a subset of the data in a source database. The duplicate database (the copied database) functions entirely independently from the source database (the database being copied).In articles in this section help you in understanding the duplicate procedures and various techniques available for the rman duplicate operation.
Note.228257.1 RMAN 'Duplicate Database' Feature in Oracle9i / 10G and 11G
Note.452868.1 RMAN 'Duplicate Database' Feature in 11G
Note.388431.1 Creating a Duplicate Database on a New Host.
Note.382669.1 Duplicate database from non ASM to ASM (vise versa) to a different host
Note.388424.1 How To Create A Production (Full or Partial) Duplicate On The Same Host
Note.293717.1 How to duplicate a database to previous incarnation
Note.1910175.1 RMAN DUPLICATE / RESTORE including Standby in ASM with OMF / non-OMF / Mixed Name for Datafile / Online Log / Controlfile
Note.1913937.1 RMAN Duplicate Database From RAC ASM To RAC ASM
Note.840647.1 Article on How to do Rman Duplicate on ASM/RAC/OMF/Single Instance
Note.360962.1 Manual Completion of a Failed RMAN Duplicate
Note.369644.1 Answers To FAQ For Restoring Or Duplicating Between Different Versions And Platforms
Note.1079563.1 RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support
Note 1375864.1 Perform Backup Based RMAN DUPLICATE Without Connecting To Target Database For Both Disk & Tape Backups
Document 2022820.1 Upgrade to 12c(12.1 /12.2) through RMAN Duplicate using BACKUP LOCATION with NOOPEN clause
Rman Performance.
Note.360443.1 RMAN Backup Performance
Note 740911.1 RMAN Restore Performance
Note 247611.1 Known RMAN Performance Problems
Note 579158.1 Advise On How To Improve Rman Performance
Note 463227.1 Oracle10g RMAN Recovery Catalog Known Performance Issues
Note 1487262.1 Script to monitor RMAN Backup and Restore Operations
RMAN and Media managers
Oracle designed an architecture that allows RMAN to manage the process of database backup and recovery, yet integrate with industry-leading tape storage management subsystems. The interface between Rman and media management vendor products is keyed on an Oracle design specification. This specification allows Oracle RMAN to use third party media management software to back-up to and restore from tape.
Many organizations rely on Oracle to provide solutions for very large or highly distributed mission critical systems. In addition to needing databases capable of handling large amounts of data and complex queries, these organizations also need robust backup and recovery technology. Recovery of data quickly and reliably is paramount should some aspect of the system fail. To address these needs, Oracle has created the Backup Solutions Program (BSP), a cooperative program designed to facilitate tighter integration between Oracle's backup products and those of third-party media management vendors. Together, Oracle and media management vendors provide robust easy-to-use database backup and recovery solutions to customers with high-end requirements.
The link to access the information regarding backup solutions program is:
http://www.oracle.com/technetwork/database/features/availability/bsp-088814.html
"Under the BSP, vendors are committed to integrating Recovery Manager (RMAN) with their media management software packages and provide first line technical support for the integrated backup and recovery solutions for Oracle RDBMS."
So any issues related to the media manager functionality or configuration has to be addressed only by the vendors and not by Oracle.
Below are a few articles which help you in understanding the most common issues with rman backups to tape, environment variable used for backups to tape and procedure to check if the media manager installation has been done properly.
Note.942418.1 How To Verify A Media Manager Layer Installation?
Note 227517.1 Main Index of Common Causes for ORA-19511
NOTE.312737.1 RMAN and Specific Media Managers Environment Variables.
Rman and Dataguard
Data Guard and RMAN were both designed with the Oracle database architecture in mind. Together, they offer the most reliable and tightly integrated solution to achieve superior levels of Oracle database availability supporting your mission critical applications. Data Guard and RMAN are both fully supported features of the Oracle Database Enterprise Edition (RMAN is also provided with Oracle Database Standard Edition).Here are a few articles that help you in effectively using rman with dataguard and some of the known rman issues with dataguard.
Note.848716.1 Using RMAN Effectively In A Dataguard Environment
Note.357759.1 Known RMAN - Dataguard Problems
Note 836986.1 Steps to perform for Rolling forward a standby database using RMAN Incremental Backup.
Rman and Rac
Note 243760.1 RMAN: RAC Backup and Recovery using RMAN
Note.415579.1 HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node
Note.1913937.1 RMAN Duplicate Database From RAC ASM To RAC ASM
Note.840647.1 Article on How to do Rman Duplicate on ASM/RAC/OMF/Single Instance
Rman and Corruption
Rman is a very effective utility in identifying the database block corruption. Here are are a few article which provides the information about using rman to detect and fix corruption.
Note 836658.1 Identify the corruption extension using RMAN/DBV/ANALYZE etc
Note.561010.1 Which Blocks Will RMAN Check For Corruption Or Include In A Backupset?
Note 428570.1 Best Practices for Avoiding and Detecting Corruption
Note.472231.1 How to identify all the Corrupted Objects in the Database reported by RMAN
Note 471716.1 11g New Feature V$Database_block_corruption Enhancements and Rman Validate Command
Related Primary Notes
Note 1199803.1 Primary Note For Oracle Backup And Recovery
Note 1096952.1 Primary Note for Real Application Clusters (RAC) Oracle Clusterware and Oracle Grid Infrastructure
Note 1088018.1 Primary Note for Oracle Database Corruption
Note 1101938.1 Primary Note for Data Guard
Using My Oracle Support Effectively
Note 747242.5 My Oracle Support Configuration Management FAQ
Note 166650.1 Working Effectively With Global Customer Support
Note 199389.1 How To Request Management Attention to a Service Request (SR) with Oracle Support Services
Generic Links
Note 854428.1 Patch Set Updates for Oracle Products
Note 1061295.1 Patch Set Updates - One-off Patch Conflict Resolution
Note 756671.1 Oracle Recommended Patches -- Oracle Database
Note 268895.1 Oracle Database Patchset Information, Versions 10.2.0 to 12.1.0
Note 161549.1 Oracle Database Server and Networking Patches for Microsoft Platforms
Note 161818.1 Oracle Database (RDBMS) Releases Support Status Summary
REFERENCES
NOTE:360962.1 - Manual Completion of a Failed RMAN Backup based Duplicate
NOTE:419137.1 - How To Restore Rman Backups On A Different Node When The Directory Structures Are Different
NOTE:428570.1 - Best Practices for Avoiding and Detecting Corruption
NOTE:452529.1 - Recovery catalog for RMAN backup
NOTE:452868.1 - RMAN 'Duplicate From Active Database'
NOTE:455593.1 - Creating a transportable tablespace set from RMAN backupsets
NOTE:472536.1 - 10g RMAN Benefits of Simplified Recovery Through Resetlogs.
NOTE:550082.1 - HOW TO CATALOG TAPE BACKUP PIECES
NOTE:560133.1 - Benefits Of Using Flash Recovery Area
NOTE:561010.1 - Which Blocks Will RMAN Check For Corruption Or Include In A Backupset?
NOTE:382669.1 - DUPLICATE (Backup based) DATABASE from non ASM to ASM (vice versa) to different host
NOTE:388422.1 - Top 10 Backup and Recovery Best Practices
NOTE:351455.1 - Oracle Suggested Strategy & Backup Retention
NOTE:1910175.1 - RMAN DUPLICATE / RESTORE including Standby in ASM with OMF / non-OMF / Mixed Name for Datafile / Online Log / Controlfile
NOTE:848716.1 - Using RMAN Effectively In A Dataguard Environment.
NOTE:854428.1 - Patch Set Updates for Oracle Products
NOTE:809867.1 - RMAN 11gR1 : New Features
NOTE:829755.1 - Space issue in Fast / Flash Recovery Area - FRA Full
NOTE:268895.1 - Oracle Database Patchset Information, Versions 10.2.0 to 12.2.0
NOTE:1531202.1 - RMAN TSPITR Tips and Tricks
NOTE:199389.1 - How To Request Management Attention on a Service Request (SR) with Oracle Support Services
NOTE:304305.1 - Limitations of RMAN TSPITR
NOTE:735953.1 - This document has been replaced with more recent information on this topic. Please refer to more recent documentation.
NOTE:740911.1 - RMAN Restore Performance
NOTE:745798.1 - RMAN: Merged Incremental Backup Strategies
NOTE:360416.1 - Getting Started with Recovery Manager (RMAN)
NOTE:223543.1 - How to Recover From a DROP / TRUNCATE / DELETE TABLE with RMAN
NOTE:1199803.1 - Primary Note For Oracle Backup And Recovery
NOTE:888.1 - Primary Note for Database Proactive Patch Program
NOTE:1101938.1 - Primary Note for Data Guard
NOTE:1389592.1 - 11G - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
NOTE:2005729.1 - 12C - Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup
NOTE:1375864.1 - Perform Backup Based RMAN DUPLICATE Without Connecting To Target Database For Both Disk & Tape Backups
NOTE:227517.1 - Main Index of Common Causes for ORA-19511
NOTE:360443.1 - RMAN Backup Performance
NOTE:369644.1 - Frequently Asked Questions about Restoring Or Duplicating Between Different Versions And Platforms
NOTE:357759.1 - Known RMAN - Dataguard Problems
NOTE:358171.1 - Oracle10g: RMAN will not restore in parallel from tape
NOTE:472231.1 - How to identify all the Corrupted Objects in the Database with RMAN
NOTE:243760.1 - RMAN: RAC Backup, Restore and Recovery using RMAN
NOTE:1088018.1 - Primary Note for Handling Oracle Database Corruption Issues
NOTE:1115423.1 - Rman Enhancements In Oracle 11g.
NOTE:305812.1 - Flash Recovery area - Space management Warning & Alerts
NOTE:463875.1 - Frequently asked questions on Rman backup retention policy
NOTE:833663.1 - Flash Recovery Area - FAQ
NOTE:262853.1 - RMAN Fast Incremental Backups using BCT = Block Change Tracking file
NOTE:312737.1 - RMAN and Specific Media Managers Environment Variables.
NOTE:315098.1 - How is the space pressure managed in the Flash Recovery Area - An Example.
NOTE:463227.1 - Oracle10g RMAN Recovery Catalog Known Performance Issues
NOTE:305651.1 - How to change Flash Recovery Area to a new location ?
NOTE:371556.1 - How to Migrate to different Endian Platform Using Transportable Tablespaces With RMAN
NOTE:372996.1 - Using RMAN to Restore and Recover a Database When the Repository and Spfile/Init.ora Files Are Also Lost
NOTE:293717.1 - How to duplicate a database to a previous Incarnation
NOTE:1079563.1 - RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support
NOTE:247611.1 - Known RMAN Performance Problems
NOTE:305796.1 - RMAN and Flash Recovery Area
NOTE:305810.1 - Configuring file creation in Flash recovery area and order of Precedence
NOTE:467969.1 - How To Configure RMAN Recovery Catalog Using Enterprise Manager DB Console.
NOTE:469777.1 - RMAN -- Frequently Asked Question (FAQ)
NOTE:1913937.1 - STEP BY STEP RMAN DUPLICATE Database From RAC ASM To RAC ASM
NOTE:403883.1 - How To Restore Controlfile From A Backupset Without A Catalog Or Autobackup
NOTE:415579.1 - How To Restore RMAN Disk backups of RAC Database to Single Instance On Another Node
NOTE:137181.1 - RMAN Backup Shell Script Example
NOTE:1401921.1 - Cross-Platform Database Migration (across same endian) using RMAN Transportable Database
NOTE:144911.1 - RMAN : Block-Level Media Recovery - Concept & Example
NOTE:836658.1 - Identify the Corruption Extension for Block Corruption, Table/Index Inconsistency, Data Dictionary and Lost Writes
NOTE:840647.1 - How to use Rman Duplicate on ASM/RAC/OMF/Single Instance
NOTE:335851.1 - Automatic TSPITR in 10G RMAN -A walk Through
NOTE:580414.1 - RMAN - How to restore the controlfile using RMAN
NOTE:161818.1 - Oracle Database (RDBMS) Releases Support Status Summary
NOTE:2039848.1 - Known Issues with RMAN Oracle12c Catalog
NOTE:166650.1 - Working Effectively With Oracle Support - Best Practices
NOTE:747242.5 - My Oracle Support FAQ
NOTE:733205.1 - Migration Of An Oracle Database Across OS Platforms (Generic Platform)
NOTE:388424.1 - How To Create A Production (Full or Partial) Duplicate On The Same Host
NOTE:388431.1 - Creating a Duplicate Database on a New Host (non ASM).
NOTE:1487262.1 - Script to monitor RMAN Backup and Restore Operations
NOTE:305648.1 - What is a Flash / Fast Recovery Area and how to configure it ?
NOTE:1061295.1 - Patch Set Updates - One-off Patch Conflict Resolution
NOTE:94114.1 - Backup and Recovery Scenarios
NOTE:462978.1 - Rman backup retention policy
NOTE:942418.1 - How To Verify A Media Manager Layer Installation ?
NOTE:228257.1 - RMAN 'Duplicate Database' Feature in Oracle9i / 10G and 11G
NOTE:579158.1 - Advise On How To Improve Rman Performance
NOTE:73431.1 - RMAN Compatibility Matrix
RMAN Pluggable Database Backup and Recovery in a Multitenant Environment (Doc ID 1521005.1) To BottomTo Bottom
Document
Purpose
Scope
Details
References
APPLIES TO:
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
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
PURPOSE
An overview of how RMAN can be used to backup and recover Pluggable Databases - a new feature in Oracle Database 12c.
SCOPE
DBAs supporting large databases with backups made via RMAN who are looking to implement a Container Database with one or more
Pluggable Databases. Knowledge of RMAN and its architecture is required.
DETAILS
What is a Container Database?
A 12c database is either a non-Container Database or a Container Database - from here on referred to as non-CDB or CDB respectively.
All databases created prior to 12c are non-CDBs.
A CDB is an Oracle database that includes zero, one, or many customer-created Containers or Pluggable Databases referred to as PDB.
The CDB has:
one ROOT container (CDB$ROOT) containing SYSTEM, SYSAUX, UNDO, and TEMP tablespaces, Controlfiles and Redologs
one SEED container (PDB$SEED) containing SYSTEM, SYSAUX, TEMP, EXAMPLE tablespaces, used as a template to create new PDBs
What is a Pluggable Database?
A pluggable Database (PDB) is a user-created container holding the data and code for a specific application eg HR, Payroll etc.
A PDB:
has SYSTEM, SYSAUX, TEMP tablespaces
contains any number of other user created tablespaces
writes to the container UNDO tablespace, controlfiles and redologs
Undo and redo is annotated with details of the PDB that they belong to.
RMAN Pluggable Database Backup
The RMAN user must have either SYSDBA or the new SYSBACKUP priviledge.
RMAN can be run from ROOT container: rman target sys/@t12ccdb
rman target /
or from the PDB: rman target sys/@t12cpdb1
When connected to a PDB, all commands pertain to that PDB only.
When connected to ROOT, commands pertain to any file in the CDB unless qualified by the PDB name.
RMAN command REPORT SCHEMA can be used to identify the files in a Container Database.
This example shows a CDB (T12cCDB) with one PDB (T12cPDB1):
% rman target sys/@t12ccdb
RMAN> report schema;
using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name T12CCDB
** (filenames have been edited for clarity)
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 960 SYSTEM *** .../oradata/T12CCDB/datafile/o1_mf_system_8008cm5s_.dbf
3 660 SYSAUX *** .../oradata/T12CCDB/datafile/o1_mf_sysaux_80089voz_.dbf
4 50 UNDOTBS1 *** .../oradata/T12CCDB/datafile/o1_mf_undotbs1_8gtp7g6l_.dbf
5 250 PDB$SEED:SYSTEM *** .../oradata/T12CCDB/C4B70772D4DF1DF8E0437108DC0A7D20/datafile/o1_mf_system_8008jc7k_.dbf
6 5 USERS *** .../oradata/T12CCDB/datafile/o1_mf_users_8008fnov_.dbf
7 490 PDB$SEED:SYSAUX *** .../oradata/T12CCDB/C4B70772D4DF1DF8E0437108DC0A7D20/datafile/o1_mf_sysaux_8008jc8m_.dbf
8 250 T12CPDB1:SYSTEM *** .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_system_8008r3wh_.dbf
9 510 T12CPDB1:SYSAUX *** .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_sysaux_8008r3vl_.dbf
10 5 T12CPDB1:USERS *** .../oradata/T12CCDB/datafile/o1_mf_users_8gtp7ghf_.dbf
20 100 T12CPDB1:RECTBL *** .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_rectbl_8hfcv26r_.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 530 TEMP 32767 .../oradata/T12CCDB/datafile/o1_mf_temp_8bz0jcxg_.tmp
2 20 PDB$SEED:TEMP 32767 .../oradata/T12CCDB/C40F9B49FC9C19E0E0430BAAE80AFF01/datafile/o1_mf_temp_8bz0jfkj_.tmp
3 20 T12CPDB1:TEMP 32767 .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_temp_8bz0jh7x_.tmp
REPORT SCHEMA command is currently the only command that makes it easy to determine the name of the PDB that a file belongs to.
If connected to PDB, only the PDB datafiles are listed:
% rman target sys/@t12cpdb1
RMAN> report schema;
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
8 250 T12CPDB1:SYSTEM *** .../oradata/T12CCDB/datafile/o1_mf_system_8hloc72d_.dbf
9 510 T12CPDB1:SYSAUX *** .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_sysaux_8008r3vl_.dbf
10 5 T12CPDB1:USERS *** .../oradata/T12CCDB/datafile/o1_mf_users_8hlowbh2_.dbf
20 100 T12CPDB1:RECTBL *** .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_rectbl_8hfcv26r_.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
3 20 T12CPDB1:TEMP 32767 .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_temp_8bz0jh7x_.tmp
1. Complete CDB backup
Backup CDB$ROOT, PDB$SEED and ALL PDBS:
% rman target sys/@t12ccdb
RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;
RMAN> LIST BACKUP OF DATABASE;
List of Backup Sets
===================
...
------- ---- -- ---------- ----------- ------------ ---------------
82 Full 2.46G DISK 00:01:01 17-JAN-13
BP Key: 83 Status: AVAILABLE Compressed: NO Tag: TAG20130117T114547
Piece Name: .../fast_recovery_area/T12CCDB/backupset/2013_01_17/o1_mf_nnndf_TAG20130117T114547_8hhs3cgs_.bkp
List of Datafiles in backup set 82
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 2139245 17-JAN-13 .../oradata/T12CCDB/datafile/o1_mf_system_8008cm5s_.dbf
3 Full 2139245 17-JAN-13 .../oradata/T12CCDB/datafile/o1_mf_sysaux_80089voz_.dbf
4 Full 2139245 17-JAN-13 .../oradata/T12CCDB/datafile/o1_mf_undotbs1_8gtp7g6l_.dbf
5 Full 1621614 13-JUL-12 .../oradata/T12CCDB/C4B70772D4DF1DF8E0437108DC0A7D20/datafile/o1_mf_system_8008jc7k_.dbf
6 Full 2139245 17-JAN-13 .../oradata/T12CCDB/datafile/o1_mf_users_8008fnov_.dbf
7 Full 1621614 13-JUL-12 .../oradata/T12CCDB/C4B70772D4DF1DF8E0437108DC0A7D20/datafile/o1_mf_sysaux_8008jc8m_.dbf
8 Full 2139245 17-JAN-13 .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_system_8008r3wh_.dbf
9 Full 2139245 17-JAN-13 .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_sysaux_8008r3vl_.dbf
10 Full 2139245 17-JAN-13 .../oradata/T12CCDB/datafile/o1_mf_users_8gtp7ghf_.dbf
20 Full 2139245 17-JAN-13 .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_rectbl_8hfcv26r_.dbf
2. Partial CDB backup
Backup only PDB T12CPDB1:
%rman target sys/@t12ccdb
RMAN> BACKUP PLUGGABLE DATABASE T12CPDB1 TAG 'T12CPDB1';
RMAN> LIST BACKUP;
...
------- ---- -- ---------- ----------- ------------ ---------------
85 Full 590.52M DISK 00:00:14 17-JAN-13
BP Key: 86 Status: AVAILABLE Compressed: NO Tag: T12CPDB1
Piece Name: .../fast_recovery_area/T12CCDB/backupset/2013_01_17/o1_mf_nnndf_T12CPDB1_8hhswy1c_.bkp
List of Datafiles in backup set 85
Container ID: 3, PDB Name: T12CPDB1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
8 Full 2139742 17-JAN-13 .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_system_8008r3wh_.dbf
9 Full 2139742 17-JAN-13 .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_sysaux_8008r3vl_.dbf
10 Full 2139742 17-JAN-13 .../oradata/T12CCDB/datafile/o1_mf_users_8gtp7ghf_.dbf
20 Full 2139742 17-JAN-13 .../oradata/T12CCDB/C4B71645EF062616E0437108DC0A91E4/datafile/o1_mf_rectbl_8hfcv26r_.dbf
You do not need to specify a TAG, as in example above to identify backups of Pluggable Database, TAG is just used in this sample.
RMAN LIST BACKUP command shows you the information to which Database, or Pluggable Database a rman backup belongs to.
However as FRA shows GUID in its PATH name, so in case needed you may use alternate following
sample query to identify to which PDB a Backup belongs to:
In this sample: The GUID for T12CPDB1 is C4B71645EF062616E0437108DC0A91E4.
From the CDB:
SQL> SET LINES 150
SQL> SELECT CON_ID, DBID, CON_UID, GUID, NAME FROM v$pdbs;
CON_ID DBID CON_UID GUID NAME
---------- ---------- ---------- -------------------------------- ------------------------------
2 4031181962 4031181962 C40F9B49FC9C19E0E0430BAAE80AFF01 PDB$SEED
3 575001283 575001283 C4B71645EF062616E0437108DC0A91E4 T12CPDB1
3. Partial PDB backup
3a. Backup system and sysaux tablespace from PDB T12CPDB1 whilst connected to ROOT:
% rman target sys/@t12ccdb
RMAN>BACKUP TABLESPACE T12CPDB1:SYSTEM, T12CPDB1:SYSAUX;
3b. Backup system tablespace from pluggable database T12CPDB1 and the SYSAUX tablespace from ROOT CDB:
When connected to ROOT if you do not specify the PDB prefix, the ROOT container is assumed.
% rman target sys/@t12ccdb
RMAN>BACKUP TABLESPACE T12CPDB1:SYSTEM, SYSAUX;
3c. File# however is unique so you can backup datafiles when connected to ROOT without having to specify the container name if you use file#:
To backup datafile 3 from CDB$ROOT and datafile 20 from PDB T12CPDB1
% rman target sys/@t12ccdb
RMAN> BACKUP DATAFILE 3,20;
RMAN Pluggable Database Recovery
1. Loss of system datafile from PDB T12cPDB1
The Container Database and all other PDBs are usually unaffected, only PDB T12CPDB1 is unavailable.
Restore must be done from ROOT.
However loss of a SYSTEM datafile of PDB is as critical as loss of a SYSTEM datafile of CDB/non-CDB, i.e. this will may lead to unpredictable behaviour, mostly crash the entire CDB (i.e. all PDBs will be unavailable).
In this case, you need to restore/recover this SYSTEM datafile of PDB in MOUNT state of CDB.
This behaviour will be enhanced in future releases, i.e., loss of SYSTEM datafile of PDB will NOT crash the CDB or other PDBs.
% rman target /
RMAN> RESTORE DATAFILE 8;
RMAN> RECOVER DATAFILE 8;
RMAN> ALTER PLUGGABLE DATABASE T12CPDB1 OPEN;
2. Loss of any non-system datafile from PDB eg datafile 10 USERS tablespace
Depending on the circumstances, the file may be already offlined if not - offline it:
% rman sys/@t12cpdb1
RMAN> ALTER DATABASE DATAFILE 10 OFFLINE;
RMAN> RESTORE DATAFILE 10;
RMAN> RECOVER DATAFILE 10;
RMAN> ALTER DATABASE DATAFILE 10 ONLINE;
3. Loss of a complete tablespace from PDB
PDB T12CPDB1 remains open.
% rman target sys/oracle@t12ccpdb1
RMAN> ALTER TABLESPACE USERS OFFLINE;
RMAN> RESTORE TABLESPACE USERS;
RMAN> RECOVER TABLESPACE USERS;
RMAN> ALTER TABLESPACE USERS ONLINE;
4: Loss of entire PDB
% rman target sys/@t12ccdb
RMAN> RESTORE PLUGGABLE DATABASE T12CPDB1;
RMAN> RECOVER PLUGGABLE DATABASE T12CPDB1;
RMAN> ALTER PLUGGABLE DATABASE T12cPDB1 open;
Note:
# LOSS OF PLUGGABLE DATABASE is not the same as if Pluggable DAtabase is DROPPED
- LOSS OF PLUGGABLE DATABASE: This is for example if pluggable database/datafiles are accidently deleted, corrupted etc...
but the repository/metadta are still known and existing.
In this case the Metadata for the PDB do still exist, so REstore form backup is possible
- IF DROP PLUGGABLE DATABASE is done
This will drop the PDB and remove the metadata from repository,
so restore ( including PDB - PITR to before the dropped time ) fails
like
.
RMAN-06813: could not translate pluggable database PDB1
Also , If we do backup of single pluggable database backup, this will not be useful to restore single pluggable database in the different server OR to perform Point in time recovery.
******** We must be having backup of root & pluggable database **************
Complete reference - Oracle Sharding 12.2 (Doc ID 2143551.1)
ument
Goal
Table Of Contents:
Introduction
What is Sharding?
Sharding Vs Non Sharding
Benefits of Sharding
Types of Sharding
System Managed Sharding
User Defined Sharding
Composite Sharding
Complete Reference Document
DEMO
Solution
APPLIES TO:
Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud 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:
DATABASE: PROD, SH1, SH2, SH3
This Article is intended to detail the features of Sharding which is available in Oracle 12.2. Oracle Sharding is a database scaling technology based on horizontal partitioning of data across multiple databases.
Table Of Contents:
Introduction
What is Sharding?
Sharding Vs Non Sharding
Benefits of Sharding
Types of Sharding
System Managed Sharding
User Defined Sharding
Composite Sharding
Complete Reference Document
DEMO
SOLUTION
Introduction:
Data is split into multiiple Databases called Shards. Sharding is a Sharded-nothing database architecture since Shards don't share physical resources such as CPU,memory or storage devices. From the DBA perspective, an SDB consists of multiple databases that can be managed either collectively or individually. However from the perspective of an application team an SDB looks like a single database. The number of shards and distribution of data across them are completely transparent to database applications.
What is Sharding?
Oracle Sharding is a Data Tier Architecture in which Data is horizontally partitioned across different databases. It is scalability and availability feature for custom designed OLTP applications that enable distribution and replication of data across a pool of discrete Oracle databases that share no hardware or software. The pool of database is presented to application as a single logical database. Applications elastically scale any level on any platform by adding database (shards) into pool. Oracle Sharding scaled upto 1000 Shards in current version. In regards to replication Sharding supports Oracle Data Guard and Oracle Golden Gate.
Each database in a pool (Shards) runs in dedicated storage and different server. All Shards together makeup the single logical group called Sharded Databases called SDB. Each database in a pool (Shards) contains a table with same column but different subsets of rows called CHUNKS. Sharding based on Oracle Partitioning. Partitions decompose a large table in to small partitions. Sharding keeps each partition into different databases called Shards. Number of partitions decided number of Shards.
Sharding uses Global Data Service (GDS) framework for automatic deployment and management. GDS uses GDSCTL utility. The Advantages of GDS is, it provides connection load balancing and role based routing in SDB (Shard Catalog). GSM Manager is a central component of GDS which provides direct routing of client connections to Shards. GSM is called as Shard Director. Shard catalog (SDB) stores the information about Shard table. Additionally it provides centralized schema maintenance and cross shard queries.
Sharding Vs Non Sharding
shard_vs_nonshard
Non Sharding Vs Sharding
The diagram outlines the difference between non Sharding with Sharding environment. Database PRODS with table CUSTOMER having six partitions on the non Shard environment. Unlikely in Sharding environment three different database with dedicated hardware sharing partitions of single table CUSTOMER.
On Sharding environment shown in the diagram has the table CUSTOMER with 2 partitions referred as CHUNKS. Table load is shard across three different Shards. For application it is a single logical database (SDB). Application/Clients connect to GSM and it internally routes the connection to the respective Shard. Now Shard directly sends the requested data to clients directly.
Benefits of Sharding:
Extreme Scalability: Sharding eliminates performance bottlenecks and makes it possible to increase performance and capacity of the system by adding additional Shards.
Fault Containment: Sharding also eliminates single points of failure (Sharded disks, SAN, clusterware, etc) and provides strong fault isolation: a failure of a shard does not affect availability of the other Shards.
Global Data Distribution: Sharding makes it possible to store particular data close to its consumers and satisfy regulatory requirements when data has to be located in a certain jurisdiction.
Rolling Upgrades: Applying configuration changes on one shard at a time does not affect other shards and allows administrators to first test the changes on a small subset of data.
Simplicity of Cloud Deployment: Since the size of a shard can be arbitrarily small, it makes it easier to deploy an SDB in a cloud consisting of low-end commodity servers with local storage.
TYPEs of Sharding:
There are three type of Sharding.
• System Managed Sharding
• User Defined Sharding
• Composite Sharding
System Managed Sharding: System managed Sharding does not require the user to specify mapping of data to Shards. DATA is automatically distributed across the Shards using partitioning by consistent HASH. User has no control over data. The advantage of this method is, it will avoid HOT spots and provide uniform performance across Shards.
User Defined Sharding : User has control over database means user specifies the mapping of data to individual Shards. It is useful in cases where application decides certain data need to be kept in a particular Shard and user have control on moving data between Shards. The advantage of this method is that in case of maintenance planned and unplanned outage of a Shard, the user knows exactly what data is not available. But the disadvantage of this model is user has to keep track of data to maintain the balanced distribution and workload across shards. User defined Sharding uses partitioning by Range or list. User defined Partitioning not available in 12.2.0.1 Beta.
Composite Sharding : Composite Sharding is a combination of system managed and user defined Sharding. Data first partitioned by list or range and then further partitioned in to consistent hash. Consistent partition maintains balanced distribution of data across set of Shards.
• Combination of system managed and user defined Sharding
• Data is partitioned using LIST or RANGE.
• Subset of partitions further partitioned using composite Partitioning
Following Document contains details on what/why/how to configure Sharding :
Prerequisites:
1. Shard Catalog Server, install GDS and Oracle 12.2 Enterprise edition software
2. On all SHARD servers, install Oracle 12.2 Enterprise edition software with ADG license on standby servers.
Introduction to Oracle Sharding.pdf
DEMO: Contains information about Prerequisites, Configure remote scheduler agent, Create GSM and create sharding and DEPLY with Data Guard replicated environment.
DEMO - Deploy Sharding with Data Guard
Subscribe to:
Posts (Atom)
Database Options/Management Packs Usage Reporting for Oracle Databases 11.2 and later (Doc ID 1317265.1)
Database Options/Management Packs Usage Report You can determine whether an option is currently in use in a database by running options_pa...
-
The information in this document applies to Oracle E-Business Suite Release 11 i and R12.x . The most current version of this document ...
-
This document also provides links to two presentations on the subject: Oracle OpenWorld presentation "Technical Upgrade Best Practice...
-
The purpose of this document is to present known issues and solutions for the 19c Database Upgrade with Oracle E-Business Suite (EBS). Imp...