script to get query for reclaim space from auto extensible datafile

set linesize 1000 pagesize 0 feedback off trimspool on with hwm as ( — get highest block id from each datafiles ( from x$ktfbue as we don’t need all joins from dba_extents ) select /*+ materialize */ ktfbuesegtsn ts#,ktfbuefno relative_fno,max(ktfbuebno+ktfbueblks-1) hwm_blocks from sys.x$ktfbue group by ktfbuefno,ktfbuesegtsn ), hwmts as ( — join ts# with tablespace_name select name tablespace_name,relative_fno,hwm_blocks from hwm […]

Implementing the Golden Gate plug-in monitor for Oracle Cloud Control 13cR2(13.2.0.0.0)

This note describes the procedure of implementing the GoldenGate plug-in for Oracle Cloud Control 13cR2. These versions are required for installing the plug-in: Enterprise Manager Cloud Control 13c Bundle Patch 1 (13.2.0.0.0) and later Oracle GoldenGate 12c (12.3.0.1.0) and later Oracle GoldenGate Plug-in for EMCC Release 13c http://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html Download, install and configure Oracle GoldenGate Monitor Agent 12.2.1.2.0 http://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html – Oracle GoldenGate […]

Upgrade of Oracle 11g RAC database to Oracle 12c RAC DBUA

This document will help you providing guideline to upgrade Oracle 11g RAC to Oracle 12c RAC clusterware  and Database . Author:-Saibal Ghosh https://www.linkedin.com/in/saibal-ghosh-ccsk-prince2-%C2%AE-469b0a7/ 1 Tasks Before Upgrade 1.1 Backup the Database: Before we start the upgrade, it is a best practice to backup the database, Oracle Cluster Registry (OCR) and Oracle database home and Grid home . 1.2  LINUX X86-64 […]

ORA-01111: name for data file is unknown – rename to correct file

Error in dataguard alert log/start managed recovery process:- SYS@XXX>alter database recover managed standby database; alter database recover managed standby database * ERROR at line 1: ORA-00283: recovery session canceled due to errors ORA-01111: name for data file 61 is unknown – rename to correct file ORA-01110: data file 61: ‘/u01/app/oracle/product/12.1.0/db_1/dbs/UNNAMED00061’ ORA-01157: cannot identify/lock data file 61 – see DBWR trace […]

Active RMAN duplicate clone 12c using section size and compress backupset

Overview of New PULL method The original “push” process is based on image copies.With Oracle Database 12c, a “pull” (or restore) process is based on backup sets. A connection is first established with the source database. The auxiliary instance then retrieves the required database files from the source database as backup sets. A restore operation is performed from the auxiliary […]

rman command reference

##Connecting RMAN############## rman TARGET SYS/target_pwd@target_str # connects in NOCATALOG mode rman TARGET / CATALOG rman/rman@rcat rman TARGET / CATALOG rman/rman@rcat AUXILIARY sys/aux_pwd@aux_str ##Create user and catalog in RMAN database ######## CREATE USER rman_dba IDENTIFIED BY rman_dba TEMPORARY TABLESPACE temp DEFAULT TABLESPACE rman_dba QUOTA UNLIMITED ON rman_dba; GRANT RECOVERY_CATALOG_OWNER TO rman_dba; CREATE CATALOG; ## Register Database###### Rman target / catalog rman_dba/rman_dba@<catalog> […]

Database backup and restore after manual catalog RMAN backup

Database backup and restore after manual catalog RMAN backup 1.Please take backup of primary database ORCL rman target / nocatalog log=/tmp/rman_bkp.log << EOF1 run { backup as compressed backupset database format ‘/opt/app/oratest1/bkp/ORCL_%U’; backup as compressed backupset archivelog all format ‘/opt/app/oratest1/bkp/ORCL_ARCH_%U’; } exit; EOF1 Please copy it in backup location to /opt/app/oratest1/bkp 2.Please start nomount RCATT database. 3.Please create controlfile from […]

ORACLE OPTIMIZER COST CALCULATIONS BASIC OVERVIEW

Cost Calculation for Full table Scan How FTS cost depends on system statistics Gather statistics manually on load: The following command will start to gather system statistics. SQL> execute DBMS_STATS.GATHER_SYSTEM_STATS (‘START’); Please wait for system warm up and stop gather system statistics after work load. This is called workload statistics. The MBRC will be calculated automatically depending on no. of […]

Undo Advisor help to estimate the undo tablespace size and undo retention to avoid ORA-1555

Prepare by: Nurullah Sharif Scope: Undo Advisor   Undo Advisor help to estimate the undo tablespace size and also advise of undo retention. SQL> @db NAME      OPEN_MODE ——— ——————– COLLPROD  READ WRITE   Undo retention is 900 sec which 15 min SQL> sho parameter undo NAME                                 TYPE        VALUE ———————————— ———– —————————— undo_management                      string      AUTO undo_retention                       integer     900 undo_tablespace                      string      UNDOTBS2 […]