Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I want to migrate database from Linux to Windows. I restored controlfile and mounted the database. Now I run the following:

run{
allocate channel t1 device type disk;
set newname for datafile '/usr/lib/oracle/xe/oradata/XE/system.dbf' to 'C:\oraclexe\oradata\XE\system.dbf';
set newname for datafile '/usr/lib/oracle/xe/oradata/XE/undo.dbf' to 'C:\oraclexe\oradata\XE\undo.dbf';
set newname for datafile '/usr/lib/oracle/xe/oradata/XE/sysaux.dbf' to 'C:\oraclexe\oradata\XE\sysaux.dbf';
set newname for datafile '/usr/lib/oracle/xe/oradata/XE/users.dbf' to 'C:\oraclexe\oradata\XE\users.dbf';
restore database;
switch datafile all;
release channel t1;
}

and shows me the following error:

RMAN-06010: error while looking up datafile: C:\USR\LIB\ORACLE\XE\ORADATA\XE\SYSTEM.DBF

Why SET NEWNAME doesn't work?

Details:

OS: Windows 7 64bit

Database: Oracle 10g XE (univ)

---------------EDIT

I've run the following:

run{
allocate channel t1 device type disk;
SET NEWNAME FOR DATAFILE  1 to "C:\oraclexe\oradata\XE\system.dbf";
SET NEWNAME FOR DATAFILE  2 to "C:\oraclexe\oradata\XE\undo.dbf";
SET NEWNAME FOR DATAFILE  3 to "C:\oraclexe\oradata\XE\sysaux.dbf";
SET NEWNAME FOR DATAFILE  4 to "C:\oraclexe\oradata\XE\users.dbf";
restore database;
switch datafile all;
release channel t1;
}

AND IT WORKKKKKKSSSSS :@

Why oracle did not say if there were syntax errors :@

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.