Oracle如何导出sys用户下的系统表
2015-10-30 17:49 AlfredZhao 阅读(4352) 评论(1) 编辑 收藏 举报环境: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
2.参考内容
文档 ID 553402.1APPLIES 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/<password> file=dumpfile.dmp log=logfile.log tables=sys.aud$
Reference
- DataPump Export (EXPDP) Fails With Error ORA-39165: Schema SYS Was Not Found (文档 ID 553402.1)
AlfredZhao©版权所有「从Oracle起航,领略精彩的IT技术。」
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何调试 malloc 的底层源码
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端