Oracle 匯出表結構

2021-05-23 00:05:04 字數 666 閱讀 3935

分析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:/資料庫備份.bat;

select 'exp username/ffffff@yourdb //使用者名稱/密碼/資料庫名字

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:/資料庫備份.bat 檔案,編輯該批處理檔案,將第一行和最後一行刪掉,儲存後執行該批處理檔案就可全部匯出該使用者下的所有表。

oracle 匯出表結構

匯出資料庫表結構 不包括資料 since 2011 8 8 author lxc 今天boss讓我把資料庫裡的資料全部刪了,然後把資料庫部署到伺服器上,而我的做法就是傻傻的把資料庫中的記錄給刪了,然後把資料庫匯出,再部署到伺服器上。有個同事提醒我,說可以只匯出資料庫的表結構,而不要資料。哈哈,沒想到...

oracle 表結構匯出

場景 做oracle 資料庫遷移,需將資料庫表結構匯出來 解決方法一 plsql怎樣匯出oracle表結構 tools export user objects是匯出表結構 tools export tables 是匯出表結構還有資料 解決方法二 exp 命令 exp test test sid fi...

oracle語句匯出表結構

在plsql中直接執行 select t.table name,t.column name,t.data type t.data length t1.comments from user tab cols t,user col comments t1 where t.table name t1.ta...