Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: sql query help

RE: sql query help

From: Diane Whitehead <Diane.Whitehead_at_palmerharvey.co.uk>
Date: Wed, 28 Jun 2000 15:53:49 +0100
Message-Id: <10542.110667@fatcity.com>


The only suggestion I can give you is to use sql to generate sql which you then run
ie
select 'select count(*) from '||owner||'.'||tablename;'|| from dba_tables;

This will give a number of select statements. If you then set echo on and run this list you should get the info you need in one file
> -----Original Message-----
> From: Suhen Pather [SMTP:pathers5_at_telkom.co.za]
> Sent: Wednesday, June 28, 2000 4:25 PM
> To: Multiple recipients of list ORACLE-L
> Subject: sql query help
>
> Hi there Oracle Boffins
>
> I am trying to create a script that can give me the following information.
>
> All tables in the database (for specified users) together with the number
> of rows in each table,size in bytes.
> We are using the Rule based optimizer so I cannot use the row count from
> the dictionary views.
>
> I can achieve the row count from 1 query and the other information from
> another query.
>
> I can achieve all of the information but I cannot put this into one query.
>
> I will have to cut and paste the information if I use 2 different queries
> to get the desired information.
> This is however not very efficient and could be a bit misleading.
>
> Any ideas
>
> TIA
>
> $uhen
> 0racle DBA
>
>
> --
> Author: Suhen Pather
> INET: pathers5_at_telkom.co.za
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Wed Jun 28 2000 - 09:53:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US