轉 windows 下 Oracle 匯出表結構

來源:互聯網
上載者:User

標籤:

分析Oracle下匯出某使用者所有表的方法 可能很多使用Oracle的客戶都會遇到想把某使用者所有表匯出的情況,本文就提供這樣一個方法幫你輕鬆解決這個問題。
  首先在sqlplus下以該使用者登入到Oracle資料庫,然後將以下內容粘貼到sqlplus中:
    set feedback off;     set pagesize 0;     set heading off;     set verify off;     set linesize 200;     set trimspool on;


    spool c:/Database Backup.bat;


    select ‘exp username/[email protected] //使用者名稱/密碼/資料庫名字     TABLES=‘||table_name||‘ FILE=‘||table_name||‘.dmp      TRIGGERS=N‘ from user_tables;


    spool off;
    set feedback on;     set pagesize 9999;     set heading on;     set verify on;
    exit


  完成後在找到 c:/Database Backup.bat 檔案,編輯該批次檔,將第一行和最後一行刪掉,儲存後運行該批次檔就可全部匯出該使用者下的所有表。

轉 windows 下 Oracle 匯出表結構

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.