Alter session set nls_date_format= ' Yyyymmdd hh24:mi:ss ';
Select Sysdate from dual;
Conn dbauser/123456; Just a single user, and then delete one of the tables for testing.
drop table test;
Rman target/
startup Mount;
Restore database; Restoring a data file
SQL ' alter session set nls_date_format= "YYYYMMDD hh24:mi:ss"; Because it executes in Rman, SQL "is required;
Recover database until time ' 20110414 11:33:56 '; Recover data to this time, after execution need to regenerate redo log file
SQL ' ALTER DATABASE open resetlogs ';
The SCN refers to the system change number, which is used by the Oracle database to record the state and trajectory of the database in the past time
Conn/as SYSDBA
Select Dbms_flashback.get_system_chage_number from dual;
Select To_char (Scn_to_timestamp (963959), ' Yyyy-mm-dd HH24:MI:SS ') from dual; Convert SCN to TIME
SELECT * FROM (select TIME_DP,SCN to Smon_scn_time ORDER by time_dp Desc) where rownum<10; Find the appropriate SCN number based on the user's time to delete data
Rman target/
startup Mount;
Restore database; Restoring a data file
Recover database until SCN 963915;
SQL ' ALTER DATABASE open resetlogs '; Regenerate redo log files
Restore an Oracle database to a point in time or to an SCN