Академический Документы
Профессиональный Документы
Культура Документы
http://rafioracledba.blogspot.in/search/label/flashback in Oracle
1 of 8
1/3/2013 3:27 PM
******* Rafi ORACLE DBA & APPS DBA Blog*******: flashback in Oracle
http://rafioracledba.blogspot.in/search/label/flashback in Oracle
November (5) October (4) September (7) August (7) July (6) June (7) May (7) April (7) March (7) February (7) January (7) December (5) November (1) October (5) September (2) August (3) July (4) June (3) May (2) April (4) March (19)
Note: If it is a RAC database the FRA should point to the shared storage. Ensure you estimate appropriately db_recovery_file_dest_size and have enough space. STORAGE_SIZE column from V$RESTORE_POINT can help you for that. prerequisite 2:The Oracle database should be in archivelog SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 70 Next log sequence to archive 73 Current log sequence 73 Note:Below steps can be use to switch Database to archive log mode. [oracle@orclbox ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.2.0 Production Copyright (c) 1982, 2010, Oracle. All rights reserved. SQL> conn / as sysdba Connected. SQL> alter system set log_archive_dest_1=location=/oracle/test_flash; System altered. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 1653518336 bytes Fixed Size 2227032 bytes Variable Size 1275069608 bytes Database Buffers 369098752 bytes Redo Buffers 7122944 bytes Database mounted. SQL> alter database archivelog; Database altered. SQL> alter database open; Database altered. SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination /oracle/test_flash Oldest online log sequence 2 Next log sequence to archive 4 Current log sequence 4 SQL>
LABELS
APEX tasks (4) Application server Installation (1) Application server start/stop (1) Apps DBA Queries (1) Apps DBA tasks (21) Apps R12 Concepts (3) Apps R12 OCP (1) ASM (3) Database Diagnosis (1) Database Migrations (2) Database Patches (1) Database Recovery (3) Database Refresh (2) Database Upgrade (2) Dataguard and Standby Database (1) DBA Daily activities (1) DBA Guidelines (1) DBA Queries (3) DBA Scripts (1) DBA tasks (19) exp/imp (1) expdp/impdp (5) flashback in Oracle (1) FMW_tasks (1) Happy New Year (1)
BRAINSURFA CE ORACLE COMMUNITY APPS DBA STUDY ONLINE ASK TOM ORACLE Oracle Class Wissem's Oracle and NOSQL Tips Tunisia's First Oracle, NOSQL Website Oracle Apps Fusion Training Home ORACLE WIKI ONLINEDBA-SUPPOR T-DOCS Oracle Application Express News Oracle Application DBA Oracle SOA-Getting Started ORACLE APPLICATION S(Release 12) DOCUMENTAT
prerequisite 2:On the Flashback in Database SQL> alter database flashback on; Database altered. SQL> select log_mode,flashback_on from v$database;
INTERVIEWS (19) ITIL (1) locks (1) MBA (1) My Favourite Books (2) OCP.. (1)
2 of 8
1/3/2013 3:27 PM
******* Rafi ORACLE DBA & APPS DBA Blog*******: flashback in Oracle
http://rafioracledba.blogspot.in/search/label/flashback in Oracle
ION LIBRARY AUTOMATIC SQL TUNING ORACLE-BAS E - Oracle DBA (8i, 9i, 10g, 11g) Business Intelligence Documentatio n for Oracle Fusion Middleware 11g (11.1.1.6) ORACLE DBA BOOKS ORACLE DBA FORUM Designer Documentatio n ORACLE FUSION MIDDLEWARE DOCUMENTS ORACLE SQL DEVELOPER DETAILS ORACLE-BAS E - DBA Scripts for Oracle 11g, 10g, 9i and 8i Oracle Application DBA INFO ORACLE DOCUMENTAT ION(INCLUDE S A TO Z ORACLE DOCUMENST) ORACLE STATISTICS GATHERING DETAILS Oracle Fusion Middleware Documentatio n Library FREE BOOKS DOWNLOAD ORACLE 11g ALAPATI BOOK ORACLE COMMUNITY DOWNLOAD ORACLE DABASE ,APPLICATION
LOG_MODE
FLASHBACK_ON
OEM (1) ORACLE CAREER (2) Oracle Concepts (8) Oracle Data Integrator (1) Oracle Errors (9) Oracle Peoplesoft Admin Concepts (3) Oracle Peoplesoft Admin tasks (2) Oracle SOA Concepts (2) Oracle SOA Expert (1) Oracle SOA tasks (2) Oracle Weblogic (2)
------------ -----------------ARCHIVELOG YES Note:To off the flashback use the below statement. SQL> alter database flashback off; Database altered. SQL> select log_mode,flashback_on from v$database; LOG_MODE FLASHBACK_ON
------------ -----------------ARCHIVELOG NO
Example 1: Let us consider one eg.of restoring a table to a particular scn(system change number): Below i'm creating one 'test' user with some test data,than I will check the scn after committing the changes,than I will delete the data and finally I will restore that table using flashback scn technique. SQL> create user test identified by test; User created. SQL> grant connect,resource to test; Grant succeeded
oracle11g (7) Partition (2) Performance Tuning (4) PL/SQL (1) RAC (4) RAC EXPERT (1) Recovering drop table (1) RMAN (7) SQL TUNING (2) Unix for DBA (4) Unix Tasks (1)
SQL> insert into test.flashback_test values(1); 1 row created. SQL> insert into test.flashback_test values(2); 1 row created. SQL> insert into test.flashback_test values(3); 1 row created. SQL> commit; SQL> select current_scn, scn_to_timestamp(current_scn) from v$database; CURRENT_SCN SCN_TO_TIMESTAMP(CURRENT_SCN) ----------- --------------------------------------------------------------------------931892 28-JUL-12 09.49.40.000000000 AM
Rafi
CERTIFICATIONS ORACLE 9I,10G,11G OCP,RAC CERTIFIED EXPERT,SOA EXPERT & ORACLE EBS R12 OCP
ABOUT ME
SQL> delete from test.flashback_test; 3 rows deleted. SQL> commit; Commit complete.
Hi DBAs, This is RAFI here working as Senior Oracle DBA & Apps DBA since 5 yrs.Learning ORACLE is my passion.I have
3 of 8
1/3/2013 3:27 PM
******* Rafi ORACLE DBA & APPS DBA Blog*******: flashback in Oracle
http://rafioracledba.blogspot.in/search/label/flashback in Oracle
S & FUSION MIDDLEWARE (TAHITI.ORAC LE.COM) Oracle Data Integrator Oracle SOA BPEL ESB Training MY ORACLE SUPPORT (METALINK) ORACLE INDEX USAGE DETAILS ORACLE SOFTWARES DOWNLOAD ORACLE RAC FORUM LAZY DBA OEM GRID CONTROL
Restore of table flashback_test using flashback database: ===================================================== step 1:Shut down the instances of Database SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down Step 2:Bring the Database in mount state SQL> startup mount ORACLE instance started. Total System Global Area 1071333376 bytes Fixed Size 1341312 bytes Variable Size 620759168 bytes Database Buffers 444596224 bytes Redo Buffers 4636672 bytes Database mounted. Step 3:Use flashback database command to go to scn when table was dropped. If you want to revert the database to SCN=930717 where flashback_test table has 3 rows SQL> flashback database to scn 930717; Flashback complete. SQL> alter database open resetlogs; --set log sequence no. and the database will be synchonized. Verify the Data: SQL> select * from flashback_test;
worked on Solaris,HP/UX,IBM -AIX,Linux and Windows platform.PL/SQL is my favourite programming language followed by perl.I'm excellent in shell scripting and shell programming.I'm passionate about working in Oracle RAC,Performance tuning,SOA,APPS 11i/R12 technologies.My activities involve working in Database,Applicati ons and Fusion Middleware Design methodologies like SOA,ODI. "Dreams are not those you see while sleeping,Dreams are those that don't let you Sleep". I dedicate this Blog to MY LUCKY CHARM & Oracle Experiments,Interv iews & Practices. View my complete profile
Kevin Closson's Oracle Blog: Platform, Storage & Clustering Topics Related to Oracle Databases
Reviewing 2012 Search Terms
COL1 1 2 3 Example 2:Flashback to timestamp Lets say you have to drop some table on a particular day and the user know the time when he had dropped that table,than we can use the below steps to recover that table using flashback technique. flashshback to timestamp: ====================== step 1:Shut down the instances of Database SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down Step 2:Bring the Database in mount state SQL> startup mount ORACLE instance started.
New DBA Oracle DBA, Oracle Applications DBA, LINUX,RAC, MSSQL, MySQL,Storag e, PMP..FREE
Puthra dosham due to rahu in fifth house
Jonath Levis
4 of 8
1/3/2013 3:27 PM
******* Rafi ORACLE DBA & APPS DBA Blog*******: flashback in Oracle
http://rafioracledba.blogspot.in/search/label/flashback in Oracle
Total System Global Area 1071333376 bytes Fixed Size 1341312 bytes Variable Size 620759168 bytes Database Buffers 444596224 bytes Redo Buffers 4636672 bytes Database mounted.
step 3: flashback to timestamp 28-JUL-12 09.49.40 SQL>flashback database to timestamp TO_TIMESTAMP('2012-07-28 09:49:40','YYYY-MM-DD HH24:MI:SS'); Flashback complete. SQL> select * from test.flashback_test; COL1 1 2 3 Example 3: Enable recyclebin and get back the lost data. Step 1:Enable recycle bin when the Database is in open state. SQL>alter session enable recyclebin=on; Step 2:Recover lost table using below command.
Altova Blog
PACKT PUBLISHING
YOUTUBE
SQL> FLASHBACK TABLE test.flashback_test TO BEFORE DROP; Flashback complete. SQL> select * from test.flashback_test; COL1 1 2 3 Example 4:Create guaranteed restore point and restore that restore point: ========
Standard Chartered Bank CardNet Login | Rocket Languages
How we can restore the entire data which is lost in a particular period,this can be use to test data also. This is very vital feature of Oracle flashback. Create Restore point: ===================== Step 1:Create restore point 'test_rest1': SQL> create restore point test_rest1 guarantee flashback database; Restore point created. * To view the restore points: SQL> select NAME,SCN,TIME,GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE from V$RESTORE_POINT where GUARANTEE_FLASHBACK_DATABASE='YES';
ICICI Prulife
5 of 8
1/3/2013 3:27 PM
******* Rafi ORACLE DBA & APPS DBA Blog*******: flashback in Oracle
http://rafioracledba.blogspot.in/search/label/flashback in Oracle
SQL> select NAME, SCN, TIME, GUARANTEE_FLASHBACK_DATABASE, STORAGE_SIZE from V$RESTORE_POINT where GUARANTEE_FLASHBACK_DATABASE='YES'; 2 3 NAME -------------------------------------------------------------------------------SCN ---------TIME GUA --------------------------------------------------------------------------- --STORAGE_SIZE -----------TEST_REST1 930537 28-JUL-12 08.57.51.000000000 AM 0
Oracle Database 10g: OCM Exam Preparation Workshop English to German Translation
YES
NAME -------------------------------------------------------------------------------SCN ---------TIME GUA --------------------------------------------------------------------------- --STORAGE_SIZE -----------TEST_REST2 930660 28-JUL-12 09.02.54.000000000 AM 30203904
Monster Gulf Jobs in Dubai, IT Jobs, Sales Jobs Index of /data/Oracle /DBA_scripts
NAUKRI JOBS
YES
ICICI Bank
Whitehorses Blog
Three new future features for BAM 12c
NAME -------------------------------------------------------------------------------SCN ---------TIME GUA --------------------------------------------------------------------------- --STORAGE_SIZE -----------TEST1 932549 28-JUL-12 10.30.01.000000000 AM 8192000 Restore Restore point: ======================= step 1:shut the database SQL> shut immediate ORA-01031: insufficient privileges SQL> conn /as sysdba Connected. SQL> shut immediate Database closed. Database dismounted. ORACLE instance shut down step 2:Startup in mount state
YES
Oracle Certification Program
Naukrigulf.co m
6 of 8
1/3/2013 3:27 PM
******* Rafi ORACLE DBA & APPS DBA Blog*******: flashback in Oracle
http://rafioracledba.blogspot.in/search/label/flashback in Oracle
Exadata
Total System Global Area 1071333376 bytes Fixed Size 1341312 bytes Variable Size 620759168 bytes Database Buffers 444596224 bytes Redo Buffers 4636672 bytes Database mounted.
MONSTER JOBS
step 3:flashback Database to restore point 'test1': SQL> FLASHBACK database TO RESTORE POINT test1;
Flashback complete
FACEBOOK
Note:To restore a table below command can be used. FLASHBACK TABLE emp TO RESTORE POINT test1;
SQL> alter database open resetlogs; Database altered step 6:Verify the data SQL> select *from test.flashback_test; COL1 ---------1 2 3 Step 7:Monitor flashback v$flashback_database_log SQL> select oldest_flashback_scn from v$flashback_database_log;
OLDEST_FLASHBACK_SCN -------------------930314 Note: Dropping restore point. SQL> DROP RESTORE POINT TEST_REST1;
Restore point dropped. Note: Possible flashback options available are: SQL>flashback table test.flashback_test to (SYSDATE-1/24);
Oracle Learning Library (OLL) Aman's Apex Blog JULIAN DYKE.COM Limited Ashish Agarwal Freelance Oracle APEX Professional, Oracle DBA & Oracle Apps
-- be sure to substitute your SCN FLASHBACK DATABASE TO SCN 19513917; or FLASHBACK DATABASE TO RESTORE POINT bef_damage; /* FLASHBACK DATABASE TO TIMESTAMP (SYSDATE-1/24); FLASHBACK DATABASE TO TIMESTAMP timestamp'2002-11-05 14:00:00'; FLASHBACK DATABASE TO TIMESTAMP to_timestamp('2002-11-11 16:00:00','YYYY-MM-DD HH24:MI:SS'); */
7 of 8
1/3/2013 3:27 PM
******* Rafi ORACLE DBA & APPS DBA Blog*******: flashback in Oracle
http://rafioracledba.blogspot.in/search/label/flashback in Oracle
DBA
Offcourse,we do have flashback query,flashback transaction query,but above are very useful.
1 comment:
Older Posts
8 of 8
1/3/2013 3:27 PM