Dear Readers,
In this article, we will see the following Important commands for Flashback (SecureCRT).
Menubar : Flashback (FB)
Tab : FRA_Usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
set linesize 300 col file_type for a40 select * from V$FLASH_RECOVERY_AREA_USAGE; FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID ---------------------------------------- ------------------ ------------------------- --------------- ---------- CONTROL FILE 0 0 0 0 REDO LOG 0 0 0 0 ARCHIVED LOG .86 .24 14 0 BACKUP PIECE 0 0 0 0 IMAGE COPY 0 0 0 0 FLASHBACK LOG 3.43 0 15 0 FOREIGN ARCHIVED LOG 0 0 0 0 AUXILIARY DATAFILE COPY 0 0 0 0 |
Tab : Check Restore Point
1 2 3 4 5 6 7 8 9 10 11 12 |
set linesize 300 col time for a35 set numwidth 30 col name for a40 col RESTORE_POINT_TIME for a25 select SCN,GUARANTEE_FLASHBACK_DATABASE,STORAGE_SIZE,TIME,PRESERVED,NAME from v$restore_point order by time SCN GUA STORAGE_SIZE TIME PRE NAME ------------------------------ --- ------------------------------ ----------------------------------- --- ---------------------------------------- 14354029433707 YES 34359738368 20-JAN-21 06.05.04.000000000 PM YES ORCLTEST1_POST_REFRESH_SCOTT_20JAN2021 14354044238464 YES 34359738368 29-JAN-21 12.13.53.000000000 PM YES ORCLTEST1_REFRESH_SCOTT_29JAN2021 14354115444165 YES 34359738368 16-FEB-21 10.41.17.000000000 AM YES ORCLTEST1_REFRESH_SCOTT_16FEB2021 |
Tab : Flashback_DB_Logfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
set linesize 300 col name for a60 set pagesize 100 set numwidth 20 select NAME,LOG#,SEQUENCE#,to_char(first_time,'DD-MON-YYYY HH24:MI:SS') from v$flashback_database_logfile; NAME LOG# SEQUENCE# TO_CHAR(FIRST_TIME,'DD-MON-YYYYHH24:MI:SS') ------------------------------------------------------------ -------------------- -------------------- -------------------------------------------- +RECO/AWSORCLTEST1/FLASHBACK/log_1.562.1061727163 1 344 09-FEB-2021 12:31:18 +RECO/AWSORCLTEST1/FLASHBACK/log_2.559.1061732237 2 290 19-JAN-2021 20:41:58 +RECO/AWSORCLTEST1/FLASHBACK/log_3.560.1061734601 3 345 11-FEB-2021 15:13:32 +RECO/AWSORCLTEST1/FLASHBACK/log_4.556.1061738273 4 291 24-JAN-2021 21:37:53 +RECO/AWSORCLTEST1/FLASHBACK/log_5.554.1061768543 5 340 20-JAN-2021 17:48:04 +RECO/AWSORCLTEST1/FLASHBACK/log_6.568.1064243615 6 346 14-FEB-2021 06:04:08 +RECO/AWSORCLTEST1/FLASHBACK/log_7.548.1064328399 7 1 +RECO/AWSORCLTEST1/FLASHBACK/log_8.579.1064469849 8 1 +RECO/AWSORCLTEST1/FLASHBACK/log_96.345.1058080845 96 292 30-JAN-2021 07:41:49 +RECO/AWSORCLTEST1/FLASHBACK/log_97.533.1058397145 97 293 03-FEB-2021 10:44:47 +RECO/AWSORCLTEST1/FLASHBACK/log_98.531.1059051627 98 341 27-JAN-2021 21:46:13 +RECO/AWSORCLTEST1/FLASHBACK/log_99.535.1059218007 99 294 07-FEB-2021 16:03:51 +RECO/AWSORCLTEST1/FLASHBACK/log_100.538.1059868943 100 342 02-FEB-2021 08:16:36 +RECO/AWSORCLTEST1/FLASHBACK/log_101.542.1059869209 101 343 05-FEB-2021 01:10:02 +RECO/AWSORCLTEST1/FLASHBACK/log_102.545.1059869431 102 295 12-FEB-2021 14:46:38 |
Tab : dba_recyclebin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
set linesize 300 col object_name for a30 col ORIGINAL_NAME for a30 col type for a10 col owner for a10 col CREATETIME for a20 col DROPTIME for a20 select OBJECT_NAME, ORIGINAL_NAME, TYPE,owner,CREATETIME,DROPTIME from dba_recyclebin; OBJECT_NAME ORIGINAL_NAME TYPE OWNER CREATETIME DROPTIME ------------------------------ ------------------------------ ---------- ---------- -------------------- -------------------- BIN$uWPP5TBJJc/gU9b1ugrHHg==$0 EMP11_13_1 TABLE SCOTT 2021-01-20:22:02:09 2021-01-20:22:02:09 BIN$uXgQosMnT4PgU9b1ugrqow==$0 EMP11_13_1 TABLE SCOTT 2021-01-21:22:11:54 2021-01-21:22:11:54 BIN$uYwI+n44bgPgU9b1ugo+qQ==$0 EMP11_3031_1 TABLE SCOTT 2021-01-22:22:01:25 2021-01-22:22:01:25 |
Tab : Check FB is or not?
1 2 3 4 5 |
select FLASHBACK_ON from v$database; FLASHBACK_ON ------------------ YES |
Tab : Change_FB_Retention
1 |
--ALTER SYSTEM SET db_flashback_retention_target=1440 SCOPE=BOTH sid='*' (example) ; |
Tab : Change_FB_Dest
1 |
--alter system set db_recovery_file_dest_size=300G scope=both sid='*' example ; |
Tab : Parameter Reco
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
show parameter reco show parameter flashback_retention NAME TYPE VALUE ------------------------------------ ---------- ------------------------------ control_file_record_keep_time integer 16 db_recovery_file_dest string +RECO db_recovery_file_dest_size big intege 7000G r db_unrecoverable_scn_tracking boolean TRUE recovery_parallelism integer 0 SQL> NAME TYPE VALUE ------------------------------------ ---------- ------------------------------ db_flashback_retention_target integer 1440 |
Tab : check SCN
1 2 3 4 5 6 |
SQL> set numwidth 40 SQL> select current_scn from v$database; CURRENT_SCN ---------------------------------------- 14354115869246 |
Tab : Example Create restore_point
1 |
--create restore point ORCL_JULY23_1544PM guarantee flashback database; |
Tab : Delete Archives
1 |
--DELETE archivelog until time "to_date('1820-09-13:00:00:00','YYYY-MM-DD:hh24:mi:ss')" ; |
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform