Examples
FLASHBACK DATABASE to a Specific SCN: Example The following command uses Flashback Database to return the database to the specified SCN:
RMAN> FLASHBACK DATABASE TO SCN 46963;---select current_scn from v$database
FLASHBACK DATABASE to One Hour Ago: Example The following command uses Flashback Database to return the database to 1/24 of a day (one hour) in the past:
RMAN> FLASHBACK DATABASE TO TIMESTAMP (SYSDATE-1/24);--timestamp parameter
FLASHBACK DATABASE to a Specific Time: Example The following command uses SQL date conversion functions to specify the target time:
RMAN> FLASHBACK DATABASE TO TIMESTAMP --timestamp(to_timestamp())
TO_TIMESTAMP('2002-03-11 16:00:00', 'YYYY-MM-DD HH24:MI:SS');
FLASHBACK DATABASE to a Restore Point: Example The following command uses a restore point to identify the target time for a Flashback Database operation:
RMAN> FLASHBACK DATABASE TO RESTORE POINT "before_batch";--还原点
FLASHBACK DATABASE to Before the Last Resetlogs: Example The following command returns the database to immediately before the most recent OPEN RESETLOGS:
RMAN> FLASHBACK DATABASE TO BEFORE RESETLOGS;---还原到resetlogs之前(最近)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-615355/ ,如需转载,请注明出处,否则将追究法律责任。