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这些数据类型的 ...
随机推荐
- linux下连接本地的navicate
1.进mysql cd mysql; cd bin; ./mysql -uroot -proot; show databases;#可以没有 #修改权限 1.GRANT ALL PRIVILEGES ...
- const 修饰函数
At the very first ,I got a problem . Vector Vector::operator+(const Vector &v)const{ return Vect ...
- 过滤android应用列表(区分系统应用、第三方应用、sd卡中的应用)
if ((app.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { // 系统程序 }else if ((app.flags & Applica ...
- 让android webView使用系统默认浏览器内核直接解析,不弹出选择浏览器选项
遇到一个需求,要求浏览网页的页面不去启动其他的浏览器,全部在自身的应用中. 解决方法 webview.setWebViewClient(new WebViewClient() { @Override ...
- Anacodna之conda与 virtualenv对比使用教程,创建虚拟环境
conda创建虚拟环境 1.查看包 conda list查看安装了哪些包 conda env list查看有哪些虚拟环境 conda -V查看conda的版本 2.创建虚拟环境,命名为myflaska ...
- Selenium2学习-026-WebUI自动化实战实例-024-获取页面元素
非常简单的方法封装,就不啰嗦了,直接上码咯 ^_^ /** * Get element. It will be return null when there is not such element. ...
- C语言:其他进制转换为十进制(方法二)
#include<stdio.h> #include<math.h> #include<string.h> #include<ctype.h> //其他 ...
- 目标检测的图像特征提取之(一)HOG特征
http://blog.csdn.net/liulina603/article/details/8291093
- POJ1043问题描述
Description The FBI is conducting a surveillance of a known criminal hideout which serves as a commu ...
- less 命令(转)
less 工具也是对文件或其它输出进行分页显示的工具,应该说是linux正统查看文件内容的工具,功能极其强大.less 的用法比起 more 更加的有弹性.在 more 的时候,我们并没有办法向前面翻 ...