Flashback in oracle 9i
Dear all:
I am careless to drop a table. Can I flashback the table use "SQL> FLASHBACK TABLE RECYCLETEST TO BEFORE DROP;" in Oracle 9i ?
Regards
Terry
In 9i you could use Flashback Query to recover unwanted DML changes if UNDO is being managed appropriately.
http://www.oracle-base.com/articles/9i/FlashbackQuery.php
And to recover from a DROP or TRUNCATE TABLE you could use RMAN Incomplete recovery if db is setup properly in terms of backups and archive logs.
http://www.oracle-base.com/articles/9i/RecoveryManager9i.php#IncompleteRecovery
Perform recovery just before the time of disastrous DROP or TRUNCATE.
Similar Messages
-
I have not used Oracle as yet. We are still on the mainframe. But I was looking at ORACLE magazine article November/December issue and page 62. When doing flashback you have to shutdown oracle and then startup mount to do flashback.
A question?
1. In mainframe world, we do not have to bring down CICS to do restore on a certain file - mayebe just close it. All people can still use CICS except that file.
2. Oracle do you have to take down the whole database just to do flashback and stop everybody from doing their job?
Thanks
RonaldYou should ask this question in the Database General forum:
General Database Discussions -
I have not used Oracle as yet. We are still on the mainframe. But I was looking at ORACLE magazine article November/December issue and page 62. When doing flashback you have to shutdown oracle and then startup mount to do flashback.
A question?
1. In mainframe world, we do not have to bring down CICS to do restore on a certain file - mayebe just close it. All people can still use CICS except that file.
2. Oracle do you have to take down the whole database just to do flashback and stop everybody from doing their job?
Thanks
RonaldFor the Flashback Database feature, the database must be in a mounted state and not open when performing the flashback. Unfortunately Oracle does not provide a way to take an open database to mount without first shutting down the database.
Other Flashback features such as Flashback Drop and Flashback Query, the database can be opened. -
Unfoutunately, i have truncated a table which data was quite important for our users. My database version is 9i-r2 on UNIX platform. Please give me any idea to restore this table. Remember, this database is quite important for our company and they will never ready to give any down time.
your prime response is quite important for me. Waiting!If you did truncate table you can not restore table simple "flashback table" statement,You can flshback database.
If you have backup then restore table from backup. -
I was wondering if someone could answer these questions about "Flashback" in Oracle 10g?
Is "Flashback On" required if we are going to have a standby database?
If "Flashback Off" is set for a database what effect does "Flashback On" have when you create a tablespace?We changed the way you work with Struts a little in this version - making it simpler through the Visual Struts Page Flow Modeler.
You create actions directly on the editor (drag and drop from the componenet palette).
And you create FormBeans in the structure window.
(there is a simple tutorial as part of the JDeveloper Reviewer Guide).
Have a look at the Struts demos on this page:
http://otn.oracle.com/products/jdev/viewlets/viewlet.html -
Hey folks,
what do you think about the generated load while using flashback.
My database stopped working while a background process is deleting rows from a huge table.
Flashback is enabled - my flashback area filled up.
Just in general. How much load does flashback generate ?
Do you think thats always a good idea to switch off flashback, before deleting thousand of rows ?
Yes, I am sure, that the old data is not needed any more.... :-)
ChrisChristian wrote:
what do you think about the generated load while using flashback.
My database stopped working while a background process is deleting rows from a huge table.
Flashback is enabled - my flashback area filled up.
Just in general. How much load does flashback generate ?
If you delete large volumes of data you will generate large volumes of undo.
Before an undo block can be recycled it has to be "new"ed (in Oracle-speak). Normalllly this means that Oracle simply creates a new version of the block in memory without reference to the existing block on disc; but if you are running in flashback mode Oracle (usually) has to read the undo block from disc, and write it into the flashback log before newing it. This activity will show up in statistic "physical reads for flashback new" - the combination of the extra reads and the extra volume of flashback log could cause an I/O problem - the latter (as others have commented) being a reason for the database stopping.
Do you think thats always a good idea to switch off flashback, before deleting thousand of rows ? That depends on why you're running in flashback mode.
Regards
Jonathan Lewis -
DB_RECOVERY_FILE_DEST_SIZE specifies (in bytes) the hard limit on the total space to be used by target database recovery files created in the flash recovery area.
db_flashback_retention_target : specifies the upper limit (in minutes) on how far back in time the database may be flashed back. How far back one can flash back a database depends on how much flashback data Oracle has kept in the recovery area
Can someone explain best use of these parameters? I think either one of them is good.
Thanks.Let say the database size is 10G , so the
DB_RECOVERY_FILE_DEST_SIZE should be at least 4 times the database size, beacause it contains: flashback log, rmain backup and so on..
simple way to set it
alter system set db_recovery_file_dest='C:\FLASHRECOVERYAREA_ORCL' scope=both;
alter system set db_recovery_file_dest_size=40000M scope=both; ( inside the spfile this paramter will be converted in bytes)
Now let say we are on friday and you discover that someone entered bad info that corrupted you business data and you need to rollback your database to monday without using the traditional rollback method used with archived log files.
you may set db_flashback_retention_target=10080 ( 7 days=24*60*7) this paramter is set by minutes.
from that your database may be rollbacked until monday.
Thanks -
ORA-16401: archivelog rejected by RFS
Hello, here are the logs and initialisation parameters. It is not applying the logs. Am running XXXXP and the standby and the primary are on the same server.
Please, I need help. Thanks
RFS[1]: Assigned to RFS process 216
RFS[1]: Identified database type as 'physical standby'
Wed May 13 18:39:07 2009
RFS LogMiner: Client disabled from further notification
RFS[1]: Successfully opened standby log 4: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\TEST2\STANDBY.LOG'
Wed May 13 18:39:15 2009
FAL[client]: Failed to request gap sequence
GAP - thread 1 sequence 3-3
DBID 1063720110 branch 686695334
FAL[client]: All defined FAL servers have been attempted.
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that is sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
Wed May 13 18:39:48 2009
RFS[1]: Archived Log: 'C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\TEST2\ARC00003_0686697929.001'
Wed May 13 18:40:33 2009
db_recovery_file_dest_size of 2048 MB is 0.00% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.
Wed May 13 18:40:48 2009
RFS[1]: Archivelog thread 1 sequence 3 cannot be reused
Wed May 13 18:40:48 2009
Errors in file c:\oracle\product\10.2.0\admin\test2\udump\test2_rfs_216.trc:
ORA-16401: archivelog rejected by RFS
test1.__db_cache_size=88080384
test1.__java_pool_size=4194304
test1.__large_pool_size=4194304
test1.__shared_pool_size=62914560
test1.__streams_pool_size=0
*.audit_file_dest='C:\oracle\product\10.2.0\admin\test1\adump'
*.background_dump_dest='C:\oracle\product\10.2.0\admin\test1\bdump'
*.compatible='10.2.0.1.0'
*.control_files='C:\oracle\product\10.2.0\oradata\test1\control01.ctl','C:\oracle\product\10.2.0\oradata\test1\control02.ctl','C:\oracle\product\10.2.0\oradata\test1\control03.ctl'
*.core_dump_dest='C:\oracle\product\10.2.0\admin\test1\cdump'
*.db_block_size=8192
*.db_domain='appstech.local'
*.db_create_file_dest='C:\Oracle\product\10.2.0\oradata\test1'
*.db_file_multiblock_read_count=16
*.db_file_name_convert='C:\Oracle\product\10.2.0\oradata\test2\','C:\Oracle\product\10.2.0\oradata\test1\'
*.db_name='test1'
*.db_recovery_file_dest='C:\Oracle\product\10.2.0\flash_recovery_area\TEST1'
*.db_recovery_file_dest_size=2147483648
*.db_unique_name='test1'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=test1XDB)'
*.fal_client='test1'
*.fal_server='test2'
*.job_queue_processes=10
*.local_listener='test1'
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(test1,test2)'
*.LOG_ARCHIVE_DEST_1='LOCATION=C:\Oracle\product\10.2.0\flash_recovery_area\TEST1
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=test1'
*.log_archive_dest_2='SERVICE=test2 ARCH MANDATORY
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=test2'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.log_file_name_convert='C:\Oracle\product\10.2.0\flash_recovery_area\TEST2','C:\Oracle\product\10.2.0\flash_recovery_area\TEST1',
'C:\Oracle\product\10.2.0\flash_recovery_area\TEST2\ONLINELOG','C:\Oracle\product\10.2.0\flash_recovery_area\TEST1\ONLINELOG',
'C:\Oracle\product\10.2.0\oradata\test2','C:\Oracle\product\10.2.0\oradata\test1',
'C:\Oracle\product\10.2.0\flash_recovery_area\TEST2\FLASHBACK','C:\Oracle\product\10.2.0\flash_recovery_area\TEST1\FLASHBACK'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.query_rewrite_enabled='true'
*.sga_target=167772160
*.undo_management='AUTO'
*.undo_retention=3600
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='C:\oracle\product\10.2.0\admin\test1\udump'
test2.__db_cache_size=79691776
test2.__java_pool_size=4194304
test2.__large_pool_size=4194304
test2.__shared_pool_size=71303168
test2.__streams_pool_size=0
*.archive_lag_target=1800
*.audit_file_dest='C:\oracle\product\10.2.0\admin\test2\adump'
*.background_dump_dest='C:\oracle\product\10.2.0\admin\test2\bdump'
*.compatible='10.2.0.1.0'
*.control_files='C:\Oracle\product\10.2.0\oradata\test2\control01.ctl','C:\Oracle\product\10.2.0\oradata\test2\control02.ctl'
,'C:\Oracle\product\10.2.0\oradata\test2\control03.ctl'
#*.control_files='C:\Oracle\product\10.2.0\oradata\test2\test1_test2.ctl'
*.core_dump_dest='C:\oracle\product\10.2.0\admin\test2\cdump'
*.db_block_size=8192
*.db_domain='appstech.local'
*.db_file_multiblock_read_count=16
*.db_file_name_convert='C:\Oracle\product\10.2.0\oradata\test1','C:\Oracle\product\10.2.0\oradata\test2'
*.db_name='test1'
*.db_recovery_file_dest='C:\oracle\product\10.2.0\flash_recovery_area'
*.db_recovery_file_dest_size=4147483648
*.dg_broker_start=TRUE
*.dispatchers='(PROTOCOL=TCP) (SERVICE=test1XDB)'
*.db_unique_name='test2'
*.fal_client='test2'
*.fal_server='test1'
*.job_queue_processes=10
*.local_listener='test2'
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(TEST1,TEST2)'
*.LOG_ARCHIVE_DEST_1='LOCATION=C:\Oracle\product\10.2.0\flash_recovery_area\TEST2\ARCHIVELOG
VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=test2'
*.log_archive_dest_2='SERVICE=test1 LGWR ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=test1'
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc'
*.log_file_name_convert='C:\Oracle\product\10.2.0\flash_recovery_area\TEST1\ONLINELOG\','C:\Oracle\product\10.2.0\flash_recovery_area\TEST2\ONLINELOG\'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.query_rewrite_enabled='TRUE'
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=167772160
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='C:\oracle\product\10.2.0\admin\test2\udump'
*.undo_retention=3600
*.db_create_file_dest='C:\Oracle\product\10.2.0\oradata\test2'
*.log_archive_start='TRUE'
*.log_archive_trace=2
*.remote_archive_enable='TRUE'Hello those are the latest logs I can see them over to the standby but they are not applied to them. I have set the LGWR on both log_archive_dest_2;
Regards
ompleted: alter database mount standby database
Thu May 14 11:18:15 2009
alter database recover managed standby database disconnect from session
MRP0 started with pid=18, OS id=3940
Managed Standby Recovery not using Real Time Apply
Media Recovery start incarnation depth : 1, target inc# : 4, irscn : 607856
Media Recovery Waiting for thread 1 sequence 3 branch(resetlogs_id) 686695334
Fetching gap sequence in thread 1 branch(resetlogs_id) 686695334, gap seq 3-3
Thu May 14 11:18:21 2009
Completed: alter database recover managed standby database disconnect from session
Thu May 14 11:18:51 2009
FAL[client]: Failed to request gap sequence
GAP - thread 1 sequence 3-3
DBID 1063720110 branch 686695334
FAL[client]: All defined FAL servers have been attempted.
Check that the CONTROL_FILE_RECORD_KEEP_TIME initialization
parameter is defined to a value that is sufficiently large
enough to maintain adequate log switch information to resolve
archivelog gaps.
Thu May 14 11:21:23 2009
Shutting down instance: further logons disabled
Thu May 14 11:21:23 2009
Stopping background process CJQ0
Thu May 14 11:21:24 2009
Stopping background process MMNL
Thu May 14 11:21:25 2009
Stopping background process MMON
Thu May 14 11:32:25 2009
Shutting down archive processes
Thu May 14 11:32:30 2009
ARCH shutting down
ARC2: Archival stopped
Thu May 14 11:32:31 2009
Errors in file c:\oracle\product\10.2.0\admin\test1\bdump\test1_arc1_1912.trc:
ORA-16401: archivelog rejected by RFS
Thu May 14 11:33:31 2009
Errors in file c:\oracle\product\10.2.0\admin\test1\bdump\test1_arc1_1912.trc:
ORA-16401: archivelog rejected by RFS
Thu May 14 11:34:31 2009
Errors in file c:\oracle\product\10.2.0\admin\test1\bdump\test1_arc1_1912.trc:
ORA-16401: archivelog rejected by RFS -
Problem with Restore Database.
Hi, I work with Oracle 10g XE archivelog mode and use the second partition of my hard drive for backups, the path is: D:\Oracle Database 10g Express Edition \ Backup.
I formatted the first partition of my hard drive where it was installed my XE, now I have reinstalled my XE and I have set archivelog mode and I changed the path to the path Flashback: D: Oracle Database 10g Express Edition \ Backup, but if I make a backup, RMAN asks me the path to the back, the entry route and displays the error:
Route D:\Oracle Database 10g Express Edition \ Backup
The path is incorrect.
Help me please.
Roberto.Use short 8.3 filenames. To get them make: start|run|command.com and place "dir" in that directory where backup is located. Use that names in script.
P.S.
As adviced use path with no blanks or special signs... -
Why would db_flashback_retention_target be set to 0?
Anybody ever came across this before? This should be set to a retention time such as 24 hours..but I have ran into a machine that is set to 0, would this possibly mean to tell flashback to use as much space as possible...the flashback ASM diskgroup only has 1.8GB available in it. On another note, how much performance degredation would flashback database cause on a system that during high processing is switching redologs about 20 times an hour?..I know I need to resize them too.
Hi,
"DB_FLASHBACK_RETENTION_TARGET specifies the upper limit (in minutes) on how far back in time the database may be flashed back. How far back one can flashback a database depends on how much flashback data Oracle has kept in the flash recovery area."
So, i suppose that your FRA is large enough to store the whole 24 hours and that nothing would be erased until space is claimed.
Take a look here also:
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/rpfbdb003.htm#BRBSC13993
"If the database needs to create a new flashback log and the flash recovery area is full or there is no disk space, then the oldest flashback log is reused instead."
But.. i'm not a guru, so i could be wrong.. :-)
Acr -
How can I flash back off on UNDO tablespace?
I have used flashback on ( oracle database), then I have flashed back off some tablespaces.
I have some question:
Can I flashback off on UNDO tablespace?
When I flashback on Undo tablespace, that'll impact to flashback feature or not?
Thank you.TEST:
SQL> flashback database to timestamp to_timestamp('2008-05-20 19:13:00', 'YYYY-MM-DD HH24:MI:SS');
flashback database to timestamp to_timestamp('2008-05-20 19:13:00', 'YYYY-MM-DD HH24:MI:SS')
ERROR at line 1:
ORA-38753: Cannot flashback data file 5; no flashback log data.
ORA-01110: data file 5: '+DATA/testdb/datafile/example.1075.651074487'
ORA-38753: Cannot flashback data file 3; no flashback log data.
ORA-01110: data file 3: '+DATA/testdb/datafile/undotbs1.1086.651074273'
SQL> alter database datafile 5 oflfine;
alter database datafile 5 oflfine
ERROR at line 1:
ORA-01916: keyword ONLINE, OFFLINE, RESIZE, AUTOEXTEND or END/DROP expected
SQL> alter database datafile 5 offline;
Database altered.
SQL> flashback database to timestamp to_timestamp('2008-05-20 19:13:00', 'YYYY-MM-DD HH24:MI:SS');
flashback database to timestamp to_timestamp('2008-05-20 19:13:00', 'YYYY-MM-DD HH24:MI:SS')
ERROR at line 1:
ORA-38753: Cannot flashback data file 3; no flashback log data.
ORA-01110: data file 3: '+DATA/testdb/datafile/undotbs1.1086.651074273'
SQL> alter database datafile 3 offline;
Database altered.
SQL> flashback database to timestamp to_timestamp('2008-05-20 19:13:00', 'YYYY-MM-DD HH24:MI:SS');
Flashback complete.
SQL> alter database open resetlogs;
alter database open resetlogs
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
Process ID: 18585
Session ID: 115 Serial number: 5 -
I am on Mac with OS X but need latest Flash apparently, have downloaded it to HD loads of times yet still need it - WTF!!?? x
I totally agree about Flash, althouh there are still many sites out there that require Flash. In my case -- mostly for the video playback that was not converted to HTML5. And I do agree that portable devices should not have Flash... but it is an entirely different story about notebooks and desktops.
As Java goes (and I'm assuming that you're referring to the latest Flashback trojan) Oracle has nothing to do with it. The blame here completely goes to Apple. Due to previous patent disputes, Apple opted out of Oracle's code for the Mac OS X platform and chose to write their own version of Java. So when the Flashback virus first came out in the late 2011, Oracle quickly patched the hole that it was exploiting on the Windows and Linux platforms, but ... what we were faced with is a slow response from Apple in doing the same for OS X. So don't lump Oracle into it.... Just FYI. -
Hello!
I'm executing this statement but it doesn't work
FLASHBACK TABLE TABLE
TO TIMESTAMP (SYSTIMESTAMP - INTERVAL '10' minute);
I got this message:
"ORA-00439: feature not enabled: Flashback Table"
What can I do?
Thanks in advanceHello Daniel,
here's an official list from Oracle: (representaion is not so perfect), but I hope you can see Flashback features are included in 10G Enterprise Edition and Personal Edition, Flashback query (I think, this includes FLASHBACK DROP) is included in all editions.
Option 10G 10G 10G 10G Notes
Stand. Stand. Entrp. Pers.
Edit. Edit. Edit. Edit.
One
Oracle Flashback N N Y Y Oracle Flashback Table
features Oracle Flashback Database
Oracle Flashback
Transaction Query.
Flashback Query Y Y Y Y Allows data to be queried
from a point in the past. -
Can RMAN do table-level recovery
Hi,
I know that you can do database and tablespace level recovery using RMAN. Can you also do table-level recovery? How granular can you get?
ThanksFor table level recovery you can use flashback features:
Flashback Drop - Oracle now provides a way to use flashback to restore tables that were dropped accidentally.
Flashback Table - This feature introduces the FLASHBACK TABLE statement in SQL, which lets you quickly recover a table to a previous point in time without restoring a backup.
etc
Oracle Database has a group of features, known collectively as flashback, that provide ways to view past states of database objects, or to return database objects to a previous state, without using traditional point-in-time recovery.
Flashback features of the database can be used to:
* Perform queries that return past data.
* Perform queries that return metadata showing a detailed history of changes to the database.
* Recover tables or individual rows to a previous point in time.
Flashback features use the Automatic Undo Management system to obtain metadata and historical data for transactions. They rely on undo data: records of the effects of individual transactions. Undo data is persistent and survives a database malfunction or shutdown. Using flashback features, you employ undo data to query past data or recover from logical corruptions. Besides your use of it in flashback operations, undo data is used by Oracle Database to do the following:
* rollback active transactions
* recover terminated transactions using database or process recovery
* provide read consistency for SQL queries
Please refer here: http://www.stanford.edu/dept/itss/docs/oracle/10g/appdev.101/b10795/adfns_fl.htm
And an other method is, if table is very important and your db is working archive mod, you can recovery your database (skip unnecessary tablespaces which is not needed for saving space cost) to another host (disaster recovery), then take export that table, import to your working db or create database link between this databases insert into user.table1 as select * from user.table1@recoevered_database; -
(V9I) ORACLE 9I NEW FEATURE : ORACLE FLASHBACK
제품 : ORACLE SERVER
작성날짜 : 2002-11-01
(V9I) ORACLE 9I New Feature : ORACLE FLASHBACK
==============================================
PURPOSE
Oracle9i 새로운 기능인 Flashback 의 등장으로 Commit 된 Transaction 에 대해
특정 시점의 과거 DATA를 Query가 가능함으로써 Self-service repair 기능이 향상되었다.
다음 Flashback query 기능과 Setup 방법 및 실제 Data Recovery 에 관한 내용에 대해 알아보도록 한다.
Explanation
Flashback : 새로운 기능인 Flahback 은 과거 시점의 consistent view 를 볼 수있는
기능으로 system time or systme change number(SCN) 기반 read-only view이다.
다음은 Flashback 기능을 사용하기 위해 미리 설정해야할 부분에 대해 알아보도록 한다.
1) 반드시 Automatic Undo Management 에서만 가능
(initSID.ora file이나 spfile에 다음 파라미터가 auto로 설정)
UNDO_MANAGEMENT = AUTO
2) Rentention interval 을 두어 해당 time 동안은 inactive rollback 이라 하더라도
overwrite 되지 않도록 유지(초단위)
SQL> ALTER SYSTEM SET undo_retention = 1200;
UNDO_RETENTION 을 지정한 다음 실제 적용을 위해 5분정도 기다려야 한다.
3) DBMS_FLASHBACK package를 이용하여 Flashback 기능을 enable 시킨다.
SQL> call dbms_flashback.enable_at_time('9-NOV-01:11:00:00');
Example1. Flashback setup 과 date/time 설정
1) Undo tablespace 생성
SQL> create undo tablespace UNDOTBS datafile
'/database/901/V901/undotbs01.dbf' size 100M;
2) intiSID or spfile 에 다음 파라미터 적용
undo_management=auto
undo_retention=1200
undo_tablespace=UNDOTBS
3) dbms_flashback exeucte 권한 grant
SQL> connect / as sysdba
Connected.
SQL> grant execute on dbms_flashback to testuser;
Grant succeeded.
4) test table 생성
SQL> connect testuser/testuser;
Connected.
SQL> create table emp_flash as select * from scott.emp;
Table created.
SQL> select count(*) from emp_flash;
COUNT(*)
15
5) table 생성후 5분 정도 waiting -> table delete
SQL> delete from emp_flash;
15 rows deleted.
SQL> commit;
Commit complete.
SQL> select count(*) from emp_flash;
COUNT(*)
0
6) flashback 활성화
SQL> execute DBMS_FLASHBACK.ENABLE_AT_TIME(sysdate - 5/1440);
PL/SQL procedure successfully completed.
SQL> select count(*) from emp_flash;
COUNT(*)
15
SQL> execute DBMS_FLASHBACK.DISABLE;
PL/SQL procedure successfully completed.
SQL> select count(*) from emp_flash;
COUNT(*)
0
Example2. Flashback 으로 잃어버린 data recovery
1) test user 생성
SQL> connect testuser/testuser;
Connected.
SQL> create table emp_recover as select * from scott.emp;
Table created.
SQL> select count(*) from emp_recover;
COUNT(*)
15
2) delete table
SQL> VARIABLE SCN_SAVE NUMBER;
SQL> EXECUTE :SCN_SAVE := DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER;
PL/SQL procedure successfully completed.
SQL> PRINT SCN_SAVE
SCN_SAVE
6.4455E+12
SQL> select count(*) from emp_recover;
COUNT(*)
15
SQL> delete from emp_recover;
15 rows deleted.
SQL> commit;
Commit complete.
SQL> select count(*) from emp_recover;
COUNT(*)
0
3) flashback 이용한 data recover
SQL> DECLARE
2 CURSOR FLASH_RECOVER IS
3 select * from emp_recover;
4 emp_recover_rec emp_recover%ROWTYPE;
5 begin
6 DBMS_FLASHBACK.ENABLE_AT_SYSTEM_CHANGE_NUMBER(:SCN_SAVE);
7 open FLASH_RECOVER;
8 DBMS_FLASHBACK.DISABLE;
9 loop
10 FETCH FLASH_RECOVER INTO emp_recover_rec;
11 EXIT WHEN FLASH_RECOVER%NOTFOUND;
12 insert into emp_recover
13 values
14 (emp_recover_rec.empno,
15 emp_recover_rec.ename,
16 emp_recover_rec.job,
17 emp_recover_rec.mgr,
18 emp_recover_rec.hiredate,
19 emp_recover_rec.sal,
20 emp_recover_rec.comm,
21 emp_recover_rec.deptno);
22 end loop;
23 CLOSE FLASH_RECOVER;
24 commit;
25 end;
26 /
PL/SQL procedure successfully completed.
SQL> select count(*) from emp_recover;
COUNT(*)
15
Reference Document
Note. 174425.1
Note. 143217.1
Note. 179851.1I 'm sorry I can not offer the correct figure since I'm an easy-to-forget guy.
Below is extracted from other's post. wish it helps.
Oracle Security Server ---> 2 questions
High Availability Technology ---> 4 questions
LogMiner Enhancements -> 1 question
Backup & Recovery Enhancements ---> 3 questions
Data Guard ---> 3 questions
Resource Manager Enhancements ---> 2 questions
Online Operations Enhancements ---> 3 questions
Segment Management (Part I) ---> 4 questions
Segment Management (Part II) ---> 3 questions
Performance Improvements ---> 4 questions
Scalable Session Management ---> 2 questions
Real Application Clusters ---> 2 questions
File Management ---> 4 questions
Tablespace Management ---> 4 questions
Memory Management ---> 3 questions
Enterprise Manager Enhancements ---> 2 questions
by the way, I just found an enthusiast (roxylo
) posted a book about the 9i new features. It surely will help
Maybe you are looking for
-
I downloaded ff7.0 and the orange rectangle appeared but now I can no longer find at the top of the page my tools, help, and other things I need, Might someone be so kind as to assist me? Thank you, Leeflea.
-
How to access my hard drive over the internet?
Hi, I would like to be able to access my hard drive while I am away from my desk. I am not running OS X Server. How can I do this? Also, I am behind an Airport Base Station. Which ports would I need to open up? Besides my Firewall and my Administrato
-
Printing Arabic Text in a Form Developed in Language 'EN'
HI All, I have a form developed in EN language when we take a print out of the form there is a Description for the Material in Arabic which is Read from the Header Texts, When this Description comes in Print Privew it comes in a Inverted way that is
-
Unkown file error on some of the clips
I have a folder of video clips that are all recorded from a GoPro, and when I drag them into the browser in FCE only the first half of the clips appear. For the other clips, the notcie "File Error: Unknown File" appears. All the clips are 720p 60fp
-
Hi, I'm trying to compile java files at runtime and I want to see the execution output into my eclipse consol or anywhere. I've tried different thing such as Runtime r = Runtime.getRuntime(); String command=""; command =