Database dictionary view used to display the current user user_objects all the objects contained. It not only can be used to list the user tables, views, indexes, etc., can also be used to list the user's stored procedures, functions, packages.
- 1, query the database views, stored procedures, functions
select object_name,created,status from user_objects where object_type in ('PROCEDURE','FUNCTION','VIEW')
- 2, view the source code for stored procedures
- When a stored procedure is established, oracle will process name, source machine to execute code stored in the data dictionary. We can view the current user by querying urser_source all stored procedures, the process name needs to be capitalized
select text from user_source where name = 'ADD_DEPT';
1 "procedure add_dept"
2 "(dno number, dname varchar2 default null, loc varchar2 default null)"
5 "insert into dept values (dno, dname, loc);"
7 "when dup_val_on_index then"
8 "raise_application_error (-2000, 'the department number can not repeat');"