SQL Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21st 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
rman> Recover database until Time ' 2012-02-29:21:30:00 '; Starting Recover at -- Geneva- in: A: -: - usingTarget Database Controlfileinstead ofRecoveryCatalog Allocated Channel:ora_disk_1 Channel Ora_disk_1:sid=159Devtype=disk rman-00571: =========================================================== rman-00569: =============== ERROR MESSAGE, STACK follows =============== rman-00571: =========================================================== rman-03002: Failure ofRecover Command at Geneva/ in/ - A: -: the ora-01861: Literal does not Match formatstring
Workaround: Oracle's date format default setting is Dd-mon-yy, and many times we need to modify this format to meet our needs. You can change the date format by setting Nls_date_format, and in order to make this change permanent, here are a few ways: 1, modify the Glogin.sql file, the path of this file: Under Windows,%oracle_home%\sqlplus\admin Under UNIX, $ORACLE _home/sqlplus/Admin Add: Alter in the fileSession Setnls_date_format=' Yyyy-mm-dd hh24:mi:ss '; 2. Modify the registry (under Windows platform) Start = "Run =" regedit= "hkey_local_machine=" software= "oracle=" HOME0 = "new string value Nls_date_format, and set its value to: Yyyy-mm-dd:hh24:mi: Ss If it is windows: SetNls_lang=american_america. We8iso8859p1 SetNls_date_format=yyyy_mm_dd:hh24:mi:ss 3. Modify the user environment variable configuration file (under UNIX platform), plus Export Nls_lang=american Export nls_date_format=' Yyyy-mm-dd HH24:MI:SS ' Sometimes only the Nls_date_format is set and the Nls_lang may not change (refer to the Rollingpig article), which may be related to the platform and shell type. Setting Nls_date_format and Nls_lang in Rman sessions Run { ...... SQL ' alter session set nls_date_format= ' Yyyy-mm-dd HH24:MI:SS '; SQL ' alter session set nls_language= ' AMERICAN '; ...... } |
Rman does not fully recover the time settings of the database at a point in time