oracle11g-expdp-impdp步骤
生活随笔
收集整理的這篇文章主要介紹了
oracle11g-expdp-impdp步骤
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
=========================DMP導出======================
首先建立directory -- expdir(導入導出都要建立,對應的E:/exp文件夾如果不存在,需要手工建立)
SQL>connect zcuser/123456 as sysdba
SQL>create or replace directory expdir as 'D:/SeeyonBackup/DATA';
SQL>grant read,write on directory expdir to public;
SQL>select *From dba_directories;
CMD執行導出命令
expdp zcuser/123456@orcl schemas=zcuser dumpfile=bak20141217.dmp directory=expdir logfile=bak20141217.log
=========================DMP導入======================
----------【DBA用戶登入 start】-------
sqlplus system/123@orcl as sysdba?
創建用戶:
create user tongji identified by 123456;?
grant dba to tongji;
建立表空間:
create tablespace TONGJISPACE datafile 'F:\oracle\product\10.2.0\oradata\orcl\TONGJISPACE_shdfcm.dbf' size 1M?
autoextend on next 5M maxsize unlimited logging extent management?
local autoallocate
修改默認表空間:
alter user zcuser default tablespace SMGSPACE;
創建dpdata邏輯目錄:
create directory dpdata_shdfcm as 'D:\seeyon\install\DB\oracle11gR2\dpdata_shdfcm\';
授權邏輯目錄:
grant read, write on directory dpdata_shdfcm to zcuser;
----------【DBA用戶登入 end】-------
導入:(在DOS下面進行,后面不要加‘;’號,不然會報“未找到方案 zcuser;”錯誤)
1、將FUXV520131129.dmp放入邏輯目錄dpdata_shdfcm
2、CMD控制臺:
//impdp zcuser/123456 DIRECTORY=dpdata_shdfcm DUMPFILE=BAK20141217.DMP SCHEMAS=zcuser
impdp \"tianan/123456@orcl as sysdba\" DIRECTORY=impdp_dir DUMPFILE=20150525.DMP remap_tablespace=OASPACE:tiananspace ?remap_schema=V350SP1G:tianan
--------刪除用戶及表空間,然后手動去oracle目錄刪除相應DBF文件
drop user zcuser cascade;
drop tablespace zcspace including contents and datafiles
--------刪除邏輯目錄 ? ??
drop directory dpdata_shdfcm;
總結
以上是生活随笔為你收集整理的oracle11g-expdp-impdp步骤的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [SAP ABAP开发技术总结]动态语句
- 下一篇: 定义国际贸易术语(Incoterms)