connect / as sysdba
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=D:oracleproduct10.1.0oradatazhaoarchive' SCOPE=BOTH; 必须自己先创建相应的目录
alter system set log_archive_dest_state_1=enable scope=both;
ALTER SYSTEM SET LOG_ARCHIVE_FORMAT='arc_%s_%t_%r' SCOPE=spfile; 不是实例可调整的
ALTER SYSTEM SET LOG_ARCHIVE_START=TRUE SCOPE=spfile;不是实例可调整的
alter system set db_recovery_file_dest='D:oracleproduct10.1.0flash_recovery_areazhao' scope=both; 必须自己先创建相应的目录
alter system set db_recovery_file_dest_size=1024m scope=both;
alter system set db_flashback_retention_target=2880 scope=both;
shutdown immediate;
startup mount exclusive;
alter database archivelog;
alter database flashback on;
alter database open;
conect scott/love
create table zsj_objects as select * from dba_objects;
select dbms_flashback.get_system_change_number() from dual; 342079
drop table zsj_objects purge;
connect / as sysdba
shutdown immediate;
startup mount exclusive;
flashback database to scn 342079;可以接着往前回闪
flashback database to scn 341000;
alter database open read only;
然后检查发现没有达到效果;
shutdown immediate;
startup mount exclusive;
recover database;
flashback database to scn 342079;
alter database open read only;
检查发现达到效果了;
shutdown immediate;
startup mount;
alter database open; 这是不被允许的
alter database open resetlogs;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10597822/viewspace-997258/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10597822/viewspace-997258/