-何時破壞

select systimestamp from dual;

 

--破壞

update hr.employees set salary=2;

commit;



--還原到前一分鐘

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.

 

Total System Global Area  306184192 bytes

Fixed Size                  1219088 bytes

Variable Size             159385072 bytes

Database Buffers          138412032 bytes

Redo Buffers                7168000 bytes

Database mounted.

SQL>

 

to date 方法

 

RMAN> run{

 

2> set until time “to_date(‘2013-04-28 02:08:04',’yyyy-mm-dd hh24:mi:ss’)”;

 

3> restore database;

 

4> recover database;}

 

SQL> alter database open resetlogs;

 

Database altered.

 

 

 

文章標籤
全站熱搜
創作者介紹
創作者 to52016 的頭像
to52016

Eason [資料科學//Python學習/資料庫] & [拍片&剪片]

to52016 發表在 痞客邦 留言(0) 人氣(29)