Posts

Showing posts with the label recovery

Real Time Log Apply on Standby Database

                Configure Real Time Log Apply on Standby By default, log apply services wait for the full archived redo log file to arrive on the standby database before applying it to the standby database . If the real-time apply feature is enabled , log apply services can apply redo data as it is received from the Primary DB, without waiting for the current standby redo log file to be archived. We can use the ALTER DATABASE statement to enable the real-time apply feature, as below: For physical standby databases, issue the ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE statement. For logical standby databases, issue the ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE statement. NOTE : Standby redo log files are required to use real-time apply. Lets Test it: oracle@ORCLSTDBY:[~] $ sqlplus /"as sysdba" SQL*Plus: Release 11.2.0.4.0 Production on Tue Oct 4 10:57:52 2016 Copyright (c) 1982, 2013, Oracle....

Steps to quickly rebuild of existing standby database

  Steps to quickly rebuild of existing standby database: There are situations where you will have to rebuild your existing standby database as a result of  various situations like primary db was restored from backup with open reset logs. 1. Disable log shipping to standby database (that you want to rebuild "alter system set log_archive_dest_state_2=defer"). 2. Take full bakup from PRIMARY DB. 3. Take standby controlfile backup. 4. Copy backup and standby control file to standby server. 5. Drop datalafiles and controlfiles on standby Database. 6. Copy new standby control files to all controlfile locations. 7. Mount standby Database 8. Restore standby database. 8.  Enable log shipping to standby database(alter system set log_archive_dest_state_2=enable). 9. Recover managed standby database (on standby).

Restore database schema from full expdp backup

Import schema from full db expdp backup: In some situations you might want to restore a single schema from entire EXPDP backup. In this example I want to explain how to import a single schema from full DB expdp backup. Lets backup the full database using the EXPDP: F:\>expdp atoorpu directory=dpump dumpfile=fulldb_%U.dmp logfile=fulldb.log full=y compression=all parallel=8 Export: Release 11.2.0.4.0 - Production on Tue May 17 14:55:21 2016 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved. Password: UDI-28002: operation generated ORACLE error 28002 ORA-28002: the password will expire within 7 days Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Master table "ATOORPU"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded Starting "ATOORPU"."SYS_EXPORT_SCHEMA_01":  atoorpu/******** directory=dpump dump...

delete noprompt obsolete archive log - RMAN

RMAN> report obsolete; using target database control file instead of recovery catalog RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 Report of obsolete backups and copies Type                 Key    Completion Time    Filename/Handle -------------------- ------ ------------------ -------------------- Archive Log          183    16-FEB-16          /u01/app/oracle/oraarch/ORCLSTB1_1_140_896707677.arc Archive Log          189    16-FEB-16          /u01/app/oracle/oraarch/ORCLSTB1_1_141_896707677.arc Archive Log          190    16-FEB-16          /u01/app/oracle/oraarch/ORCLSTB1_1_145_896707677.arc Archive Log          191    16-FEB-16         RMAN...

Recover data using Flashback Query

How to restore the old data using flashback query My intention is , I want to get back past data of database after erroneously updated and committed. We know that committed data can never be flashed back. But with 10g new flashback feature we can get back past data even they are committed.  Before proceed ensure that, •The UNDO_RETENTION initialization parameter is set to a value so that you can back your data far in the past that you might want to query. •UNDO_MANAGEMENT is set to AUTO. •In your UNDO TABLESPACE you have enough space. With an example I will demonstrate the whole procedure. 1)I have created a table named test_flash_table with column name and salary. SQL> create table test_flash_table(name varchar2(10), salary number); Table created. SQL> insert into test_flash_table values('ABCD',10); 1 row created. SQL> commit; Commit complete. The table contains one row. 2)I erroneously updated column salary of Arju and commited data. SQL> update test_flash_table s...