expdp outputs the names and paths of these files in messages like these: Actual data is unloaded only for the administrative tablespaces ( SYSTEM and SYSAUX), so this operation goes relatively quickly even for large user-defined tablespaces.Ĭheck the log file for errors, and take note of the dump file and data files that you must transport to the target database. In this example, the Data Pump utility is used to export only data dictionary structural information (metadata) for the user-defined tablespaces. Therefore, when importing into a PDB, create a directory object in the PDB and specify the directory object when you run Data Pump. However, the directory object DATA_PUMP_DIR is not created automatically in a PDB. Read and write access to this directory is automatically granted to the DBA role, and thus to users SYS and SYSTEM. In a non-CDB, the directory object DATA_PUMP_DIR is created automatically. See Oracle Database SQL Language Reference for information on the CREATE DIRECTORY command. You must create the DIRECTORY object before invoking Data Pump, and you must grant the READ and WRITE object privileges on the directory to the user running the Export utility. The DIRECTORY parameter specifies the directory object that points to the operating system or Oracle Automatic Storage Management location of the dump file. The DUMPFILE parameter specifies the name of the structural information export dump file to be created, expdat.dmp. The FULL parameter specifies that the entire database is being exported. This example specifies the following Data Pump parameters: You must always specify TRANSPORTABLE=ALWAYS, which determines whether the transportable option is used. $ expdp user_name full=y dumpfile=expdat.dmp directory=data_pump_dir Invoke the Data Pump export utility as a user with DATAPUMP_EXP_FULL_DATABASE role and specify the full transportable export/import options. Make all of the user-defined tablespaces in the database read-only. Start SQL*Plus and connect to the database as an administrator or as a user who has either the ALTER TABLESPACE or MANAGE TABLESPACE system privilege. Generate the export dump file by completing the following steps: The name of the source database is mydb.īoth the source database and the target database are Oracle Database 18c databases.Ĭomplete the following tasks to transport the database using an export dump file: Task 1 Generate the Export Dump File The target database is a new database that is being populated with the data from the source database. This example makes the following additional assumptions: u01/app/oracle/oradata/mydb/sysaux01.dbf u01/app/oracle/oradata/mydb/system01.dbf Use the RMAN CONVERT command to convert the data files to the target platform's endian format. These procedures convert the data files to the target platform's endian format automatically. Use the GET_FILE or PUT_FILE procedure in the DBMS_FILE_TRANSFER package to transfer the data files. If the source platform's endian format is different from the target platform's endian format, then use one of the following methods to convert the data files: If the source platform and target platform are different, then check the endian format of each platform by running the query on the V$TRANSPORTABLE_PLATFORM view in " Transporting Data Across Platforms". Transport the data files for all of the user-defined tablespaces in the database.Ĭopy the data files to a place that is accessible to the target database. The export dump file includes the metadata for objects contained within the user-defined tablespaces and both the metadata and data for user-defined objects contained within the administrative tablespaces, such as SYSTEM and SYSAUX.Ĭopy the export dump file to a place that is accessible to the target database. If the source database contains any encrypted tablespaces or tablespaces containing tables with encrypted columns, then you must either specify ENCRYPTION_PWD_PROMPT=YES, or specify the ENCRYPTION_PASSWORD parameter. If the source database is an Oracle Database 11 g Release 2 (11.2.0.3) or later Oracle Database 11 g database, then you must set the VERSION parameter to 12 or higher. Details for each task are provided in the subsequent example.Īt the source database, place each of the user-defined tablespaces in read-only mode and export the database.Įnsure that the following parameters are set to the specified values: The following list of tasks summarizes the process of transporting a database using an export dump file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |