暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

重建DBMS_STATS包

原创 黄宸宁 2014-03-26
855
今天遇到客户说dbms_stats包不能使用,查看了下相关文档How To Reload the SYS.DBMS_STATS Package (文档 ID 1310365.1),记录下
In this Document
Goal
Solution
APPLIES TO:
Oracle Database - Enterprise Edition - Version 9.2.0.1 to 11.2.0.4 [Release 9.2 to 11.2]
Information in this document applies to any platform.
GOAL
How to reload the SYS.DBMS_STATS package into the database ?
SOLUTION
Recreate the SYS.DBMS_STATS package by running the following scripts.
SQL> connect / as sysdba
Drop the SYS.DBMS_STATS package:
SQL> drop package DBMS_STATS;
Recreate the SYS.DBMS_STATS package:
1) Release 9.2, 10.1 and 10.2:
SQL> @?/rdbms/admin/dbmsstat.sql
SQL> @?/rdbms/admin/prvtstas.plb
SQL> @?/rdbms/admin/prvtstat.plb
2) Release 11.1 and 11.2:
SQL> @?/rdbms/admin/dbmsstat.sql
SQL> @?/rdbms/admin/prvtstas.plb
SQL> @?/rdbms/admin/prvtstai.plb
SQL> @?/rdbms/admin/prvtstat.plb
Remark: We recommend running these scripts during maintenance window while database in restricted mode
to avoid problems that can be caused when other sessions access the same objects.

 
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论