expdp username/password directory=backup dumpfile=expdp_datatable_20160308.dmp logfile=expdp_datatable_20160308.log version=10.2.0.0.1 schemas=test
語法解析
directory 預設的匯出資料庫的檔案存放位置
dumpfile 資料庫檔案
logfile 資料庫日誌檔案
version 匯出指定版本型別的資料庫
schemas 例項名(匯出例項名對應的資料庫)可以預設
username/password 資料庫的登入名和密碼
//1開啟database configuration assistant建立資料庫也可**建立//1,cmd 下sqlplus/nolog,在執行conn使用者名稱密碼進入執行環境
//2建立角色並授權
create role roletest;
grant connect,resource to roletest;
grant select any table to roletest;
grant update any table to roletest;
grant delete any table to roletest;
grant insert any table to roletest;
grant execute any procedure to roletest;
grant select any dictionary to roletest;
grant select any sequence to roletest;
grant create any directory to roletest;
grant create any view to roletest;
grant create any job to roletest;
grant debug connect session to roletest;
grant create database link to roletest;
//3建立表空間(必須)
//4建立使用者
create user acss identified by acss1234$ default tablespace dataname quota 0 on system;
//5給使用者授權
grant roletest,connect,resource to acss;
//6 建立文件目錄
create or replace directory backup as 'd:\oracle\backup';
//7 執行匯入(必須)在cmd下執行
//寫法一
impdp username/password directory=backup dumpfile=expdp_date_20151021.dmp logfile=expdp_date _20151021.log remap_schema=acss:acss
//寫法二
impdp username/password@acss directory=backup dumpfile=expdp_date_20160308.dmp logfile=date_cnosm_20160308.log
每個oracle資料庫都有許多合法使用者,這些使用者可以根據使用者名稱和口令登入資料庫,並使用sql語言訪問資料。
oracle中建立使用者需要授予對應的許可權才能進行相應的操作。
角色是定義好的乙個許可權的集合。
schema作為user的別名的依據。實際上在使用上,shcema與user完全一樣,沒有什麼區別,在出現schema名的地方也可以出現user名。
乙個使用者一般對應乙個schema,該使用者的schema名等於使用者名稱,並作為該使用者預設schema。
如果資料庫有此schema或使用者名稱需要刪除重建才能匯入,
Oracle 資料庫 匯入匯出
匯入匯出時要,通過 執行 進行到oracle的安裝目錄的 bin 目錄下導 例如 d oracle product 10.1.0 db 1 bin 匯出分三種 匯出 表 方案 資料庫 1.1.1 匯出自己的表 說明 使用者 密碼 資料庫例項 表名 可多個 檔案路徑 exp userid scott ...
oracle資料庫匯入匯出
用工具匯入 匯出 資料 工具 t 匯出表 x 工具 t 匯出表 x 所選執行檔案位置 e oracle product 10.2.0 db 1 bin imp.exe exp.exe 命令匯入匯出 oracle匯入dmp檔案命令 1 dmp檔案中的資料匯入資料庫 1.首先進入cmd命令視窗 2.執行...
Oracle資料庫匯入匯出
我們經常會在資料備份或環境移至的時候用到oracle的匯入匯出 下面我們來詳細看一下匯入匯出的步驟 1.命令列下匯出dmp檔案 資料匯出,可以帶版本 expdp bp oracle bp oracle orcl directory dump dir dumpfile bp oracle.dmp ve...