Exporting an Oracle VDB or a vPDB in-place to a physical filesystem
Overview
This article describes how to perform an export or an in-place conversion of a virtual database (VDB) or a virtual pluggable database (vPDB) into a physical database stored on a physical filesystem. No intermediate storage is needed; the database files are moved directly from Delphix to the physical filesystem.
This procedure can be used to export an Oracle VDB or vPDB in a Linked CDB to a physical filesystem.
Furthermore, it is fully supported with TDE-enabled virtual databases provisioned through Delphix.
Limitation
On V2P, to perform export to filesystem, select a directory location which supports direct IO operations.
/tmp
as this directory doesn’t support direct IO on all OSs.If exporting to /tmp
is unavoidable, set the following initialization parameter:
ALTER SYSTEM SET FILESYSTEMIO_OPTIONS=ASYNCH SCOPE=SPFILE;
With asynchronous I/O, the OS itself performs I/O on behalf of Oracle software in a highly efficient and parallel manner. OS buffer cache is used for I/O instead of Oracle’s own buffer cache within the SGA.
This value, however, may not be what Oracle recommends for this parameter.
Prerequisites
-
The following conditions must be met prior to the export operation. Export will fail if any of these conditions are not met:
-
Sufficient storage space must be available in the target filesystem for datafiles.
-
While exporting a vPDB, if a new PDB name is specified:
-
it must meet all the naming constraints defined in the Oracle documentation.
-
it must be different from the existing PDBs in the target CDB.
-
- While exporting a VDB, if a new database unique name is specified:
it must meet all the naming constraints as defined in the Oracle documentation.
it must be different from the database unique name of any other database on the same target host.
it must not be a RAC database.
-
No offline datafiles or tablespaces must exist in the VDB or vPDB.
-
The VDB or vPDB on which the export is initiated must be Open.
-
Export of a VDB in a RAC environment must be performed as the Oracle user, otherwise the export will fail. This is required because Delphix issues srvctl commands to configure the resulting physical database in RAC and these commands can only be run with Oracle user privileges
-
No other job must be running on the virtual pluggable database or its associated environment.
-
When running export of a VDB or vPDB in a RAC environment, ensure that the states of all the cluster nodes are displayed as 'Enabled' in the Delphix management GUI. If one of the cluster nodes is disabled, the export operation will fail, although the physical copy has been completed and it is usable, however the VDB or vPDB will need to be force disabled manually.
-
The VDB or vPDB must have a provisionable snapshot, otherwise the operation will fail with the following message:
Cannot find a point in the TimeFlow for the semantic location "LATEST_POINT"
.
-
-
If you want to export a vPDB in a vCDB, the vPDB must be migrated to a Linked CDB and then enabled, or alternatively, provision a child vPDB from this vPDB snapshot to a linked CDB and then perform the export.
Procedure
-
Delphix takes a new snapshot of the virtual database/pluggable database before starting the export. Also, Delphix retains the timeflow and all its snapshots after the virtual source is exported. As such, after export, the virtual source can be easily migrated and rewinded to the previously created snapshots.
-
It is recommended that the export be performed on a newly provisioned VDB or vPDB, although it can still be performed on your existing VDB or vPDB. The reason is it simplifies post export process to re-enable the existing VDB or vPDB.
-
Refer to CLI cookbook: export a multitenant virtual pluggable Oracle database to ASM or Physical Filesystem or CLI cookbook: export a non-multitenant virtual Oracle database to ASM or Physical Filesystem for the procedure.
Considerations after successful export of a VDB or vPDB to a physical filesystem
After the export is successful, no Delphix operations are allowed on the VDB or vPDB except migration or a fresh provision of a new child VDB or vPDB. However, there may be situations where you may need to re-enable the VDB or vPDB, please perform a migration of the vPDB to a different host and CDB and then rewind the VDB or vPDB to its latest snapshot.
Option 1: After successfully performing export of a VDB to replace a linked physical database that is damaged and is unusable with new physical database having the same name, same unique name and same SID as the original damaged database, the new physical database can be linked back to Delphix engine using the following steps:
-
Delete or Migrate the VDB that was used to create a new physical database to a different environment.
-
Refresh the environment where the new physical database is created.
-
Detach the dSource from the original source database.
-
Force attach the dSource to the newly created physical database
Option 2: After successfully performing the export of a vPDB with the new physical PDB name that is the same as the vPDB name, the new physical PDB can be linked back to Delphix engine using the following steps:
-
Delete or migrate the vPDB to a different CDB.
-
Refresh the environment where the new physical PDB is created.
-
Detach the dSource PDB from the original source PDB.
-
Force attach the dSource to the newly created physical PDB.