V2p oracle with file mapping

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hi,

I tried to do a v2p for one of my oracle vdbs, bug got an unexpected result.

Assume the following :

Dsource datafile location : /u01/oradata
Vdb datafile location : /mnt/provision/u01/oradata

I hope to convert the vdb to a physical and put my datafile sur under "/u02/oradata".

When definig the rule mapping the secreen gives as final result "/u01/oradata/u02/oradata" for the physical datafiles location.

In my point of view file mapping should replace the "/u01/oradata" with "/u02/oradata" for the physical database to get datafiles relocate to the specified location.

Any idea please.

Regards,

Mouhssine
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,632 Points 4k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Leighton Nelson

Leighton Nelson, Employee

  • 270 Points 250 badge 2x thumb
Hi,
There are a few considerations when customizing your datafile location on your target. The first is the location of your mount base path under which all datafiles are mounted. The second is the location of your data directory.
In order for your file to be placed under /u02/oradata you first need to change your data directory from the default "data" to blank. i.e. files will be placed directly under the mount base path. Next you should customize your file mapping so that your source /u01/oradata is replaced by blank. The result should list your datafile e.g. /system.dbf. Note: this is not the absolute path, but a path under the mount path.

Here's an example.

Source files on VDB.
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/mnt/provision/qadb/datafile/u01/app/oracle/oradata/orcl/system01.dbf
/mnt/provision/qadb/datafile/u01/app/oracle/oradata/orcl/sysaux01.dbf
/mnt/provision/qadb/datafile/u01/app/oracle/oradata/orcl/undotbs01.dbf
/mnt/provision/qadb/datafile/u01/app/oracle/oradata/orcl/users01.dbf
V2P with file customization




V2P datafiles
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u02/app/oradata/system01.dbf
/u02/app/oradata/sysaux01.dbf
/u02/app/oradata/undotbs01.dbf
/u02/app/oradata/users01.dbf 
See the documentation for details.

Regards,
Leighton
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,632 Points 4k badge 2x thumb
Hi Leighton,

I checked out with my end customer and found that he hase a specefique nomenclature.

Eg :

location for system files : /u02/oradata/sys
location for undo files : /u02/oradata/undo
location for temp files : /u02/oradata/tmp
location for app files : /u02/oradata/apps
location for index files : /u02/oradata/idx

Let me know if i understood the documentation to get this result :

I have to set as target directory "/u02/oradata" and do file mapping by specifying each file with the eaxh subdirectory (sys, undo, tmp, apps and idx).

I'm i right.

Regards,

Mouhssine
Photo of Leighton Nelson

Leighton Nelson, Employee

  • 270 Points 250 badge 2x thumb
That's correct. You will need to map each datafile so that they point to a different directory to match the desired target nomenclature.

Regards,
Leighton
Photo of Mouhssine SAIDI

Mouhssine SAIDI

  • 4,632 Points 4k badge 2x thumb
Great