Recompile Invalid Objects In The Database
2010-07-14 15:35
357 查看
很多时候由于数据库的变更或者迁移会造成数据库对象(Package,Trigger,Pprocedure等)失效。通过手工重编译可能因为对象之间的依存关系而失败。方法有很多比如使用pl/sql developer之类的,但是最好的方法就是使用oracle提供的脚本utlrp.sql脚本完成此项工作。此脚本放在$ORACLE_HOME/rdbms/admin/文件夹下,运行utlrp.sql的时候会调用脚本utlprp.sql。
使用这个脚本我们可以在任意时刻重编译数据库的失效对象,但是最好不要在数据库有活动事务及DDL操作的时候运行,因为容易造成死锁。Oracle强烈推荐在upgrade/downgrade/migration之后运行此脚本。作为一个好的习惯在进行了可能引起数据库对象失效的操作以后都可以运行以下utlrp.sql。
使用这个脚本我们可以在任意时刻重编译数据库的失效对象,但是最好不要在数据库有活动事务及DDL操作的时候运行,因为容易造成死锁。Oracle强烈推荐在upgrade/downgrade/migration之后运行此脚本。作为一个好的习惯在进行了可能引起数据库对象失效的操作以后都可以运行以下utlrp.sql。
相关文章推荐
- How to check invalid objects and broken job in multiple database
- When should you store serialized objects in the database?
- How to identify all the Corrupted Objects in the Database reported by RMAN
- How to identify all the Corrupted Objects in the Database reported with RMAN
- dnn Skin Objects(stored in the ModuleControls database table)
- How can a database be in-memory and durable at the same time?
- How to select the data type in SQLserver database such as varchar, nvarchar
- Create an Azure SQL database in the Azure portal
- db2 创建实例 The host name "fordatabase" is invalid. Specify a valid host name.
- 异常:Invalid character found in the request target. The valid characters are defined in RFC 3986
- Delete all tables in database(Ignore the relations between tables)
- 异常:Invalid character found in the request target. The valid characters are defined in RFC 3986
- Delete archivelog in the primary database
- Invalid character in the given encoding. Line XX, position XX.解决方法
- not an error (code 0): Could not open the database in read/write mode.的解决办法
- 87.You are managing an Oracle Database 11g database running in ARCHIVELOG mode. The Flash Recovery A
- MySql Query To List All The Tables In Perticular Database
- 解决:Invalid character found in the request target.The valid characters are defined in RFC 7230 and RF
- ORA-16714: the value of property ArchiveLagTarget is inconsistent with the database setting
- Sharepoint:The security validation for this page is invalid. Click Back in your Web browserSharepoin