1. The data pump can export tables, tablespaces, user schemas, and databases.
Note: To export tablespaces and databases, you must have the DBA role or the EXP_FULL_DATABASE role.
Grant connect, resource, exp_full_database, create any directory to sfcp;
2. Create a directory object
Create directory dump_dir as '/home/Oracle ';
3. Grant the actual path read/write operation permission to the user (generally no write operation is required)
Grant read, write on directory dump_dir to sfcp;
4. Export the table
Expdp sfcp/sfcp dumpfile = sfcp_table.dmp directory = dump_dir tables = ssdp_log, ssdp_area
5. Export tablespace
Expdp sfcp/sfcp dumpfile = sfcp_2_3_idx.dmp directory = dump_dir tablespaces = sfcp, sfcp2, sfcp3, sfcp_idx
Add the current date to the dump file name
Expdp sfcp/sfcp dumpfile = [$ Today] sfcp_2_3_idx.dmp directory = dump_dir tablespaces = users, example
Add the current date to the log file name
Expdp leo1/leo1 dumpfile = [$ Today] sfcp_2_3_idx.dmp logfile = [$ Today] expdp. log directory = dump_dir tablespaces = users, example
Environment variable setting export Today =day (date + % Y-% m-% d)
6. Export the user schema
Expdp sfcp/sfcp dumpfile = sfcp. dmp directory = dump_dir schemas = sfcp
7. Export the database
Expdp sfcp/sfcp dumpfile = base. dmp directory = dump_dir full = y
8. Export query Conditions
Expdp sfcp/sfcp dumpfile = sfcp_where.dmp directory = dump_dir tables = ssdp_log query = 'where iid = 100'
Note: The Today environment variables are used in different ways. After temporary reboot settings are enabled, note that
Export Today = $ (date + % Y-% m-% d)
Echo "$ Today"
Echo "$ Today" 123
2013-11-26123
Echo "$ Today-123"
2013-11-26-123
Echo "[$ Today] sfcp_2_3_idx.dmp"
[2013-11-26] sfcp_2_3_idx.dmp
Echo [$ Today] sfcp_2_3_idx.dmp
[2013-11-26] sfcp_2_3_idx.dmp
Touch "[$ Today] sfcp_2_3_idx.dmp"
[2013-11-26] sfcp_2_3_idx.dmp
GoldenGate performs two-way Oracle-Oracle replication without using a Data Pump
One-way Oracle-Oracle Replication Using the GoldenGate Data Pump
How to debug Oracle Data Pump (expdp/impdp)
Oracle Database Export data pump (EXPDP) file storage location
Export of Oracle 10g Data Pump Partition Table