標籤:
大家是否有這樣的煩惱,想將公司項目變成自己的項目資產庫。但是項目完全複製下來到自己機器上運行,發現無法訪問遠端資料庫的錯誤,為瞭解決這一困擾,作者嘗試了將遠端資料庫匯入到本機資料庫的操作,遇到了不小的麻煩,做下記錄。
匯入指令碼:
--資料表空間CREATE TABLESPACE ECDATAFILE ‘d:\tablespace\ec.dbf‘ size 3000M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; --2.建使用者create user jelly identified by tiger default tablespace EC; --3.賦權grant connect,resource to jelly;grant create any sequence to jelly;grant create any table to jelly;grant delete any table to jelly;grant insert any table to jelly;grant select any table to jelly;grant unlimited tablespace to jelly;grant execute any procedure to jelly;grant update any table to jelly;grant create any view to jelly;
--匯入方式: imp scott/tiger@orcl file=d:\ec.dmp fromuser=‘ecuser‘ touser=‘jelly‘ ignore=y
--刪除使用者及使用者物件drop user jelly cascade;
--刪除資料表空間DROP TABLESPACE EC INCLUDING CONTENTS AND DATAFILES;
http://blog.csdn.net/starnight_cbj/article/details/6792364
Oracle 匯出遠程庫dmp檔案-->匯入到本地oracle資料庫中,實現遠端資料庫的複製和移植.