Script to compile invalid objects in DB
REM: Script to compile invalid objects in DB after refreshing
REM:
REM:*****************************************
REM:
REM: NOTE: PLEASE TEST THIS SCRIPT BEFORE USE.
REM: Author will not be responsible for any damage that may be cause by this script.
REM:***************************************** set pagesize 0
set feedback off
set trimspool on
prompt
prompt Run the script as sysdba otherwise invalid objects will remain (ORA-01031 error)
prompt
prompt Run the script several times. It only takes long the first time
prompt
prompt check the progress of compilation by issueing from another session
prompt select count(*) "invalid" from dba_objects where status <> 'VALID';
prompt
prompt hit <enter> to continue
pause
spool compile.lis
select 'alter '||object_type||' '||owner||'.\"'||object_name||'\" compile;'
from dba_objects
where status<>'VALID'
and object_type not in ('PACKAGE BODY','TYPE BODY','UNDEFINED','JAVA CLASS','SYNONYM')
union
select 'alter package '||owner||'.'||object_name||' compile body;'
from dba_objects
where status<>'VALID'
and object_type='PACKAGE BODY'
union
select 'alter type '||owner||'.'||object_name||' compile body;'
from dba_objects
where status<>'VALID'
and object_type='TYPE BODY'
union
select 'alter materialized view '||owner||'.'||object_name||' compile;'
from dba_objects
where status<>'VALID'
and object_type='UNDEFINED'
union
select 'alter java class '||owner||'.\"'||object_name||'\" resolve;'
from dba_objects
where status<>'VALID'
and object_type='JAVA CLASS'
union
select 'alter synonym '||owner||'.'||object_name||' compile;'
from dba_objects
where status<>'VALID'
and object_type='SYNONYM'
and owner<>'PUBLIC'
union
select 'alter public synonym '||object_name||' compile;'
from dba_objects
where status<>'VALID'
and object_type='SYNONYM'
and owner='PUBLIC';
spool off
set feedback on
Script to compile invalid objects in DB的更多相关文章
- oracle重新编译所有invalid objects
点第一个,按住shift键点最后一个,右键recompile就OK了
- Toad for Oracle 使用文档
Toad®for Oracle 版本 12.0.1 发行说明 30 July 2013 目录 欢迎使用 Toad for Oracle 版本更新 解决的问题和改进 已知问题 第三方已知问题 升级和兼容 ...
- EBS开发技术之Patch安装
Contents Document Control........................................................................ ...
- FNDCPASS Troubleshooting Guide For Login and Changing Applications Passwords
In this Document Goal Solution 1. Error Starting Application Services After Changing APPS Pass ...
- Oracle E-Business Suite Maintenance Guide Release 12.2(Patching Utilities)
更多内容参考: http://docs.oracle.com/cd/E51111_01/current/acrobat/122ebsmt.zip Oracle Patch Application As ...
- adpatch options=hotpatch
--no need to shutdown application and no need to enable maintenance mode adpatch options=hotpatch fi ...
- 使用数据泵(expdp、impdp)迁移数据库流程
转载原文地址为:http://blog.itpub.net/26736162/viewspace-2652256/ 使用数据泵迁移数据库流程 How To Move Or Copy A Databas ...
- SQL总结之导入导出
(5)还原数据库[倒库] [数据泵模式]先要在D盘创建个目录,如D:/dbback 然后去plsql中创建目录sql命令:create directory dbback as 'D:\dbback'; ...
- 【12c】扩展数据类型(Extended Data Types)-- MAX_STRING_SIZE
[12c]扩展数据类型(Extended Data Types)-- MAX_STRING_SIZE 在12c中,与早期版本相比,诸如VARCHAR2, NAVARCHAR2以及 RAW这些数据类型的 ...
随机推荐
- NSURLConnection同步与异步请求 问题
NSURLConnection目前有两个异步请求方法,异步请求中其中一个是代理.一个同步方法.有前辈已经详细介绍,见:http://blog.csdn.net/xyz_lmn/article/deta ...
- linux power button
最近需要使用到power button按键,linux中有gpio keys的机制,只要注册即可. device注册 arch/arm/mach-mx6/board-mx6q_sabresd.c #d ...
- @SuppressWarnings
http://www.cnblogs.com/fsjohnhuang/p/4040785.html 一.前言 编码时我们总会发现如下变量未被使用的警告提示: 上述代码编译通过且可以运行,但每行前面的“ ...
- asm/aam links
http://personalpages.manchester.ac.uk/staff/timothy.f.cootes/asm_links.html
- vsUnit单元测试
在自定义的方法名上[右键]然后选择[创建单元测试],之后在项目中就添加了一个单元测试的项目,找到对应的单元测试的方法[TestMethod()]特性修饰,将单元测试的方法中最后一句:Assert.In ...
- Android Service学习之AIDL, Parcelable和远程服务
AIDL的作用 由于每个应用程序都运行在自己的进程空间,并且可以从应用程序UI运行另一个服务进程,而且经常会在不同的进程间传递对象.在Android平台,一个进程通常不能访问另一个进程的内存空 ...
- 海康威视摄像头SDK-网页版(NetVideoActiveX23.cab安装)
1.了解了OCX控件的使用.代码如下: <object classid="CLSID:CAFCF48D-8E34-4490-8154-026191D73924" codeba ...
- [转载]ArcGIS Engine 中的多线程使用
ArcGIS Engine 中的多线程使用 原文链接 http://anshien.blog.163.com/blog/static/169966308201082441114173/ 一直都想写 ...
- Vue.2.0.5-自定义指令
简介 除了默认设置的核心指令( v-model 和 v-show ),Vue 也允许注册自定义指令.注意,在 Vue2.0 里面,代码复用的主要形式和抽象是组件--然而,有的情况下,你仍然需要对纯 D ...
- UIAlertView
1.Title 获取或设置UIAlertView上的标题. 2.Message 获取或设置UIAlertView上的消息 UIAlertView *alertView = [[UIAlertViewa ...