In today’s article, we will be learning DataPump Commands.
1. İmport:
1 |
# impdp "'/ as sysdba'" directory=csv_dir dumpfile=import.dmp logfile=import.log parallel=2 |
2. Export:
1 |
# expdp "'/ as sysdba'" directory=dump_dir tables=users.session_data dumpfile=export.dmp logfile=export.log parallel=2 |
3. Dump file size estimation:
1 |
# expdp "'/ as sysdba'" estimate_only=y tables=users.session_data_record logfile=n |
4. Remap schema:
1 2 3 |
# expdp "'/ as sysdba'" directory=dump_dir tables=scott.session_data dumpfile=export.dmp logfile=export.log # impdp "'/ as sysdba'" directory=csv_dir dumpfile=export.dmp logfile=imp.log remap_schema=scott:emrah remap_tablespace=users:data_ts tables=scott.session_data_record |
5. Copy schema:
1 2 3 |
# expdp "'/ as sysdba'" directory=dump_dir schema=scott dumpfile=exp.dmp logfile=exp.log # impdp "'/ as sysdba'" directory=dump_dir remap_schema=scott:emrah dumpfile=exp.dmp logfile=imp.log |
6. Copy schema – metadata only:
1 2 3 |
# expdp "'/ as sysdba'" directory=dump_dir schema=scott dumpfile=exp.dmp logfile=exp.log # impdp "'/ as sysdba'" directory=dump_dir remap_schema=scott:emrah (content=metadata_only) dumpfile=exp.dmp logfile=imp.log |
7. First we create the parameter file (with Oracle User):
1 |
# vi export.par |
A- We fill in the parameter file:
1 2 3 4 5 6 |
directory=dump_dir dumpfile=exp.dmp logfile=exp.log tables=EMRAH.PERSONEL query=EMRAH.PERSONEL:"where id < 200" parallel=8 |
B- We start the export process;
1 |
# nohup expdp "'/ as sysdba'" parfile=export.par $ |