2 Replies Latest reply: Feb 19, 2013 12:31 AM by 991489 RSS

    DB_FILE_NAME_CONVERT

    991489
      Correct me if I am wrong.

      1)During RMAN cloning, the directory structures are taken care by db_file_name_convert and log_file_name_covert parameters.

      For example;

      SQL>select name from v$datafile;

      /u01/oradata/target/prod11/system01.dbf
      /u01/oradata/target/prod11/sysaux01.dbf
      /u01/oradata/target/prod11/users01.dbf
      /u02/oradata/target/prod11/users02.dbf
      /u03/oradata/target/prod11/users03.dbf

      While cloning(remote host) the database, I would like to change the directory structure as below:

      /u01/oradata/auxiliary/prodaux

      To achieve this we can use DB_FILE_NAME_CONVERT parameter as below:

      DB_FILE_NAME_CONVERT=(‘/u01/oradata/target/prod11’,’ /u01/oradata/auxiliary/prodaux’)

      Am I correct?

      2) DB_FILE_NAME_CONVERT cannot be used to control generation of new names.

      For example;

      DB_FILE_NAME_CONVERT=(‘/u01/oradata/target/prod11’/ system01.dbf,’ /u01/oradata/auxiliary/prodaux/ systemclone.dbf’)

      To achieve this we have to use SET NEW NAME command as below:

      SET NEWNAME FOR DATAFILE 1 TO ‘/u01/oradata/auxiliary/prodaux/ systemclone.dbf’;

      Am I correct?

      With regards
        • 1. Re: DB_FILE_NAME_CONVERT
          Shivananda Rao
          Hello,
          To achieve this we can use DB_FILE_NAME_CONVERT parameter as below:

          DB_FILE_NAME_CONVERT=(‘/u01/oradata/target/prod11’,’ /u01/oradata/auxiliary/prodaux’)

          Am I correct?
          Yes, you are right. Refer this http://docs.oracle.com/cd/B19306_01/server.102/b14237/initparams048.htm

          2) DB_FILE_NAME_CONVERT cannot be used to control generation of new names.

          For example;
          DB_FILE_NAME_CONVERT=(‘/u01/oradata/target/prod11’/ system01.dbf,’ /u01/oradata/auxiliary/prodaux/ systemclone.dbf’)
          >
          To achieve this we have to use SET NEW NAME command as below:

          SET NEWNAME FOR DATAFILE 1 TO ‘/u01/oradata/auxiliary/prodaux/ systemclone.dbf’;

          Am I correct?
          If you want to have the same datafile name as that present in the primary/production database, then no need to use the "set newname " clause.
          If you have to rename, then you have to use the "SET NEWNAME" option. Once you are using the "SET NEWNAME" option, then it is not required to set the "DB_FILE_NAME_CONVERT" option as you can specify the full path of the required datafile in the SET NEWNAME option itself.
          Refer this http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmdupad.htm


          Regards,
          Shivananda
          • 2. Re: DB_FILE_NAME_CONVERT
            991489
            Thanks