Re: [Q] How to list all the tables in DB??
Date: 1996/05/01
Message-ID: <3187C365.19BB_at_cois.com>#1/1
R. Schierbeek wrote:
>
> In article <4m3c3q$j8a_at_news2.cais.com>, duffy_at_cais.cais.com (MCC) wrote:
> > We have Oacle 7.2.3 installed on SUN Solaris 2.5. Can anyone tell me how
> > to list all the tables in DB? the list should include table name,
> > tablespace name, owner info. Thank you for help.
>
> sqlplus system/passwd
> col TABLESPACE_NAME format A20
> col OWNER format A20
> select owner,table_name,tablespace_name
> from DBA_TABLES
> order by owner,table_name ;
>
> OR, if you want an overview of other objects (e.g. indexes):
>
> col TABLESPACE_NAME format A20
> col OWNER format A20
> col SEGMENT_TYPE format A10 head TYPE
> col KBytes for 999,999
> select TABLESPACE_NAME,OWNER SEGMENT_TYPE "TYPE"
> ,count(SEGMENT_NAME) "OBJECT#"
> ,trunc(sum(bytes/1024),0) "KBytes"
> from DBA_SEGMENTS
> group by TABLESPACE_NAME ,OWNER, SEGMENT_TYPE ;
>
> Good luck,
> R. Schierbeek, DBA
> email: bytelife_at_worldaccess.nlWell if you cant logon as SYSTEM then you can select these values in
ALL_TABLES view .
-- Lord Raiden Thunder Deity It is not the weapon that makes a warrior ........ But it is the spirit by which he wields it ........ Your spirit is your true shield ................... O-SenseiReceived on Wed May 01 1996 - 00:00:00 CEST