exp bemis/bemis@bemis file=E:dbBakBEMIS.dmp owner=bemis log=E:dbBakemis.log
create directory dpdata1 as 'G:orclDB';
DROP DIRECTORY directory_name
expdp 登录名/密码@orcl schemas=用户 dumpfile=pxjd.dmp DIRECTORY=dpdata2目录名;
增加文件大小
alter database datafile 'E:donglzfxmisdbLZFXMIS.ORA' autoextend on next 100m maxsize 4000M;
Expdp zftang/zftang DIRECTORY=dir_dp DUMPFILE=schema.dmp SCHEMAS=zftang,gwm logfile=expdp_test.log
impdp LZFXMIS1/LZFXMIS1@orcl directory=dplzfxmis remap_schema=bemis:LZFXMIS1 REMAP_TABLESPACE=bemis:LZFXMIS_DB1 dumpfile=LZFXMIS_DB.DMP logfile=impdb_lzfxmis1.log
impdp bemis/bemis@bemis schemas=bemis dumpfile =IMPdp_test.dmp logfile=expdp_test.log directory=dir_dp job_name=my_job
impdp LZFXMIS/LZFXMIS DUMPFILE=LZFXMIS_1205.DMP LOGFILE=LZFXMIS_1205.LOG DIRECTORY=LZFXMIS_DIR JOB_NAME=LZFXMIS_dir REMAP_TABLESPACE=LZFXMIS_DB1:LZFXMIS_TABLESPACE REMAP_SCHEMA=LZFXMIS1:LZFXMIS
select username,default_tablespace from user_users;--查看当前用户表空间
select file_name , tablespace_name from dba_data_files;--查看表空间位置
查看目录Directory位置
select * from dba_directories;
创建目录
CONNECT system/manager
CREATE OR REPLACE DIRECTORY my_dir as 'D:DataPump';
CREATE OR REPLACE DIRECTORY my_logdir as 'E:logs';
GRANT read, write ON DIRECTORY my_dir TO scott;
GRANT read, write ON DIRECTORY my_logdir TO scott;
cmd
exp bemis/bemis@orcl file=E:BEMIS_DBemis.dmp owner=bemis log=E:BEMIS_DBexp.log
----创建表空间
CREATE TABLESPACE BEMIS
LOGGING
DATAFILE 'D:BEMISDBBEMISDB.ora' SIZE 100M
EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
--删除用户
drop user BEMIS cascade;
---创建用户
CREATE USER bemis PROFILE DEFAULT
IDENTIFIED BY bemis DEFAULT TABLESPACE bemis
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED
ON bemis
ACCOUNT UNLOCK;
GRANT CONNECT TO bemis;
GRANT DBA TO bemis;
---导入数据CMD
imp bemis/bemis@orcl file=d:emis.dmp full=y
alter system set wallet open identified by "LZFX";
alter database open;
--导入导出单个表
exp user/pw tables=(tbname) file=xxx.dmp
imp username/password@本地net服务名 file=xxx.dmp fromuser=xx touser=xx tables=(tablename)