Create Dump from Oracle schema in console in Linux

It is not easy to find the correct way to execute expdp command in console. There are some steps before you execute expdp command.

First you have to create a directory on the computer where Oracle DB is, where you will put the dump files than you have to grant a schema the rights to create a directory.

Execute this command in SQL Developer or in sqlplus:

grant create any directory to myschema;

Replace myschema with your schema name.

than when you are connected in the shema myschema create the directory:

CREATE DIRECTORY DB_DUMP as ‘/path/to/my-dump-directory’;

than open console on the computer with the Oracle DB and execute:

expdp “‘myshema /PASSWORD@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=hostname)(Port=portname))(CONNECT_DATA=(SID=SID_name)))’” DIRECTORY=DB_DUMP REUSE_DUMPFILES=YES DUMPFILE=dump-XX-XX-2022.dmp LOGFILE=dump.log schemas=myshema

You have to replace in command the myshema with your schema name, the password with the correct password, the hostname, portname, SID_name, DIRECTORY name if other, dumpfile name, logfile name.

I could not find in Google the correct syntax for expdp command and how to make Oracle dump.

Leave a comment