Wednesday, May 21, 2008

[nonsence] Test flashback database => alter tablespace undo flashback off

I tested to flashback off on undo tablespace.

SQL> alter tablespace UNDOTBS1 flashback offline;

datafile 3 => UNDO tablespace


After that, I try to flashback database.

My failed:

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 20:51: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



So,

SQL> startup mount;
ORACLE instance started.

Total System Global Area 1620115456 bytes
Fixed Size 2144864 bytes
Variable Size 1207960992 bytes
Database Buffers 402653184 bytes
Redo Buffers 7356416 bytes
Database mounted.


SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
Process ID: 19557
Session ID: 115 Serial number: 5

SQL> alter database datafile 3 online;

Database altered.

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01190: control file or data file 3 is from before the last RESETLOGS
ORA-01110: data file 3: '+DATA/testdb/datafile/undotbs1.1086.651074273'

Oh I can't do anything.

No comments: