Updated on 2024-06-03 GMT+08:00

IMPDP DATABASE CREATE

Function

IMPDP DATABASE CREATE specifies the preparation phase for importing a database.

Syntax

IMPDP DATABASE [db_name] CREATE SOURCE = 'directory' OWNER = user [LOCAL];

Parameter Description

  • db_name

    Name of the new database after the import. If this parameter is not specified, the original database name is retained after the import.

  • directory

    Data source directory of the imported database.

  • user

    Owner of the imported database.

  • LOCAL

    If this column is specified, data is imported to the original cluster. If this column is not specified, data is imported to a new cluster.

Examples

-- The IMPDP DATABASE CREATE syntax is used for fine-grained backup and restoration and is called by the backup and restoration tool. If you directly call the syntax, an error message may be displayed, indicating that the directory does not exist. Therefore, you are not advised to directly call the syntax.
gaussdb=# IMPDP DATABASE test CREATE SOURCE = '/data1/impdp/database' OWNER = admin;