Oracle DMP備份檔案匯入(impdp)匯出(expdp)方法

來源:互聯網
上載者:User

標籤:druid   springmvc   mybatis   maven   bootstrap   

一  impdp 匯入 

     --刪除使用者若使用者已經存在(可以使用Oracle內建的sqlplus進行串連) 
SQL> drop user USER_NAME cascade 
SQL> / 
SQL> drop tablespace USER_TABLESPACE including contents and datafiles 
SQL> / 

     --建立資料表空間 下載
SQL> CREATE TABLESPACE USER_TABLESPACE DATAFILE ‘USER_tablespace.DBF‘ SIZE 200M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED PERMANENT DEFAULT STORAGE(INITIAL 64K MINEXTENTS 1 MAXEXTENTS 2147483645) MINIMUM EXTENT 64K LOGGING ONLINE 
SQL> / 

     --建立使用者 
SQL> CREATE USER USER_NAME IDENTIFIED BY user_password DEFAULT TABLESPACE USER_TABLESPACE TEMPORARY TABLESPACE TEMP PROFILE DEFAULT 
SQL> / 
     --建立使用者目錄 
SQL> CREATE DIRECTORY directory_name  as ‘filePath‘  
SQL> / 
      --樣本 my_dir as ‘D:/db_dir‘ 下載
     
     --為使用者授權 
SQL> GRANT CONNECT TO USER_NAME WITH ADMIN OPTION 
SQL> / 
SQL> GRANT DBA TO USER_NAME WITH ADMIN OPTION 
SQL> / 
SQL> GRANT UNLIMITED TABLESPACE TO USER_NAME WITH ADMIN OPTION 
SQL> / 
SQL> GRANT read, write ON DIRECTORY directory_name TO USER_NAME 
SQL> / 

     --執行匯入(退出sqlplus在CMD執行匯入語句) 
impdp USER_NAME/[email protected]_NAME directory=directory_name dumpfile=USER_NAME.DMP schemas=USER_NAME logfile=USER_NAME.log; 
pause; 

二 expdp 匯出 下載

expdp USER_NAME/[email protected]_NAME directory=directory_name dumpfile=USER_NAME.DMP schemas=USER_NAME logfile=USER_NAME.log; 
pause; 

Oracle DMP備份檔案匯入(impdp)匯出(expdp)方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.