Oracle 10g FLASHBACK DATABASE 實驗記錄
[TEST:oradev] /devTESTarch1/flash_back/TEST/onlinelog> as sysdba" <
SQL*Plus: Release 10.2.0.2.0 - Production on Fri Jan 5 16:28:55 2007
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> alter system set db_recovery_file_dest='/devTESTarch1/flash_back' scope=bo
th;
System altered.
SQL> alter system set db_recovery_file_dest_size=5G scope=both;
System altered.
SQL> show parameter recover
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /devTESTarch1/flash_back
db_recovery_file_dest_size big integer 5G
recovery_parallelism integer 0
SQL> show parameter db_flashback
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target integer 1440
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /devTESTarch1/arch
Oldest online log sequence 268
Next log sequence to archive 270
Current log sequence 270
SQL> select count(*) from v$session;
COUNT(*)
----------
24
SQL> shutdown immeidate
SP2-0717: illegal SHUTDOWN option
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 3758096384 bytes
Fixed Size 2075728 bytes
Variable Size 754975664 bytes
Database Buffers 2986344448 bytes
Redo Buffers 14700544 bytes
Database mounted.
SQL> alter database flashback on;
Database altered.
SQL> alter database open;
Database altered.
SQL> select FLASHBACK_ON from v$database;
FLASHBACK_ON
------------------
YES
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /devTESTarch1/arch
Oldest online log sequence 268
Next log sequence to archive 270
Current log sequence 270
SQL> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';
Session altered.
SQL> SELECT OLDEST_FLASHBACK_SCN, OLDEST_FLASHBACK_TIME
2 FROM V$FLASHBACK_DATABASE_LOG;
OLDEST_FLASHBACK_SCN OLDEST_FLASHBACK_TI
-------------------- -------------------
3609746 2007-01-05 16:32:36
SQL> create table t1 as select * from dba_objects;
Table created.
SQL> create table t2 as select * from t1;
Table created.
SQL> create table t3 as select * from t1;
Table created.
SQL> set time on;
16:35:10 SQL> select sysdate from dual;
SYSDATE
-------------------
2007-01-05 16:35:19
16:35:19 SQL> select sysdate from dual;
SYSDATE
-------------------
2007-01-05 16:35:48
16:35:48 SQL> truncate table t2;
Table truncated.
16:36:03 SQL> drop table t3;
Table dropped.
16:36:11 SQL> create table t4 as select * from t1;
Table created.
16:36:29 SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
16:37:34 SQL> startup mount exclusive
ORACLE instance started.
Total System Global Area 3758096384 bytes
Fixed Size 2075728 bytes
Variable Size 754975664 bytes
Database Buffers 2986344448 bytes
Redo Buffers 14700544 bytes
Database mounted.
16:38:09 SQL> FLASHBACK DATABASE TO timestamp(to_date('2007-01-05 16:35:48','yyy
y-mm-dd hh24:mi:ss'));
Flashback complete.
16:38:16 SQL> alter database open resetlogs;
Database altered.
16:38:57 SQL> select count(*) from t1;
COUNT(*)
----------
50291
16:39:21 SQL> select count(*) from t2;
COUNT(*)
----------
50291
16:39:31 SQL> select count(*) from t3;
COUNT(*)
----------
50291
16:39:42 SQL> select count(*) from t4;
select count(*) from t4
*
ERROR at line 1:
ORA-00942: table or view does not exist
16:39:45 SQL>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7318139/viewspace-888509/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle實驗記錄 (flashback)Oracle
- oracle實驗記錄 (oracle 10G rman transport database)OracleDatabase
- oracle實驗記錄 (oracle 10G dataguard(10)flashback 與dg)Oracle
- oracle 10g flashback databaseOracle 10gDatabase
- oracle實驗記錄 (flashback,physical standby resetlogs)Oracle
- oracle實驗記錄 手工 duplicate database(1)OracleDatabase
- oracle實驗記錄Rman duplicate database(1)OracleDatabase
- oracle實驗記錄Rman duplicate database 2OracleDatabase
- oracle 10g flashback version query 和 flashback transaction query實驗Oracle 10g
- oracle實驗記錄 (手動 duplicate database(3))OracleDatabase
- Flashback New Features and Enhancements in Oracle Database 10gOracleDatabase
- [Flashback]Flashback Database閃回資料庫實驗Database資料庫
- oracle實驗記錄(手動dupliacate database(2))OracleDatabase
- oracle實驗記錄 (oracle 10G 詳細分析undo)Oracle
- oracle實驗記錄 (oracle 10G dataguard(1)手工搭建)Oracle
- 【Flashback】Flashback Database閃回資料庫功能實驗Database資料庫
- oracle實驗記錄 (oracle 10G dataguard(5)實時應用)Oracle
- oracle實驗記錄 (oracle 10G dataguard(2)引數部分)Oracle
- oracle實驗記錄 (oracle 10G dataguard(3)檔案管理)Oracle
- oracle實驗記錄 (oracle 10G dataguard(6)保護模式)Oracle模式
- oracle實驗記錄 (oracle 10G dataguard(8)rman 建立dg)Oracle
- oracle實驗記錄 (oracle 10G dbms_xplan的強化)Oracle
- oracle實驗記錄 (oracle 10G dataguard(4)redo傳輸&程式)Oracle
- oracle實驗記錄 (oracle 10G dataguard(7)physical dg轉換)Oracle
- oracle實驗記錄 (oracle 10G dataguard(11)建立logical standby)Oracle
- oracle實驗記錄 (database_properties與表空間屬性)OracleDatabase
- oracle實驗記錄 (oracle 10G dataguard(9)rman恢復與dg)Oracle
- oracle flashback特性(3.2)--Flashback Database操作示例OracleDatabase
- Oracle 10g flashbackOracle 10g
- oracle實驗記錄 (OMF)Oracle
- oracle實驗記錄 (NET)Oracle
- oracle實驗記錄 (audit)Oracle
- 應用oracle flashback--Flashback Database介紹OracleDatabase
- oracle實驗記錄 (oracle reset parameter)Oracle
- Physical Standby上開啟flashback database實驗日誌Database
- Oracle 閃回特性(FLASHBACK DATABASE)OracleDatabase
- Oracle Data Redaction實驗記錄Oracle
- oracle實驗記錄 (block cleanout)OracleBloC