SlideShare a Scribd company logo
1 of 2
1) grant execute on SYS.FULL_COMPILE to ANAR;
2) CREATE OR REPLACE PROCEDURE SYS.FULL_COMPILE(xfull IN BOOLEAN,xowner IN VARCHAR2,xoutput
IN BOOLEAN)
AS
CURSOR c1
IS
SELECT 'ALTER ' || object_type || ' ' || owner || '.' || object_name || ' COMPILE' strsql
FROM dba_objects
WHERE status = 'INVALID'
AND object_type IN ('PROCEDURE','FUNCTION','VIEW','PACKAGE','TRIGGER')
AND owner like xowner
UNION ALL
SELECT 'ALTER PACKAGE' || ' ' || owner || '.' || object_name || ' COMPILE BODY' strsql
FROM dba_objects
WHERE status = 'INVALID' AND object_type = 'PACKAGE BODY'
AND owner like xowner;
CURSOR c2
IS
SELECT 'ALTER ' || object_type || ' ' || owner || '.' || object_name || ' COMPILE' strsql
FROM dba_objects
WHERE object_type IN ('PROCEDURE','FUNCTION','VIEW','PACKAGE','TRIGGER')
AND owner like xowner
UNION ALL
SELECT 'ALTER PACKAGE' || ' ' || owner || '.' || object_name || ' COMPILE BODY' strsql
FROM dba_objects
WHERE object_type = 'PACKAGE BODY'
AND owner like xowner;
CURSOR c3
IS
SELECT *
FROM dba_objects
WHERE status = 'INVALID'
AND owner like xowner
AND object_type IN ('PROCEDURE','FUNCTION','VIEW','PACKAGE','TRIGGER','PACKAGE
BODY')
ORDER BY owner,object_name,object_type;
alc1 c1%ROWTYPE;
alc2 c2%ROWTYPE;
alc3 c3%ROWTYPE;
cur
INTEGER;
ret
INTEGER;
db_name VARCHAR2(50);
BEGIN
IF xfull THEN
OPEN c2;
LOOP
FETCH c2 INTO alc2;
EXIT WHEN c2%NOTFOUND;
BEGIN
cur := DBMS_SQL.open_cursor;
DBMS_SQL.parse (cur,alc2.strsql , DBMS_SQL.NATIVE);
ret := DBMS_SQL.EXECUTE (cur);
DBMS_SQL.close_cursor (cur);
EXCEPTION
WHEN OTHERS THEN
NULL;
IF DBMS_SQL.is_open (cur) THEN
DBMS_SQL.close_cursor (cur);
END IF;
END;
END LOOP;
CLOSE c2;
ELSE
OPEN c1;
LOOP
FETCH c1 INTO alc1;
EXIT WHEN c1%NOTFOUND;
BEGIN
cur := DBMS_SQL.open_cursor;
DBMS_SQL.parse (cur,alc1.strsql , DBMS_SQL.NATIVE);
ret := DBMS_SQL.EXECUTE (cur);
DBMS_SQL.close_cursor (cur);
EXCEPTION
WHEN OTHERS THEN
NULL;
IF DBMS_SQL.is_open (cur) THEN
DBMS_SQL.close_cursor (cur);
END IF;
END;
END LOOP;
CLOSE c1;
END IF;
IF xoutput THEN
DBMS_OUTPUT.ENABLE(1000000);
SELECT name INTO db_name FROM v$database;
DBMS_OUTPUT.PUT_LINE('DATABASE NAME = '||db_name);
DBMS_OUTPUT.PUT_LINE('.');
DBMS_OUTPUT.PUT_LINE('.
INVALID OBJECTS LIST
');
DBMS_OUTPUT.PUT_LINE('.');
DBMS_OUTPUT.PUT_LINE(RPAD('OWNER',20,' ')||' '||RPAD('OBJECT NAME',40,' ')||'
'||RPAD('OBJECT TYPE',15,' '));
DBMS_OUTPUT.PUT_LINE(RPAD('-',20,'-')||' '||RPAD('-',40,'-')||' '||RPAD('-',15,'-'));
OPEN c3;
LOOP
FETCH c3 INTO alc3;
EXIT WHEN c3%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(RPAD(alc3.owner,20,' ')||'
'||RPAD(alc3.object_type,15,' '));
END LOOP;

'||RPAD(alc3.object_name,40,' ')||'

CLOSE c3;
DBMS_OUTPUT.PUT_LINE('.');
DBMS_OUTPUT.PUT_LINE('.');
END IF;
END;
/

3) select 'exec
sys.full_compile(FALSE,'''||owner||''',TRUE);' from dba_objects where s
tatus ='INVALID'
and owner not in ('SYS','SYSTEM','MASTER','MASTER','SYSMAN','OLAPSYS') an
d object_type <> 'SYNONYM'
group by owner;

More Related Content

What's hot

_Function Builders in Swift #love_swift
_Function Builders in Swift #love_swift_Function Builders in Swift #love_swift
_Function Builders in Swift #love_swiftTomohiro Kumagai
 
Building Large jQuery Applications
Building Large jQuery ApplicationsBuilding Large jQuery Applications
Building Large jQuery ApplicationsRebecca Murphey
 
‎Unit tests automation for legacy code‎ at YAPC::NA 2016
‎Unit tests automation for legacy code‎ at YAPC::NA 2016‎Unit tests automation for legacy code‎ at YAPC::NA 2016
‎Unit tests automation for legacy code‎ at YAPC::NA 2016Denis Shirokov
 
Egghead redux-cheat-sheet-3-2-1
Egghead redux-cheat-sheet-3-2-1Egghead redux-cheat-sheet-3-2-1
Egghead redux-cheat-sheet-3-2-1Augustin Bralley
 
The next step, part 2
The next step, part 2The next step, part 2
The next step, part 2Pat Cavit
 
The Snake and the Butler
The Snake and the ButlerThe Snake and the Butler
The Snake and the ButlerBarak Korren
 
Lecture6 display data by okello erick
Lecture6 display data by okello erickLecture6 display data by okello erick
Lecture6 display data by okello erickokelloerick
 
AngularJS: what is underneath the hood
AngularJS: what is underneath the hood AngularJS: what is underneath the hood
AngularJS: what is underneath the hood DA-14
 
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014Matthias Noback
 
[Swift] Chain of Responsibility
[Swift] Chain of Responsibility[Swift] Chain of Responsibility
[Swift] Chain of ResponsibilityBill Kim
 
Library Project Marcelo Salvador
Library Project Marcelo SalvadorLibrary Project Marcelo Salvador
Library Project Marcelo SalvadorDomingos Salvador
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First WidgetChris Wilcoxson
 
Data20161007
Data20161007Data20161007
Data20161007capegmail
 
Droidjam 2019 flutter isolates pdf
Droidjam 2019 flutter isolates pdfDroidjam 2019 flutter isolates pdf
Droidjam 2019 flutter isolates pdfAnvith Bhat
 

What's hot (20)

_Function Builders in Swift #love_swift
_Function Builders in Swift #love_swift_Function Builders in Swift #love_swift
_Function Builders in Swift #love_swift
 
Binary tree in java
Binary tree in javaBinary tree in java
Binary tree in java
 
Building Large jQuery Applications
Building Large jQuery ApplicationsBuilding Large jQuery Applications
Building Large jQuery Applications
 
‎Unit tests automation for legacy code‎ at YAPC::NA 2016
‎Unit tests automation for legacy code‎ at YAPC::NA 2016‎Unit tests automation for legacy code‎ at YAPC::NA 2016
‎Unit tests automation for legacy code‎ at YAPC::NA 2016
 
Egghead redux-cheat-sheet-3-2-1
Egghead redux-cheat-sheet-3-2-1Egghead redux-cheat-sheet-3-2-1
Egghead redux-cheat-sheet-3-2-1
 
The next step, part 2
The next step, part 2The next step, part 2
The next step, part 2
 
JavaScript patterns
JavaScript patternsJavaScript patterns
JavaScript patterns
 
Dojo Confessions
Dojo ConfessionsDojo Confessions
Dojo Confessions
 
The Snake and the Butler
The Snake and the ButlerThe Snake and the Butler
The Snake and the Butler
 
Lecture6 display data by okello erick
Lecture6 display data by okello erickLecture6 display data by okello erick
Lecture6 display data by okello erick
 
AngularJS: what is underneath the hood
AngularJS: what is underneath the hood AngularJS: what is underneath the hood
AngularJS: what is underneath the hood
 
Ete programs
Ete programsEte programs
Ete programs
 
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
A Series of Fortunate Events - Drupalcon Europe, Amsterdam 2014
 
Conexion php
Conexion phpConexion php
Conexion php
 
[Swift] Chain of Responsibility
[Swift] Chain of Responsibility[Swift] Chain of Responsibility
[Swift] Chain of Responsibility
 
Library Project Marcelo Salvador
Library Project Marcelo SalvadorLibrary Project Marcelo Salvador
Library Project Marcelo Salvador
 
Building Your First Widget
Building Your First WidgetBuilding Your First Widget
Building Your First Widget
 
Miracle of std lib
Miracle of std libMiracle of std lib
Miracle of std lib
 
Data20161007
Data20161007Data20161007
Data20161007
 
Droidjam 2019 flutter isolates pdf
Droidjam 2019 flutter isolates pdfDroidjam 2019 flutter isolates pdf
Droidjam 2019 flutter isolates pdf
 

Similar to Full compile invalid obje pl/sql

unit-2 part-1.pptx
unit-2 part-1.pptxunit-2 part-1.pptx
unit-2 part-1.pptxmegana10
 
JavaScript Iteration Protocols - Workshop NodeConf EU 2022
JavaScript Iteration Protocols - Workshop NodeConf EU 2022JavaScript Iteration Protocols - Workshop NodeConf EU 2022
JavaScript Iteration Protocols - Workshop NodeConf EU 2022Luciano Mammino
 
Symfony World - Symfony components and design patterns
Symfony World - Symfony components and design patternsSymfony World - Symfony components and design patterns
Symfony World - Symfony components and design patternsŁukasz Chruściel
 
Object-Oriented Javascript
Object-Oriented JavascriptObject-Oriented Javascript
Object-Oriented Javascriptkvangork
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScriptkvangork
 
Chaining and function composition with lodash / underscore
Chaining and function composition with lodash / underscoreChaining and function composition with lodash / underscore
Chaining and function composition with lodash / underscoreNicolas Carlo
 
JavaScript Functions
JavaScript FunctionsJavaScript Functions
JavaScript FunctionsColin DeCarlo
 
Chaining et composition de fonctions avec lodash / underscore
Chaining et composition de fonctions avec lodash / underscoreChaining et composition de fonctions avec lodash / underscore
Chaining et composition de fonctions avec lodash / underscoreNicolas Carlo
 
Writing Maintainable JavaScript
Writing Maintainable JavaScriptWriting Maintainable JavaScript
Writing Maintainable JavaScriptAndrew Dupont
 
Inversion Of Control
Inversion Of ControlInversion Of Control
Inversion Of ControlChad Hietala
 
Clean code in JavaScript
Clean code in JavaScriptClean code in JavaScript
Clean code in JavaScriptMathieu Breton
 
¿Cómo de sexy puede hacer Backbone mi código?
¿Cómo de sexy puede hacer Backbone mi código?¿Cómo de sexy puede hacer Backbone mi código?
¿Cómo de sexy puede hacer Backbone mi código?jaespinmora
 
Design patterns in javascript
Design patterns in javascriptDesign patterns in javascript
Design patterns in javascriptAbimbola Idowu
 
JavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScriptJavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScriptLaurence Svekis ✔
 
Entities in drupal 7
Entities in drupal 7Entities in drupal 7
Entities in drupal 7Zsolt Tasnadi
 
JSGeneve - Backbone.js
JSGeneve - Backbone.jsJSGeneve - Backbone.js
JSGeneve - Backbone.jsPierre Spring
 
SinglyLinkedListPseudoCode.txtCLASS SinglyLinkedList se.docx
SinglyLinkedListPseudoCode.txtCLASS SinglyLinkedList    se.docxSinglyLinkedListPseudoCode.txtCLASS SinglyLinkedList    se.docx
SinglyLinkedListPseudoCode.txtCLASS SinglyLinkedList se.docxjennifer822
 
Building Lithium Apps
Building Lithium AppsBuilding Lithium Apps
Building Lithium AppsNate Abele
 

Similar to Full compile invalid obje pl/sql (20)

unit-2 part-1.pptx
unit-2 part-1.pptxunit-2 part-1.pptx
unit-2 part-1.pptx
 
Say It With Javascript
Say It With JavascriptSay It With Javascript
Say It With Javascript
 
JavaScript Iteration Protocols - Workshop NodeConf EU 2022
JavaScript Iteration Protocols - Workshop NodeConf EU 2022JavaScript Iteration Protocols - Workshop NodeConf EU 2022
JavaScript Iteration Protocols - Workshop NodeConf EU 2022
 
Symfony World - Symfony components and design patterns
Symfony World - Symfony components and design patternsSymfony World - Symfony components and design patterns
Symfony World - Symfony components and design patterns
 
Object-Oriented Javascript
Object-Oriented JavascriptObject-Oriented Javascript
Object-Oriented Javascript
 
Object-Oriented JavaScript
Object-Oriented JavaScriptObject-Oriented JavaScript
Object-Oriented JavaScript
 
Chaining and function composition with lodash / underscore
Chaining and function composition with lodash / underscoreChaining and function composition with lodash / underscore
Chaining and function composition with lodash / underscore
 
JavaScript Functions
JavaScript FunctionsJavaScript Functions
JavaScript Functions
 
Chaining et composition de fonctions avec lodash / underscore
Chaining et composition de fonctions avec lodash / underscoreChaining et composition de fonctions avec lodash / underscore
Chaining et composition de fonctions avec lodash / underscore
 
Writing Maintainable JavaScript
Writing Maintainable JavaScriptWriting Maintainable JavaScript
Writing Maintainable JavaScript
 
Inversion Of Control
Inversion Of ControlInversion Of Control
Inversion Of Control
 
Clean code in JavaScript
Clean code in JavaScriptClean code in JavaScript
Clean code in JavaScript
 
¿Cómo de sexy puede hacer Backbone mi código?
¿Cómo de sexy puede hacer Backbone mi código?¿Cómo de sexy puede hacer Backbone mi código?
¿Cómo de sexy puede hacer Backbone mi código?
 
Design patterns in javascript
Design patterns in javascriptDesign patterns in javascript
Design patterns in javascript
 
JavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScriptJavaScript Objects and OOP Programming with JavaScript
JavaScript Objects and OOP Programming with JavaScript
 
Entities in drupal 7
Entities in drupal 7Entities in drupal 7
Entities in drupal 7
 
JSGeneve - Backbone.js
JSGeneve - Backbone.jsJSGeneve - Backbone.js
JSGeneve - Backbone.js
 
Js hacks
Js hacksJs hacks
Js hacks
 
SinglyLinkedListPseudoCode.txtCLASS SinglyLinkedList se.docx
SinglyLinkedListPseudoCode.txtCLASS SinglyLinkedList    se.docxSinglyLinkedListPseudoCode.txtCLASS SinglyLinkedList    se.docx
SinglyLinkedListPseudoCode.txtCLASS SinglyLinkedList se.docx
 
Building Lithium Apps
Building Lithium AppsBuilding Lithium Apps
Building Lithium Apps
 

More from Anar Godjaev

Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from Anar Godjaev
 
How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...Anar Godjaev
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaultAnar Godjaev
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin GüvenliğiAnar Godjaev
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden GateAnar Godjaev
 
Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumAnar Godjaev
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon ExportAnar Godjaev
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Anar Godjaev
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Anar Godjaev
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeAnar Godjaev
 
Conditional Control
Conditional ControlConditional Control
Conditional ControlAnar Godjaev
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasiAnar Godjaev
 

More from Anar Godjaev (20)

Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGate
 
Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from
 
How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vault
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin Güvenliği
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
 
Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server Kurulum
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇
 
Contraints
ContraintsContraints
Contraints
 
Oracle SQL
Oracle SQLOracle SQL
Oracle SQL
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını Inceleme
 
Conditional Control
Conditional ControlConditional Control
Conditional Control
 
PL/SQL Blocks
PL/SQL BlocksPL/SQL Blocks
PL/SQL Blocks
 
Wait Interface
Wait InterfaceWait Interface
Wait Interface
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasi
 
Tuning SGA
Tuning SGATuning SGA
Tuning SGA
 
Parallel Server
Parallel ServerParallel Server
Parallel Server
 
Table Partitions
Table PartitionsTable Partitions
Table Partitions
 

Full compile invalid obje pl/sql

  • 1. 1) grant execute on SYS.FULL_COMPILE to ANAR; 2) CREATE OR REPLACE PROCEDURE SYS.FULL_COMPILE(xfull IN BOOLEAN,xowner IN VARCHAR2,xoutput IN BOOLEAN) AS CURSOR c1 IS SELECT 'ALTER ' || object_type || ' ' || owner || '.' || object_name || ' COMPILE' strsql FROM dba_objects WHERE status = 'INVALID' AND object_type IN ('PROCEDURE','FUNCTION','VIEW','PACKAGE','TRIGGER') AND owner like xowner UNION ALL SELECT 'ALTER PACKAGE' || ' ' || owner || '.' || object_name || ' COMPILE BODY' strsql FROM dba_objects WHERE status = 'INVALID' AND object_type = 'PACKAGE BODY' AND owner like xowner; CURSOR c2 IS SELECT 'ALTER ' || object_type || ' ' || owner || '.' || object_name || ' COMPILE' strsql FROM dba_objects WHERE object_type IN ('PROCEDURE','FUNCTION','VIEW','PACKAGE','TRIGGER') AND owner like xowner UNION ALL SELECT 'ALTER PACKAGE' || ' ' || owner || '.' || object_name || ' COMPILE BODY' strsql FROM dba_objects WHERE object_type = 'PACKAGE BODY' AND owner like xowner; CURSOR c3 IS SELECT * FROM dba_objects WHERE status = 'INVALID' AND owner like xowner AND object_type IN ('PROCEDURE','FUNCTION','VIEW','PACKAGE','TRIGGER','PACKAGE BODY') ORDER BY owner,object_name,object_type; alc1 c1%ROWTYPE; alc2 c2%ROWTYPE; alc3 c3%ROWTYPE; cur INTEGER; ret INTEGER; db_name VARCHAR2(50); BEGIN IF xfull THEN OPEN c2; LOOP FETCH c2 INTO alc2; EXIT WHEN c2%NOTFOUND; BEGIN cur := DBMS_SQL.open_cursor; DBMS_SQL.parse (cur,alc2.strsql , DBMS_SQL.NATIVE); ret := DBMS_SQL.EXECUTE (cur); DBMS_SQL.close_cursor (cur); EXCEPTION WHEN OTHERS THEN NULL; IF DBMS_SQL.is_open (cur) THEN DBMS_SQL.close_cursor (cur); END IF; END; END LOOP; CLOSE c2; ELSE OPEN c1; LOOP FETCH c1 INTO alc1; EXIT WHEN c1%NOTFOUND; BEGIN
  • 2. cur := DBMS_SQL.open_cursor; DBMS_SQL.parse (cur,alc1.strsql , DBMS_SQL.NATIVE); ret := DBMS_SQL.EXECUTE (cur); DBMS_SQL.close_cursor (cur); EXCEPTION WHEN OTHERS THEN NULL; IF DBMS_SQL.is_open (cur) THEN DBMS_SQL.close_cursor (cur); END IF; END; END LOOP; CLOSE c1; END IF; IF xoutput THEN DBMS_OUTPUT.ENABLE(1000000); SELECT name INTO db_name FROM v$database; DBMS_OUTPUT.PUT_LINE('DATABASE NAME = '||db_name); DBMS_OUTPUT.PUT_LINE('.'); DBMS_OUTPUT.PUT_LINE('. INVALID OBJECTS LIST '); DBMS_OUTPUT.PUT_LINE('.'); DBMS_OUTPUT.PUT_LINE(RPAD('OWNER',20,' ')||' '||RPAD('OBJECT NAME',40,' ')||' '||RPAD('OBJECT TYPE',15,' ')); DBMS_OUTPUT.PUT_LINE(RPAD('-',20,'-')||' '||RPAD('-',40,'-')||' '||RPAD('-',15,'-')); OPEN c3; LOOP FETCH c3 INTO alc3; EXIT WHEN c3%NOTFOUND; DBMS_OUTPUT.PUT_LINE(RPAD(alc3.owner,20,' ')||' '||RPAD(alc3.object_type,15,' ')); END LOOP; '||RPAD(alc3.object_name,40,' ')||' CLOSE c3; DBMS_OUTPUT.PUT_LINE('.'); DBMS_OUTPUT.PUT_LINE('.'); END IF; END; / 3) select 'exec sys.full_compile(FALSE,'''||owner||''',TRUE);' from dba_objects where s tatus ='INVALID' and owner not in ('SYS','SYSTEM','MASTER','MASTER','SYSMAN','OLAPSYS') an d object_type <> 'SYNONYM' group by owner;