If you are not comfortable with Oracle datapump (expdp) introduced with Oracle 10G, here is a quick memo on how to export a database.
Si vous n’avez pas encore l’habitude d’utiliser datapump (introduit avec la version 10G d’Oracle), voici un rapide mémo sur comment exporter votre base de données.
1st thing, you have to create a new oracle directory (if needed) for data pump. With the old “exp” command, you only had to put the full path of you file “FILE=/BASES/export/export.dmp”.
With expdp the directory path has to be an Oracle directory.
Première chose, il faut créer un répertoire oracle (si besoin). Avec l’ancienne commande « exp », il fallait seulement mettre le nom du répertoire et le nom du fichier ”FILE=/BASES/export/export.dmp”.
Avec expdp le répertoire doit être un répertoire Oracle.
To list all current directories, zet your oracle environment and with sqlplus :
Pour lister les répertoires Oracle, positionnez votre environnement oracle et dans sqlplus :
SQL> select * from dba_directories; OWNER DIRECTORY_NAME DIRECTORY_PATH ------------------------ ------------------------------ -------------------------------------------------------------------------------- SYS DATA_PUMP_DIR /app/oracle/product/10.2/rdbms/log/
To set the new directory:
Pour créer le nouveau répertoire :
SQL> CREATE DIRECTORY DATAPUMP AS '/BASES/export/';
After that you can run your expdp. DIRECTORY is the name referring to the DIRECTORY_PATH set above and DUMPFILE the name of the export file:
Vous pouvez ensuite lancer expdp. DIRECTORY est le nom du répertoire Oracle DIRECTORY_PATH qu’on a créé ci-dessus et DUMPFILE est le nom du fichier d’export :
# expdp system/passwd FULL=y DIRECTORY=DATAPUMP DUMPFILE=export.dmp LOGFILE=export.log