Oracle
  Home arrow Oracle arrow Page 3 - Managing PL/SQL Code
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
VeriSign Whitepapers 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ORACLE

Managing PL/SQL Code
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2007-10-18

    Table of Contents:
  • Managing PL/SQL Code
  • Managing Code in the Database
  • Display information about stored objects
  • Display and search source code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
    IBM developerWorks
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Managing PL/SQL Code - Display information about stored objects


    (Page 3 of 4 )

    The USER_OBJECTS view contains the following key information about an object:

    OBJECT_NAME
      
    Name of the object

    OBJECT_TYPE
      
    Type of the object (e.g., 'PACKAGE', 'FUNCTION',
       'TRIGGER')

    STATUS
      
    Status of the object: VALID or INVALID

    LAST_DDL_TIME
      
    Timestamp indicating the last time that this object
       was changed.

    The following SQL*Plus script displays the status of PL/SQL code objects:

      /* File on web: psobj.sql */
      SET PAGESIZE 66
      COLUMN object_type FORMAT A20
      COLUMN object_name FORMAT A30
      COLUMN status FORMAT A10
      BREAK ON object_type SKIP 1
      SPOOL psobj.lis
      SELECT object_type, object_name, status
        FROM user_objects
      
    WHERE object_type IN (
          'PACKAGE', 'PACKAGE BODY', 'FUNCTION', 'PROCEDURE',
          'TYPE', 'TYPE BODY', 'TRIGGER')
       ORDER BY object_type, status, object_name
      /
      SPOOL OFF

    The output from this script file contains the following list:

      OBJECT_TYPE   OBJECT_NAME       STATUS
      ------------  --------------    ---------
      FUNCTION      DEVELOP_ANALYSIS  INVALID 
                    NUMBER_OF_ATOMICS INVALID

      PACKAGE       CONFIG_PKG        VALID
                    EXCHDLR_PKG       VALID

    Notice that a two of my modules are marked as INVALID. See the section “Recompiling Invalid Code” for more details on the significance of this setting and how you can change it to VALID.

    More Oracle Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "Oracle PL/SQL Programming, Fourth...
     

    Buy this book now. This article is excerpted from chapter 20 of the book Oracle PL/SQL Programming, Fourth Edition, written by Steven Feuerstein and Bill Pribyl (O'Reilly; ISBN: 0596009771). Check it out today at your favorite bookstore. Buy this book now.

       

    ORACLE ARTICLES

    - Tuning PL/SQL Code
    - Debugging PL/SQL Code
    - Testing PL/SQL Code
    - Working With PL/SQL Code
    - Conditional Compilation for Oracle Database ...
    - Compile-Time Warnings for Oracle DB 10g
    - Compiling PL/SQL Code for an Oracle Database
    - Troubleshooting PL/SQL Code
    - Managing PL/SQL Code
    - Data Manipulation and More for HTML DB Appli...
    - Oracle Database Fundamentals
    - Adding Processes to HTML DB Applications
    - Adding Computations, Processes, and Validati...
    - Sub-templates and More with Oracle HTML DB
    - Focusing on Templates in Oracle HTML DB





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway