oracle重新编译package,如何有效的编译数据库中的失效对象(Package,trigger等)

在utlrp.sql脚本中,Oracle注释到:

Rem utlrp.sql - UTiLity script Recompile invalid Pl/sql modules

Rem

Rem DESCRIPTION

Rem This is a fairly general script that can be used at any time to

Rem recompile all existing invalid PL/SQL modules in a database.

Rem

Rem If run as one of the last steps during migration/upgrade/downgrade

Rem (see the README notes for your current release and the Oracle

Rem Migration book), this script will validate all PL/SQL modules

Rem (procedures, functions, packages, triggers, types, views, libraries)

Rem during the migration step itself.

Rem

Rem Although invalid PL/SQL modules get automatically recompiled on use,

Rem it is useful to run this script ahead of time (e.g. as one of the last

Rem steps in your migration), since this will either eliminate or

Rem minimize subsequent latencies caused due to on-demand automatic

Rem recompilation at runtime.

Rem

Rem Oracle highly recommends running this script towards the end of

Rem of any migration/upgrade/downgrade.

这是一个通用脚本,可以在任意时候运行以重新编译数据库失效对象。

通常我们会在Oracle的升级指导中看到这个脚本,Oracle强烈推荐在migration/upgrade/downgrade之后,通过运行此脚本编译失效对象。

但是注意,Oracle提醒,此脚本需要用SQLPLUS以SYSDBA身份运行,并且当时数据库中最好不要有活动事物或DDL操作,否则极容易导致死锁的出现(这是很容易理解的)。

如果仔细阅读一下utlrcmp.sql脚本,大家就会知道Oracle的操作方式。

列在这里,作为一个提示,供参考。

历史上的今天...

>>

2010-01-26文章:

2007-01-26文章:

2006-01-26文章:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值