Protected: 2 node RAC with Dataguard Configuration (DGMGRL)
This guide will take you through the steps configure Oracle Grid Infrastructure 12c and Database 12c including RAC to RAC Data Guard and Data...
Protected: Fixing Corrupted Grid Home
--Detach home /u01/grid/oracle/product/11.2.0.4/grid
export ORACLE_HOME=/u01/grid/oracle/product/11.2.0.4/grid
cd /u01/grid/oracle/product/11.2.0.4/grid/oui/bin
./detachHome.sh
--Validate the home are detached
cat /u01/oracle/product/oraInventory/ContentsXML/inventory.xml
--Take a backup of below files
cd /u01/grid/oracle/product/11.2.0.4/grid/crs/install
cp s_crsconfig_enabl11_env.txt /home/oracle/s_crsconfig_enabl11_env_bkp.txt
cp crsconfig_params /home/oracle/crsconfig_params_bkp.txt
--Remove the files...
Protected: srvctl related configurations
--add database to GRID and create the service, for example:
srvctl add database -d cm1919 -i cm19191 -o $ORACLE_HOME -p "+M1919_DG1/m1919/spfilecm1919.ora" -a "M1919_DG1,M1919_DG_FLASH" -m world...
Protected: Monitor Standby Database with Lag Time Report
vi /home/oracle/scripts/lag_time_report_and_diskgroup_space.ksh
#!/bin/ksh
export ORACLE_SID=<Target_ORACLE_SID>
export ORACLE_HOME=/u01/oracle/product/11.2.0.4/db
/u01/oracle/product/11.2.0.4/db/bin/sqlplus -s / as sysdba << NACHO > /tmp/standbylag.log
set feedback off
select 'Standby thread '|| thread# || ' is '|| round((sysdate -...
Protected: Configure MRP in Standby
Add the Target Database TNS entry to the Source's tnsnames.ora file(s) (all of them if it's a clustered Source)
Set the log_archive_dest_<#> parameter on the...
Protected: De-configure MRP in Standby
On Source, as Oracle user:
export ORACLE_SID=<source_sid>
sqlplus '/as sysdba'
alter system set log_archive_dest_state_<whatever_#_used>='DEFER' scope=both sid='*';
alter system set log_archive_dest_<whatever_#_used>='' scope=both sid='*';
alter system set log_archive_config='dg_config=(<only the db_unique_name's...
Protected: Performance Tuning Scripts.
Top Wait Events:
col EVENT format a60
select * from (
select active_session_history.event,
sum(active_session_history.wait_time +
active_session_history.time_waited) ttl_wait_time
from v$active_session_history active_session_history
where active_session_history.event is not null
group by active_session_history.event
order by 2 desc)
where...
GGSCI Command for GoldenGate
INFO
INFO MANAGER Provides details of the Manager process
INFO MGR Also provides details of the Manager process
STATUS MANAGER This command also display the info of manager
REFRESH
REFRESH MANAGER Reloads from...
Recover Block Corruption
What is a data block corruption?
Data block corruptions occur whenever data is not in its expected state. The block may have contents that are...
Resync Standby Database Using RMAN Incremental Backups
Normally in DR setup, the archives from primary shipped to standby and applied there. Suppose some of the archives hasn’t been shipped to secondary...
RMAN Recovery Catalog in Oracle
RMAN recovery catalog is separate DB/ Server and which will save only the details of your backups in terms of metadata of the backup.
Whenever...
ORA-16525: DGMGRL Create Configuration Failing
PROBLEM:
When DGMGRL is used to create DG broker configuration it fails with below error :
DGMGRL> connect sys
Password:
Connected to "<DB_UNIQUE_NAME>"
Connected as SYSDBA.
DGMGRL> Create configuration...
How to fix ‘ORA-01000 maximum open cursors exceeded’ issue in Oracle database
OPEN_CURSORS specifies the maximum number of open cursors (handles to private SQL areas) a session can have at once. You can use this parameter to...
RMAN Basic Commands
Oracle Recovery Manager (RMAN) satisfies the most pressing demands of performance, manageable backup and recovery, for all Oracle data formats.
RMAN provides a common interface,...
RAC Basic Commands
Check the status of the cluster
$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster...
Oracle Dataguard Scripts
1) Information of database (Primary & Standby).
SQL> SELECT DATABASE_ROLE, DB_UNIQUE_NAME INSTANCE, OPEN_MODE, PROTECTION_MODE, PROTECTION_LEVEL, SWITCHOVER_STATUS FROM V$DATABASE;
2) To display current status for Physical Standby...
Buffer & Dictionary Hit Ratio
The Data Buffer Hit Ratio Oracle metric is a measure of the effectiveness of the Oracle data block buffer. The higher the buffer hit ratio, the...
Protected: Linux Shell Script To Monitor GoldenGate Lag
Schedule this script on (Source & Destination) replication servers in order to detect the lag on all processes (Extract, Pump, and Replicate).
Set following...
Relocating enabl database for oracle 19c
Relocating enabl database for oracle 19c
1:- After the upgrade add this hosting members as below
$GRID_HOME/bin/crsctl modify resource ora.enabl.db -attr "HOSTING_MEMBERS='server01 server02' PLACEMENT='favored'" -unsupported
2:- Create...
Oratop Utility
Oratop is a text based user interface tool similar to top command for monitoring basic database operations in real time for RAC and Standalone...
Standby : Unnamed file issue
Sun Jan 1 22:02:11 2022
Errors in file /u01/app/oracle/diag/rdbms/proddb/proddb1/trace/proddb1_pr00_117080.trc:
ORA-01111: name for data file 185 is unknown - rename to correct file
ORA-0111: data file 185: '/u01/oracle/product/19/db/dbs/UNNAMED00185'
ORA-01157:...
Protected: CRS-41053: Checking Oracle Grid Infrastructure for file permission issues CRS-4000
# crsctl start crs
CRS-41053: checking Oracle Grid Infrastructure for file permission issues
PRVG-11960 : Set user ID bit is not set for file "/u01/app/grid/12.2.0/grid/bin/extjob" on...
Protected: Improve Performance of Data Pump Import In Oracle 19c
The Oracle Data Pump Export and Import utilities are designed especially for very large databases. If you have large quantities of data versus metadata,...
Protected: CRS-2974: unable to act on resource
Problem Summary:
On a 19c RAC DB when shutting down instance using srvctl command it throws below error:
$ srvctl stop instance -d prod -i...
Protected: Create Trigger to Detect Client/App related error.
Use the CREATE TRIGGER statement to create and enable a database trigger, which is:
A stored PL/SQL block associated with a table, a schema, or the database orAn anonymous...