DataPump:
If you need to export the dump using sys account, then the following is the command:
$ expdp 'userid="/ as sysdba"' full=y directory=dpump_dir dumpfile=datapump.dmp
where the directory is an oracle virtual directory pointing to the physical file location.
Directory needs to be created first using the below command using sysdba account:
$ create directory dpump_dir as '/u01/oracle10g/datapump/export/';
After creating the directory, necessary access needs to be given, if the import/export is going to be done using a different account:
$ grant read,write on directory dpump_dir to appuser;
Datapump export/import using different versions:
If the datapump needs to be exported from say Oracle 11g version to Oracle 10g version, then the version parameter can be used to do the data export.
i.e. In oracle 11g database, the following command can be used to export the dump:
$ expdp 'userid="/ as sysdba"' full=y directory=dpump_dir dumpfile=datapump.dmp version=10.2
In oracle 10g database, the import can be done without any errors:
$ impdp 'userid="/ as sysdba"' full=y directory=dpump_dir dumpfile=datapump.dmp
If you need to export the dump using sys account, then the following is the command:
$ expdp 'userid="/ as sysdba"' full=y directory=dpump_dir dumpfile=datapump.dmp
where the directory is an oracle virtual directory pointing to the physical file location.
Directory needs to be created first using the below command using sysdba account:
$ create directory dpump_dir as '/u01/oracle10g/datapump/export/';
After creating the directory, necessary access needs to be given, if the import/export is going to be done using a different account:
$ grant read,write on directory dpump_dir to appuser;
Datapump export/import using different versions:
If the datapump needs to be exported from say Oracle 11g version to Oracle 10g version, then the version parameter can be used to do the data export.
i.e. In oracle 11g database, the following command can be used to export the dump:
$ expdp 'userid="/ as sysdba"' full=y directory=dpump_dir dumpfile=datapump.dmp version=10.2
In oracle 10g database, the import can be done without any errors:
$ impdp 'userid="/ as sysdba"' full=y directory=dpump_dir dumpfile=datapump.dmp