exp oracle 表空间,oracle之EXP导出表空间错误解决
導出表空間
第一 以DBA的權限登錄
第二 檢查表空間是否自我包容,檢查結果將被放到視圖transport_set_violations
SQL> execute dbms_tts.transport_set_check('USERS',TRUE);
第三 查詢視圖
SQL> select * from transport_set_violations;
no rows selected
如果查詢結果為0,說明表空間是自我包容的
第四 把要被導出的表空間設置成只讀
SQL> alter tablespace users read only;
第五 導出表空間(transport_tablespace=y 表示啟用表空間導出,但是無法導出數據,所以要想導出數據就不要添加該參數 constraints=y 表示導出約束)
C:\Documents and Settings\Administrator> exp 'sys/admin as sysdba'? tablespaces=users file=D:\Oracle\ffdata\newtabsp.dmp constraints=y
Export: Release 11.2.0.1.0 - Production on 星期三 2月 22 19:33:55 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates.? All rights reserved.
連接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已導出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
服務器使用 AL32UTF8 字符集 (可能的字符集轉換)
注: 將不導出表數據 (行)
即將導出可傳輸的表空間元數據...
對于表空間 USERS...
. 正在導出簇定義
. 正在導出表定義
. . 正在導出表??????????????????????????? DEPT
EXP-00091: 正在導出有問題的統計信息。
說明:當導出統計信息的時候,如果客戶端字符集和服務器端字符集不匹配,就會產生這種,解決辦法如下:
首先:查看服務器端字符集
SQL> select * from v$nls_parameters where parameter=
2? 'NLS_CHARACTERSET';
PARAMETER???????? VALUE
-------------???? ---------------------------------------
NLS_CHARACTERSET? AL32UTF8
其次:設置客戶端字符集,使之與服務器端字符集匹配EX
C:\Documents and Settings\Administrator>SET NLS_LANG=AMERICAN_AMERICA.AL32UTF8
再次進行導出
C:\Documents C:\Documents and Settings\Administrator> exp 'sys/admin as sysdba' transport_tab
lespace=y tablespaces=users file=D:\Oracle\ffdata\newtabsp.dmp constraints=y
Export: Release 11.2.0.1.0 - Production on Wed Feb 22 19:41:46 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates.? All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Produc
tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
Note: table data (rows) will not be exported
About to export transportable tablespace metadata...
For tablespace USERS ...
. exporting cluster definitions
. exporting table definitions
. . exporting table?????????????????????????? DEPT
. . exporting table??????????????????????????? EMP
. . exporting table?????????????????????? SALGRADE
. . exporting table????????????????? PURCHASEORDER
. . exporting table???????????????? CATEGORIES_TAB
. . exporting table?????????????????????? SID_INFO
. . exporting table?????????????????? QUALITY_INFO
. . exporting table???????????????????? CALL_DIREC
. . exporting table????????????????????? PARA_DATA
. . exporting table????????????????????? PARA_INFO
. . exporting table??????????????????? PARA_DETAIL
. . exporting table??????????????????? SIGNAL_INFO
. . exporting table??????????????????????? APP_VER
. . exporting table???????????????????? PHONE_DATA
. . exporting table?????????????????????? USERINFO
. . exporting table?????????????????????? ROLEINFO
. . exporting table???????????????????????? REGION
. . exporting table????????????????????? BASE_CELL
. . exporting table?????????????????????? COMP_SUG
. exporting referential integrity constraints
. exporting triggers
. end transportable tablespace metadata export
Export terminated successfully without warnings.
第六 恢復數據庫表空間可讀寫
SQL> alter tablespace users read write;
Tablespace altered.
總結
以上是生活随笔為你收集整理的exp oracle 表空间,oracle之EXP导出表空间错误解决的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 原创:华南师大火了!35岁的唐尚珺官宣已
- 下一篇: 五霸七雄职业选择攻略