Search This Blog

Total Pageviews

Thursday, 22 December 2011

Oracle flashback on

how to start flashback ?
how to start oracle flashback ?
Oracle flashback start




SQL> select VERSION from v$instance ;

VERSION
-----------------
11.2.0.3.0




LOG_ARCHIVE_FORMAT must be in the format: %s,%t,%r.

%s log sequence number
%S log sequence number, zero filled
%t Thread number
%T Thread number, zero filled
%a activation ID
%d database ID
%r resetlogs ID that ensures unique names are constructed for the archived log files across multiple incarnations of the database



start from here <<<<<<<<<<<<<<<<<<<<<<<<<<<




SQL> create pfile='/tmp/init_aptdb.txt' from spfile ;

File created.



in pfile <<<<<

*.log_archive_dest_1="LOCATION=/ptus/oracle/Arch/Aptdb"
*.log_archive_format='AptOra_%t_%s_%r.arc'
*.db_recovery_file_dest='/ptus/oracle/Diag/Flashback'
*.db_recovery_file_dest_size=3221225472 --- 3gb
*.db_flashback_retention_target=7200 --- 5 days



SQL> startup mount pfile='/tmp/init_aptdb.txt' ;
ORACLE instance started.

Total System Global Area 1252663296 bytes
Fixed Size 2227944 bytes
Variable Size 939524376 bytes
Database Buffers 301989888 bytes
Redo Buffers 8921088 bytes
Database mounted.
SQL> Alter database flashback on;

Database altered.



SQL> alter database open ;

Database altered.


SELECT name,current_scn ,flashback_on FROM v$database;

NAME CURRENT_SCN FLASHBACK_ON
--------- ----------- ------------------
APTDB 1278076 YES


SQL> create spfile from pfile='/tmp/init_aptdb.txt' ;

File created.



SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /ptus/oracle/Arch/Aptdb
Oldest online log sequence 90
Next log sequence to archive 92
Current log sequence 92

SQL> show parameter recovery

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /ptus/oracle/Diag/Flashback
db_recovery_file_dest_size big integer 3G
recovery_parallelism integer 0

SQL> show parameter retention

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target integer 7200
undo_retention integer 900




/ptus/oracle/Diag/Flashback/APTDB/flashback

-bash-4.1$ ls -lh
total 101M
-rw-r-----. 1 oracle oinstall 51M Dec 22 14:46 o1_mf_7h6hht6d_.flb
-rw-r-----. 1 oracle oinstall 51M Dec 22 14:26 o1_mf_7h6hhwnt_.flb

Oracle DBA

anuj blog Archive