Oracle資料庫匯出大字段 CLOB 資料

2021-08-25 20:50:50 字數 1668 閱讀 3203

匯出clob的幾個sql語句:

1.匯出含有大字段資料的m條記錄

expuser/passwd statistics=none compress=n consistent=y file=/oradata/info/backup/exp_article.dmp log=/oradata/info/backup/exp_article.log tables=fsm_right_article query=/"where rownum/<=10/"

2. 匯出指定記錄記錄

expuser/passwd statistics=none compress=n consistent=y file=/oradata/info/backup/exp_article.dmp log=/oradata/info/backup/exp_article.log tables=fsm_right_article query=/"where recordid=n/"

3。先將表按主鍵字段排序,然後取第1行到第2400行的記錄

exp user/passwd statistics=none compress=n file=/oradata/info/backup/article/article_$i.dmp log=/oradata/info/backup/article/article_$i.log consistent=y tables=fsm_right_article query=/"where articleid in /(select articleid from /(select rownum as r_n/, article/.articleid from /(select articleid from fsm_right_article order by articleid desc/) article where rownum /<= 2400/) where r_n /> 0/)/"

編寫乙個shell指令碼,迴圈執行匯出2400條記錄的命令,匯出表的全部記錄

vi /oradata/info/backup/scrips/exp_article.sh

#!/bin/bash

export nls_lang=american_america.zhs16gbk

export oracle_sid=info

count=220979

i=0step=2400

while [ $i -le $count ] do

exp user/passwd statistics=none compress=n file=/oradata/info/backup/article/article_$i.dmp log=/oradata/info/backup/article/article_$i.log consistent=y tables=fsm_right_article query=/"where articleid in /(select articleid from /(select rownum as r_n/, article/.articleid from /(select articleid from couser/.fsm_right_article order by articleid desc/) article where rownum /<= $i+$step/) where r_n /> $i/)/"

i=`expr $i + $step`

file=`expr $file + 1`

done

oracle匯出資料庫

登入sqlplus sqlplus as sysdba 建立使用者 create user ncc identified by 123456 使用者授權 grant connect,resource,dba to ncc 建立資料夾進行匯出 create directory oracledump a...

oracle 匯出資料庫

第一種方式 使用plsql匯出資料庫 1 開啟plsql,找到工具欄,匯出表 2 進入匯出主頁,選擇資料夾,輸入匯出檔名稱 點選儲存 33 點選匯出按鈕,即可彈出匯出資料概況 4如果中途無報錯想象,即可在你選定的路徑下找到該dmp檔案,備份操作完成 end1 點選開始按鈕,在執行中輸入cmd 回車 ...

oracle 抽取 對方大字段資料

在建設zyk中,經常遇到大字段的資料。1 建立和對方結構一致的臨時表 create global temporary table sjzyk clob temp id varchar2 10 clob 1 clob on commit delete rows 2 建設抽取方案 insert into...