Query user_objects for all packages, procedures and functions : user_objects « System Tables Data Dictionary « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL>
SQL>
SQL> SELECT   'CREATE PUBLIC SYNONYM ' || object_name || ' FOR ' ||
  2           object_name || ';'
  3  FROM     user_objects
  4  WHERE    object_type IN ('PACKAGE','PROCEDURE','FUNCTION')
  5  and      rownum < 50
  6  ORDER BY object_type, object_name;

CREATE PUBLIC SYNONYM CHITIME FOR CHITIME;
CREATE PUBLIC SYNONYM GRPVAL FOR GRPVAL;
CREATE PUBLIC SYNONYM IS_OVERDUE FOR IS_OVERDUE;
CREATE PUBLIC SYNONYM RECEIVE_MESSAGE FOR RECEIVE_MESSAGE;
CREATE PUBLIC SYNONYM RULERSTR FOR RULERSTR;
CREATE PUBLIC SYNONYM TABCOUNT FOR TABCOUNT;
CREATE PUBLIC SYNONYM TO_MMSDDSYYYY_OR_NULL FOR TO_MMSDDSYYYY_OR_NULL;
CREATE PUBLIC SYNONYM TO_NUMBER_OR_NULL FOR TO_NUMBER_OR_NULL;
CREATE PUBLIC SYNONYM TRACEIT FOR TRACEIT;
CREATE PUBLIC SYNONYM VALUE_IN FOR VALUE_IN;
CREATE PUBLIC SYNONYM CLASSPACKAGE FOR CLASSPACKAGE;
CREATE PUBLIC SYNONYM DATES FOR DATES;
CREATE PUBLIC SYNONYM GENDER_TS FOR GENDER_TS;

CREATE PUBLIC SYNONYM MYDATE FOR MYDATE;
CREATE PUBLIC SYNONYM ONECUR FOR ONECUR;
CREATE PUBLIC SYNONYM PARAMETERS FOR PARAMETERS;
CREATE PUBLIC SYNONYM SALESPKG FOR SALESPKG;
CREATE PUBLIC SYNONYM SCOPES FOR SCOPES;
CREATE PUBLIC SYNONYM TIMER FOR TIMER;
CREATE PUBLIC SYNONYM VALERR FOR VALERR;
CREATE PUBLIC SYNONYM WORKER_TS FOR WORKER_TS;
CREATE PUBLIC SYNONYM WORKER_TYPE_TS FOR WORKER_TYPE_TS;
CREATE PUBLIC SYNONYM WORKPLACE_TYPE_TS FOR WORKPLACE_TYPE_TS;
CREATE PUBLIC SYNONYM BULK_TEST FOR BULK_TEST;
CREATE PUBLIC SYNONYM CLOSECUR FOR CLOSECUR;
CREATE PUBLIC SYNONYM CREINDX FOR CREINDX;

CREATE PUBLIC SYNONYM DELETE_CUST FOR DELETE_CUST;
CREATE PUBLIC SYNONYM DROPIT FOR DROPIT;
CREATE PUBLIC SYNONYM DROP_IF_EXISTS FOR DROP_IF_EXISTS;
CREATE PUBLIC SYNONYM FCREATE FOR FCREATE;
CREATE PUBLIC SYNONYM FLUSH FOR FLUSH;
CREATE PUBLIC SYNONYM GET_LINE FOR GET_LINE;
CREATE PUBLIC SYNONYM P1 FOR P1;
CREATE PUBLIC SYNONYM PRINTLN FOR PRINTLN;
CREATE PUBLIC SYNONYM PROC0 FOR PROC0;
CREATE PUBLIC SYNONYM PROC1 FOR PROC1;
CREATE PUBLIC SYNONYM PROC2 FOR PROC2;
CREATE PUBLIC SYNONYM PROC3 FOR PROC3;
CREATE PUBLIC SYNONYM PROCA FOR PROCA;

CREATE PUBLIC SYNONYM PROCB FOR PROCB;
CREATE PUBLIC SYNONYM PUT_BOOLEAN FOR PUT_BOOLEAN;
CREATE PUBLIC SYNONYM P_RUN_INSERT FOR P_RUN_INSERT;
CREATE PUBLIC SYNONYM ROW_AT_A_TIME_TEST FOR ROW_AT_A_TIME_TEST;
CREATE PUBLIC SYNONYM RUNDDL FOR RUNDDL;
CREATE PUBLIC SYNONYM SAVESTRINGTOFILE FOR SAVESTRINGTOFILE;
CREATE PUBLIC SYNONYM SEND_MESSAGE FOR SEND_MESSAGE;
CREATE PUBLIC SYNONYM SHOWEMPS FOR SHOWEMPS;
CREATE PUBLIC SYNONYM SHOW_FILE FOR SHOW_FILE;
CREATE PUBLIC SYNONYM WAIT FOR WAIT;

49 rows selected.

SQL>








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