Oracle方案的匯入與匯出

2021-05-24 15:43:02 字數 672 閱讀 5691

剛學習了oracle,對資料庫的匯入匯出。有點記不住。

1、連線oracle資料庫

sql> conn / as sysdba

已連線。

2、建立乙個操作目錄

sql> create directory dump_dir as 'e:/dump';

注意同時需要使用作業系統命令在硬碟上建立這個物理目錄。

目錄已建立。

3、使用以下命令建立乙個匯出檔案目錄

scott使用者操作dump_dir目錄的許可權,

sql>grant read,write on directory my_dir to scott;

4、匯出方案(在作業系統提示符下完成)

c:/>expdp scott/tiger directory=my_dir dumpfile=20090517scottschema.dmp  schemas=scott

5、匯入方案(在作業系統提示符下完成)

5.1 需要建立使用者(方案)

5.2 需要分配目錄訪問許可權

一般只能匯入自己的方案,如果想匯入其他方案,必須具有exp_full_database或者dba許可權。

匯入同上:

c:/>impdp scott/tiger directory=my_dir dumpfile=***x.dmp schemas=scott

oracle 的匯入與匯出

在專案實施過程中,總會少不了與資料庫打交道,這是個人總結 刪除表空間 drop tablespace pt6 including contents drop tablespace mpm including contents drop tablespace sf including contents...

oracle匯出與匯入指令碼

匯出指定使用者下的所有表 環境變數設定 export oracle sid bdyz export oracle base u01 oracle11g r2 export oracle home oracle base 11g export ld library path oracle home l...

Oracle資料的匯出與匯入

前序 關於oracle9i資料的匯出與匯入問題,折騰我好長時間了,尤其是匯入。今天在一位同事 zhangshukun 的指導下,算是終於成功了。正文 oracle資料匯出 如果是匯出本機的oracle資料庫 exp pcisv62 11 orcl file d pcisv62081226.dmp f...