国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

按照順序或依賴關系重新編譯失效的對象

2024-07-21 02:43:33
字體:
來源:轉載
供稿:網友
許多情況下,由于數據庫的變更或遷移,會導致數據庫中的對象失效。由于對象之間可能存在復雜的倚賴關系,所以手工編譯通常無法順利通過。 本文將詳細將詳細介紹Oracle提供的一個用于按照順序/依賴關系重新編譯失效對象的腳本。

腳本:

$ORACLE_HOME/rdbms/admin/utlrp.sql

其中會調用:

$ORACLE_HOME/rdbms/admin/utlrcmp.sql

在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的具體操作方式了。


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 沈阳市| 灵山县| 高台县| 绍兴市| 巩义市| 凭祥市| 曲周县| 鹿邑县| 双鸭山市| 加查县| 黄龙县| 博客| 华安县| 略阳县| 郯城县| 比如县| 辽源市| 扎赉特旗| 安义县| 新绛县| 土默特右旗| 阿合奇县| 太仓市| 丁青县| 锦屏县| 双流县| 二手房| 上林县| 乡城县| 张家口市| 仙游县| 广河县| 华蓥市| 陕西省| 泾川县| 虎林市| 迭部县| 同德县| 张家港市| 措美县| 从化市|