Sharing knowledge is the ultimate key to gaining knowledge..
The only two things that stay with you for life
are you & your knowledge !
Live while you can!
Teach & inspire while you could &
Smile while you have the teeth.. 😉
-
ASM
- Creating ASM Instance and diskgroups manually without DBCA
- 20 ASM Realtime | Interview Questions
- How to make a cold backup for database running on ASM ( using RMAN )
- Moving a Single Datafile from File System to ASM System (METHOD 1)
- Moving a Single Datafile from File System to ASM System (METHOD 2)
- Things to consider while adding new disk/ Rebalancing existing Disk Group
-
Dataguard
- Dataguard Modes
- Dataguard Modes - II
- Oracle DataGuard Setup
- invalid archived log deletion policy
- recover from the Loss of a Datafile on a Standby Database ?
- MRP terminated with ORA-00600: internal error code, arguments
- Recover archive gaps in standby database - using 2 methodss
- Gap Resolution in Dataguard
- Convert Physical Standby to Snapshot Standby and Vice Versa
- Re-create Redo-logs on Standby/ Primary
- Pre-check for DataGuard switchover Process
- ORA-19815: WARNING: db_recovery_file_dest_size
- How do you purge old archivelogs which are applied on Standby DB
- Pre-check For SWITCHOVER using DG Broker
- https://oracle-dba-help.blogspot.com/2016/03/data-guard-modes.html
- ORA-01274 : RENAME THE UNKNOW FILE IN THE STANDBY DATABASE
- Database Creation in Easy 6 Steps
- Oracle Networking
- Tablespace management
- Housekeep : Quick Tips for DBA
- Health check for DB
- ORA-12537 While Connecting To Database Via Listener
- How to identify the applied patche-set of your Oracle Home
- Accessing a schema without knowing the password
- ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
- Session Related Scripts
- How to check ORA Error on DB Server – Beginner Tip
- Working with Redo Logs
- Decommission of Oracle Database
- Roles in Oracle - Managing Users
- Oracle Release Number Format
- Troubleshooting Handy-Guide
- Understanding the Upgradation Process
- Query to find the session creating more redo
- Audit in Oracle
- Troubleshooting Internal Errors and Error-Look-up Tool on MOS
- Troubleshooting Issues with Undo Tablespace
- User Management
- User Management - II
- Data Pump Gets Better
- MEMORY_TARGET Parameter
- Oracle 21c: INCLUDE and EXCLUDE in Data Pump
- Behind the Scenes of COMMIT
- Data Guard Redo Transport Encryption
- Oracle 19C with ADG DML Redirection
- 19c PDB Refreshable Clones
- Solving the Mysterious Database Connection Timeouts
- How to identify the applied patche-set of your Oracle Home
- Topic need to get clear to become expert in Oracle DBA
- Working with Redo Logs
- Oracle Database Block corruption
- What happens during Instance Recovery
- Oracle Datapump Scenarios
- Troubleshooting Issues with Undo Tablespace
- General Tips to Prepare for an Oracle DBA Job Interview
- RMAN Questions
- Installing PostgreSQL Server on CentOS, RHEL 6 / 7 Systems
- Creating a database in Postgres
- Initialize multiple Postgres instance on the same RHEL server
- How to stop starting of clusters while starting up services
- Setup a streaming replication
- Switchover- master server and warm standby (with streaming replication)
- All About Physical Replication and Log shipping
- PostgreSQL Upgrade and troubleshooting
- Timeline Switch issue
- Query to identify the lag in replication
- Drop table : ERROR: must be owner of relation table_name
- PgBadger
- PgCenter
- PgTune
- Internals of Toast Table
- Influencing Query Execution Plan
- Create Extension ERROR
- Find Uptime in PostgreSQL
- Set DB Timezone
- Clear RAM Cache, Buffer
- Read-Only User in Postgres
- Everything you need to know about Streaming Replication
- Ora2Pg Migrate Oracle to Postgres
- Total Page Cost
- PostgreSQL 13 - Everything you need to know
- Startup Failure - .conf file
- All About Postgres Upgrade
- Basic Guide
- Session Related Scripts
- AWR :: Beginners Guide
- All About ASH - Active Session History
- Wait Events : checkpoint busy waits or archiver busy waits
- Find sessions performing sort operations : TEMP Tablespace occupants
- Generate ADDM task and generate its report for Tuning
- Database Performance Tuning Scripts -Keep Handy
- Buffer Busy Wait
- Simulating the Deadlock
- Latches
- Steps to Schedule any RMAN Jobs In Windows Server
- ORA-01194: file 1 needs more recovery to be consistent
- Loss of Current Online Redo-Log
- RMAN "baby Steps"
- Recovery of ControlFiles
- Loss of Datafile
- Recovery from complete loss of all online redo log files
- Block Change Tracking
- RMAN Questions
- Instance Recovery
- Redundancy and Recovery window in RMAN
- Cold Backup
- Database Cloning
- Contact
- Drop Database using RMAN
- PITR to older Incarnation
Wednesday, 23 October 2024
Restore Point in Oracle: A Tool for Flashback Recovery and Controlled Testing
Sunday, 29 September 2024
Navigating Oracle Licensing for Data Recovery Environments ( Oracle Licensing DataGaurd )
Monday, 29 July 2024
Troubleshooting Oracle Data Guard Connection (TNS-12547: TNS:lost contact & Linux Error: 32: Broken pipe)
Sunday, 26 May 2024
Troubleshooting Invalid Username/Password Errors During Switchover and Failover with Oracle 12C Broker
Sunday, 19 May 2024
Guarding Your Data: Unveiling the Secrets of Data Guard Redo Transport Encryption
Sunday, 28 April 2024
Setting Up Far Sync Configuration in Your Data Guard Environment
Sunday, 7 April 2024
Enhancing Oracle 19C with Active Data Guard DML Redirection
Sunday, 11 February 2024
Resolving the ORA-16724: cannot resolve gap : A Step-by-Step Adventure
Ever experienced the frustration of dealing with the ORA-16724 error in Oracle Data Guard? You’re not alone! This pesky error popped up in our enviroment when standby server was off the grid for a few days due to hardware issues.
Let’s dive into resolving this log gap error using RMAN incremental backup, with a touch of fun and simplicity.
Wednesday, 22 February 2023
Ensuring Data Integrity with Oracle 21c Data Pump Checksum
Saturday, 5 February 2022
Tracing Oracle Data Guard
Tracing can also be enabled in dataguard using the parameter "Log_Archive_Trace"
The values can be set using DG-Broker (if configured) or at SQL prompt as below.
Tuesday, 2 October 2018
RMAN-08591: WARNING: invalid archived log deletion policy
For one of database we were getting backup failure alerts where the backup was configured on standby database.
We saw below Error messsages in backup-log :
-
[oracle@host1 log]$ dgmgrl / DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production Copyright (c) 2000, 2013, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. Connected as SYSDG. DGMGRL> show configuration Configuration – primdb1 Protection Mode: MaxPerformance Members: primdb1 - Primary database bcpdb1 - Physical standby database Fast-Start Failover: DISABLED Configuration Status: SUCCESS (status updated 7 seconds ago)
DGMGRL> show database verbose bcpdb1 Database - bcpdb1 Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport Lag: 11 minutes (computed 0 seconds ago) Apply Lag: 0 seconds (computed 0 seconds ago) Average Apply Rate: 625.00 KByte/s Active Apply Rate: 523.00 KByte/s Maximum Apply Rate: 18.62 MByte/s Real Time Query: ON Instance(s): bcpdb1
Properties:
---------- ----------Binding = 'optional' ---------- ----------
3. Set the "binding" Property as - MANDATORY
//This parameter controls whether the destination is mandatory or not
DGMGRL> edit database bcpdb1 set property Binding='mandatory'; Property "binding" updated DGMGRL> exit
-
Read more
Configure Streaming Replication in PostgreSQL
Installation and configure Postgres 13 on RHEL
All about Physical Replication and Log shipping in Postgres
Possible ways to recover space from deleted rows with insufficient disk space
Streaming-Replication Sync and Async, benefits of streaming replication over Log-shipping
Monday, 13 August 2018
MRP terminated with ORA-00600: internal error code, arguments: [3020] | For Standby database
Here, Checked the standby database, the gap was increasing rapidly.
SQL:hostname_standby01:(MYPROD):PHYSICAL STANDBY> SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APP L.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference" 2 FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH, (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) 3 IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL WHERE ARCH.THREAD# = APPL.THREAD# ; Thread Last Sequence Received Last Sequence Applied Difference ---------- ---------------------- --------------------- ---------- 1 18223 17969 254 SQL:hostname_standby01:(MYPROD):PHYSICAL STANDBY>
hostname_standby01(oracle):MYPROD:trace$ tail -400f alert_MYPROD.log Errors in file /app/ora/local/admin/MYPROD/diag/rdbms/myprod_hostname_129/MYPROD/trace/MYPROD_pr0s_3151989.trc: ORA-00600: internal error code, arguments: [3020], [2], [16431], [8405039], [], [], [], [], [], [], [], [] ORA-10567: Redo is inconsistent with data block (file# 2, block# 16431, file offset is 134602752 bytes) ORA-10564: tablespace SYSAUX ORA-01110: data file 2: '+DATA01/myprod_hostname_129/datafile/sysaux.256.914736089' ORA-10561: block type 'TRANSACTION MANAGED DATA BLOCK', data object# 6478 Errors in file /app/ora/local/admin/MYPROD/diag/rdbms/myprod_hostname_129/MYPROD/trace/MYPROD_mrp0_3151683.trc (incident=17881):
Login to Primary database and perform the backup of datafile, Here we will backup the datafile and restore the datafile to standby database.
RMAN> backup format '/db/dump01/backup_stdby/sysaux.256.914736089' datafile 2 ; Starting backup at 19-AUG-17 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=156 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00002 name=+DATA01/myprod_hostname_129/datafile/sysaux.257.914670317 channel ORA_DISK_1: starting piece 1 at 19-AUG-17 channel ORA_DISK_1: finished piece 1 at 19-AUG-17 piece handle=/db/files/backup_stdby/sysaux.256.914736089 tag=TAG20170219T103456 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07 Finished backup at 19-AUG-17 Starting Control File and SPFILE Autobackup at 19-AUG-17 piece handle=/app/ora/local/admin/MYPROD/files/PRIMARY_MYPROD_c-218898855-20170219-01.ctl comment=NONE Finished Control File and SPFILE Autobackup at 19-AUG-17 RMAN> exit
hostname_ standby01 (oracle):MYPROD:backup_stdby$ rman target / RMAN> catalog start with '/db/files/backup_stdby' ; using target database control file instead of recovery catalog searching for all files that match the pattern /db/files/backup_stdby List of Files Unknown to the Database ===================================== File Name: /db/files/backup_stdby/sysaux.256.914736089 Do you really want to catalog the above files (enter YES or NO)? YES cataloging files... cataloging done List of Cataloged Files ======================= File Name: /db/files/backup_stdby/sysaux.256.914736089 RMAN> exit SQL: hostname_ standby01:(MYPROD):PHYSICAL STANDBY> shut immediate ; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL: hostname_ standby01:(MYPROD):PHYSICAL STANDBY> startup mount; ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2235208 bytes Variable Size 494929080 bytes Database Buffers 566231040 bytes Redo Buffers 5541888 bytes Database mounted. SQL: hostname_ standby01:(MYPRD):PHYSICAL STANDBY> !rman target / Recovery Manager: Release 11.2.0.3.0 - Production on Sun AUG 19 10:46:20 2017 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: MYPROD(DBID=218895632, not open) RMAN> restore datafile 2 ; Starting restore at 19-AUG-17 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=78 device type=DISK channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00002 to +DATA01/myprod_files/datafile/sysaux.256.914736089 channel ORA_DISK_1: reading from backup piece /db/dump01/backup_stdby/sysaux.256.914736089 channel ORA_DISK_1: piece handle=/db/files/backup_stdby/sysaux.256.914736089 tag=TAG20170219T103456 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 Finished restore at 19-AUG-17 RMAN> exit Recovery Manager complete.
Once the restore via RMAN is completed. Bounce the MRP and check the behaviour.
SQL: hostname_ standby01:(MYPROD):PHYSICAL STANDBY> alter database recover managed standby database cancel ; Database altered. SQL: hostname_ standby01:(MYPROD):PHYSICAL STANDBY> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT; Database altered. Check if MRP is running now. All looks good.. ! J SQL: hostname_ standby01:(MYPROD):PHYSICAL STANDBY> !ps -ef|grep mrp oracle 3500966 1 0 10:47 ? 00:00:00 ora_mrp0_MYPROD oracle 3501928 3456846 0 10:48 pts/10 00:00:00 /bin/ksh -c ps -ef|grep mrp oracle 3501930 3501928 0 10:48 pts/10 00:00:00 grep mrp
Check if lag is reducing and is in Sync with Primary database:
SQL: hostname_ standby01:( MYPROD):PRIMARY> archive log list ; Database log mode Archive Mode Automatic archival Enabled Archive destination /app/ora/local/admin/myprod/arch1 Oldest online log sequence 18233 Next log sequence to archive 18235 Current log sequence 18235 SQL: hostname_ standby01:( MYPROD):PHYSICAL STANDBY> SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference" FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH, (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL WHERE ARCH.THREAD# = APPL.THREAD# ; SQL:xstm6551bor:( MYPROD):PHYSICAL STANDBY> / Thread Last Sequence Received Last Sequence Applied Difference ---------- ---------------------- --------------------- ---------- 1 18234 18215 19 SQL:hostname_standby01:( MYPROD):PHYSICAL STANDBY> / Thread Last Sequence Received Last Sequence Applied Difference ---------- ---------------------- --------------------- ---------- 1 18234 18228 6 SQL:hostname_standby01:( MYPROD):PHYSICAL STANDBY> / Thread Last Sequence Received Last Sequence Applied Difference ---------- ---------------------- --------------------- ---------- 1 18234 18234 0 SQL: hostname_standby01:( MYPROD):PHYSICAL STANDBY> SQL: hostname_ standby01:(MYPROD):PHYSICAL STANDBY>