If procedure is valid : user_objects « System Tables Data Dictionary « Oracle PL/SQL Tutorial

Oracle PL/SQL Tutorial
1. Introduction
2. Query Select
3. Set
4. Insert Update Delete
5. Sequences
6. Table
7. Table Joins
8. View
9. Index
10. SQL Data Types
11. Character String Functions
12. Aggregate Functions
13. Date Timestamp Functions
14. Numerical Math Functions
15. Conversion Functions
16. Analytical Functions
17. Miscellaneous Functions
18. Regular Expressions Functions
19. Statistical Functions
20. Linear Regression Functions
21. PL SQL Data Types
22. PL SQL Statements
23. PL SQL Operators
24. PL SQL Programming
25. Cursor
26. Collections
27. Function Procedure Packages
28. Trigger
29. SQL PLUS Session Environment
30. System Tables Data Dictionary
31. System Packages
32. Object Oriented
33. XML
34. Large Objects
35. Transaction
36. User Privilege
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL/SQL Tutorial » System Tables Data Dictionary » user_objects 
30. 90. 22. If procedure is valid
SQL> CREATE TABLE EMP(
  2      EMPNO NUMBER(4NOT NULL,
  3      ENAME VARCHAR2(10),
  4      JOB VARCHAR2(9),
  5      MGR NUMBER(4),
  6      HIREDATE DATE,
  7      SAL NUMBER(72),
  8      COMM NUMBER(72),
  9      DEPTNO NUMBER(2)
 10  );

Table created.

SQL> create or replace procedure P1 is
  2   v_cnt number;
  3   begin
  4       select count(*into v_cnt from emp where empno > 0;
  5   end;
  6  /



SQL>
SQL> select object_name, status from user_objects where object_name in ('P1','P2','P3','P4');
Enter...

P1
VALID

P1
INVALID

P2
INVALID

P2
INVALID

P3
INVALID

P4
INVALID


rows selected.

SQL>
SQL> select object_name, status from user_objects where object_name in ('P1','P2','P3','P4');
Enter...

P1
VALID

P1
INVALID

P2
INVALID

P2
INVALID

P3
INVALID

P4
INVALID


rows selected.

SQL>
SQL> drop table emp;

Table dropped.
30. 90. user_objects
30. 90. 1. Check user_objects for object name
30. 90. 2. Check the package status in user_objects
30. 90. 3. Check function/procedure status
30. 90. 4. Check the status for all stored procedures is by using the Oracle data dictionary view USER_OBJECTS
30. 90. 5. Get invalid table objects by joining user_segments and user_objects
30. 90. 6. Get all invalid user objects in user_objects table
30. 90. 7. Create drop command by query the user_objects table
30. 90. 8. Create grant permission command by querying user_objects table
30. 90. 9. Query user_objects for all packages, procedures and functions
30. 90. 10. Query user_objects for user-defined data type
30. 90. 11. Recompile all invalid package
30. 90. 12. Query user_objects for all java classes
30. 90. 13. Query user_objects for all PL/SQL code
30. 90. 14. Get Object id from user_objects
30. 90. 15. Join sys.col$ and user_objects
30. 90. 16. Query user_objects for object status
30. 90. 17. Query user_objects for your functions and procedures
30. 90. 18. User and its average object id
30. 90. 19. Show the procedure is marked invalid **
30. 90. 20. Behavior of dependent objects.
30. 90. 21. Finding, Validating, and Describing Packages
30. 90. 22. If procedure is valid
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.