Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DUAL Table: View Tables and Procedures 1

Status
Not open for further replies.

iolaper

MIS
Jun 7, 2004
98
US
I want to view the names of all the tables and procedures i have created so far in my Oracle 9i Database...
Should I use the dual table for this? How do I do it?
Thanks for ur help in advance...
 
And I have a silly question.
How to view a stored procedure?
THanks so much...
 
Arizona,

Here is code to do what you want. First is a script that does what Sem/Dima suggests (to access DBA_..., ALL_..., or USER_OBJECTS). You must save this code to a script (I chose the name "ShowSchemaObjects.sql) before you try to run it since it contains an "ACCEPT" statement. Also, if you do not have access to "DBA_OBJECTS", then replace it in the script with "ALL_OBJECTS":

Section 1 -- "ShowSchemaObjects.sql" code:
Code:
accept which_schema prompt "Which Oracle User's objects would you like to see? "
select substr(object_name,1,30)object, object_type
from dba_objects
where owner = upper('&which_schema')
order by object_name
/
Section 2 -- Excerpt of Sample invocation of "ShowSchemaObjects.sql":
Code:
@showschemaobjects
Which Oracle User's objects would you like to see? test

OBJECT                         OBJECT_TYPE
------------------------------ ------------------
A                              TABLE
ABC                            TABLE
AC                             TABLE
ACCOUNT                        TABLE
ACCUM_PACK                     PACKAGE
ACCUM_PACK                     PACKAGE BODY
AD                             TABLE
ADDRENTAL                      PROCEDURE
ADDRESS                        TABLE
ADDRESSES                      TABLE
ADD_MINUTE                     FUNCTION
ADMIN_EMPLOYEES                VIEW
...

And it looks like LKBrwnDBA posted code for you, in your other thread, to see procedure code.

Hope this helps.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 23:47 (16Aug04) UTC (aka "GMT" and "Zulu"), 16:47 (16Aug04) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top