Oracle如何導出sys用戶下的系統表


環境:Solaris 10 + Oracle 10.2.0.4

1.導出實例

導出sys用戶下的`HIST_HEAD$`和`WRI$_OPTSTAT_HISTHEAD_HISTORY`兩張表: 由於expdp嘗試導出失敗,改用傳統exp導出,導出命令如下: ``` % nohup exp system/****** file=/tmp/jy/system_exp_2tables.dmp log=/tmp/jy/exp_system_exp_2tables.log tables=sys.HIST_HEAD\$, sys.WRI\$_OPTSTAT_HISTHEAD_HISTORY & ``` 傳統exp可以正常導出,導出過程顯示如下: ``` Export: Release 10.2.0.4.0 - Production on 星期五 10月 30 13:49:51 2015

Copyright (c) 1982, 2007, Oracle. All rights reserved.

連接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已導出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集

即將導出指定的表通過常規路徑...
當前的用戶已更改為 SYS
. . 正在導出表 HIST_HEAD$導出了 169225445 行
. . 正在導出表 WRI$_OPTSTAT_HISTHEAD_HISTORY


<h1 id="2">  2.參考內容 </h1>
文檔 ID 553402.1

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.3 and later
Information in this document applies to any platform.
Checked for relevance on 29-Jan-2015

SYMPTOMS

DataPump export of table SYS.AUD$ fails with errors:

ORA-39165: Schema SYS was not found.
ORA-39166: Object AUD$ was not found.
ORA-31655: no data or metadata objects selected for job
Job "SYS"."SYS_EXPORT_TABLE_01" completed with 3 error(s) at 13:49:47

CAUSE

There is a restriction on dataPump export. It cannot export schemas like SYS, ORDSYS, EXFSYS, MDSYS, DMSYS, CTXSYS, ORDPLUGINS, LBACSYS, XDB, SI_INFORMTN_SCHEMA, DIP, DBSNMP and WMSYS in any mode. The Utilities Guide indicates the restriction only on full export mode, but the restriction actually applies to all modes.

SOLUTION

Export the table SYS.AUD$ using the traditional export:

> exp system/ file=dumpfile.dmp log=logfile.log tables=sys.aud$


<h1 id="3">  Reference </h1>
- DataPump Export (EXPDP) Fails With Error ORA-39165: Schema SYS Was Not Found (文檔 ID 553402.1)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM