首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >Oracle如何导出sys用户下的系统表

Oracle如何导出sys用户下的系统表

作者头像
Alfred Zhao
发布2019-05-24 20:21:54
发布2019-05-24 20:21:54
1.5K0
举报

环境:Solaris 10 + Oracle 10.2.0.4

  • 1.导出实例
  • 2.参考内容
  • Reference

1.导出实例

导出sys用户下的HIST_HEAD$WRI$_OPTSTAT_HISTHEAD_HISTORY两张表: 由于expdp尝试导出失败,改用传统exp导出,导出命令如下:

代码语言:javascript
复制
% 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可以正常导出,导出过程显示如下:

代码语言:javascript
复制
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.1

代码语言:javascript
复制
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/<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)
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2015-10-30 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1.导出实例
  • 2.参考内容
  • Reference
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档