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: Sandeep Dubey <sandeep.dubey_at_induscorp.com>
Date: Wed, 28 Jun 2000 15:47:12 -0400
Message-Id: <10542.110703@fatcity.com>


Well if you analyze your schema you can get all you want from user_tables in single query.

Sandeep

-----Original Message-----
From: Suhen Pather [mailto:PatherS5_at_telkom.co.za] Sent: Wednesday, June 28, 2000 2:57 PM
To: Multiple recipients of list ORACLE-L Subject: RE: sql query help

I think you have misunderstood me.
I can get a file with just the number of rows of all tables with the same query that you have.
But this however does not give information like table_name,owner. How can I put these requirements into your select query.

 I can get another file with information such as table_name,owner. What I have done is copied and pasted these 2 files (rows) and table_name,owner
information into one file.
This is however not a very feasible way of doing what I want.

So I would just like to know if I can execute a sql query that can give me this info.

Thanks for your help
$uhen

>>> Diane.Whitehead_at_palmerharvey.co.uk 06/28/00 06:09PM >>> 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).

-- 
Author: Diane Whitehead
  INET: Diane.Whitehead_at_palmerharvey.co.uk 

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).

-- 
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
Received on Wed Jun 28 2000 - 14:47:12 CDT

Original text of this message

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