2017-07-30 57 views
0

我無法從備份中恢復數據文件和重做日誌文件。 在RMAN我寫的,RMAN備份在具有數據文件和重做日誌文件的其他節點中恢復到不同的目錄

run{ 
set newname for datafile 1 to '/u02/data_redo/system01.dbf'; 
set newname for datafile 2 to '/u02/data_redo/sysaux01.dbf'; 
set newname for datafile 3 to '/u02/data_redo/undotbs01.dbf'; 
set newname for datafile 4 to '/u02/data_redo/users01.dbf'; 
set newname for datafile 5 to '/u02/data_redo/example01.dbf'; 
sql "alter database rename file '/u01/app/oracle/oradata/db01/redo01.log' to 
'/u02/data_redo/redo01.log'"; 
sql "alter database rename file '/u01/app/oracle/oradata/db01/redo02.log' to 
'/u02/data_redo/redo02.log'"; 
sql "alter database rename file '/u01/app/oracle/oradata/db01/redo03.log' to 
'/u02/data_redo/redo03.log'"; 
restore database; 
switch datafile all; 
recover database; 
} 

,但它說,

using target database control file instead of recovery catalog 
sql statement: alter database rename file 
'/u01/app/oracle/oradata/db01/redo01.log' to '/u02/data_redo/redo01.log' 
RMAN-00571: =========================================================== 
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== 
RMAN-00571: =========================================================== 
RMAN-03009: failure of sql command on default channel at 07/30/2017 16:18:19 
RMAN-10015: error compiling PL/SQL program 

我怎樣才能做到這一點?

回答

0

試試這個:

... 
restore database 
LOGFILE GROUP 1 ('/u/prog/oracle/oralog/MOBI6/redo01a.log') SIZE 100M, GROUP 2 ('/u/prog/oracle/oralog/MOBI6/redo02a.log') SIZE 100M; 
... 

或者你可以設置初始化參數

LOG_FILE_NAME_CONVERT=('/u02/','/disk2/') 
相關問題