[Tip] Invalid objects in the bank

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
Post Reply
User avatar
anderson
Rank: Analista Júnior
Rank: Analista Júnior
Posts: 75
Joined: Mon, 06 Jun 2005 1:08 pm
Location: Toledo - PR
Contact:
Anderson Nuernberg
---

Query below shows the invalid objects in the bank ...

Select all

SELECT DISTINCT u.object_name, 
       decode(u.object_type,'PACKAGE BODY','PACKAGE',u.object_type) object_type, 
       u.created 
  FROM user_objects u 
 WHERE u.status = 'INVALID' 
   AND u.object_type IN ('PROCEDURE','FUNCTION','PACKAGE BODY','PACKAGE') 
 ORDER BY u.created
and this next compile the invalid objects ....

1]]

[]'s

: Wink:
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Another way to do this (I think from version 9i) is to use dbms_utility.

See an example:

Select all

exec dbms_utility.compile_schema('SCOTT');
Below is the syntax:

Select all

dbms_utility.compile_schema( 
schema         IN VARCHAR2, 
compile_all    BOOLEAN DEFAULT TRUE, 
reuse_settings BOOLEAN DEFAULT FALSE); 
:-O
mello
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 15
Joined: Mon, 06 Mar 2006 5:26 pm
Location: sp

Would you give to use dbms_utility.compile_schema by dblink ??
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests