Updated on 2025-10-23 GMT+08:00

EXPDP PLUGGABLE DATABASE

Description

Exports all physical files from a PDB.

The EXPDP PLUGGABLE DATABASE syntax is called by the backup and restoration tool for fine-grained data backup and restoration. You are advised not to directly call this SQL syntax, as doing so may trigger errors like "directory not found."

Syntax

EXPDP PLUGGABLE DATABASE LOCATION = 'directory';

Parameters

directory

Specifies a directory for storing the exported files.

Example

  • Prerequisites

    A PDB has been created and opened. For details, refer to the examples provided in "SQL Reference > SQL Syntax > C > CREATE PLUGGABLE DATABASE" in Developer Guide.

  • Export files from the PDB.
    -- Create an export directory.
    mkdir /data1/expdp/my_pdb
    
    -- Connect to the PDB and export its files.
    gaussdb=# \c my_pdb;
    my_pdb=# EXPDP PLUGGABLE DATABASE LOCATION = '/data1/expdp/my_pdb';