First, create a table space
Create tablespace ATP
Logging
DataFile ' D:\oracle\oradata\orcl\atp.dbf '
Size 50m
Autoextend on
Next 50m maxsize 20480m
Extent management Local;
Second, create the user
--Create the user
Create User ATP
Default Tablespace ATP
Temporary tablespace TEMP
Profile DEFAULT
identified by ATP;
--Grant/revoke role privileges
Grant connect to ATP;
Grant DBA to ATP;
Grant resource to ATP;
--Grant/revoke System privileges
Grant create any view to ATP;
Grant Select any sequence to ATP;
Grant Select any table to ATP;
Grant unlimited tablespace to ATP;
Three, export
1, create a logical directory, the command does not create a real directory in the operating system, it is best to create with administrators such as system.
Create directory Expdp_dir as ' D:\home\Oracle\dump ';
2. Give the Scott user permission to operate on the specified directory, preferably given by an administrator such as system.
Grant Read,write on directory Expdp_dir to Scott;
3, create directory "D:\home\Oracle\dump"
4 in Windows, Export command
1) per User: EXPDP system/[email protected] directory= Expdp_dir dumpfile=0526netobdc.dmp logfile=0526netobdc.log SCHEMAS=NETOBDC
2) Export by table name: EXPDP system/[email Protected] Directory=expdp_dir dumpfile=0526netobdc.dmp logfile=0526netobdc.log tables=emp,dept
3) export entire database: EXPDP System/[email protected] Directory=expdp_dir dumpfile=0526netobdc.dmp logfile=0526netobdc.log FULL=y
Iv. Import
1. Create a logical directory that does not create a real directory in the operating system, preferably created by an administrator such as system.
Create directory Impdp_dir as ' D:\home\Oracle\impdp_dir ';
2. Give the Scott user permission to operate in the specified directory, preferably as a system administrator.
Grant Read,write on directory Impdp_dir to Scott;
3. Create the Directory "D:\home\Oracle\impdp_dir" in Windows and copy the exported DMP package to this directory
4. Import command
1) Import to the specified user: IMPDP bdc_atp/[email protected] Directory=impdp_dir dumpfile=0526atp.dmp logfile=0526atp.log schemas=bdc_ Atp
2) Import to different users: IMPDP bdc_atp/[email protected] Directory=impdp_dir dumpfile=0526atp.dmp logfile=0526atp.log REMAP_ Schema=atp:bdc_atp
3) Import the entire database: IMPDP bdc_atp/[email protected] Directory=impdp_dir dumpfile=0526atp.dmp logfile=0526atp.log FULL=y
Oracle Data Pump Export Import