Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: dba script
I've done similar with ALL_TABLES.
You just have to have the rights to all of them.
Useful when you don't have the DBA's password.
Argosy
In article <83b3cu$44q$1_at_nnrp1.deja.com>,
Erik Cotsonas <cotsonas_at_my-deja.com> wrote:
> Save the following as a script and execute it through sqlplus. In the
> where clause specify the schemas for which you want to count tables
>
> [snip]
> set pagesize 0
> set linesize 1000
> set trimspool on
>
> SPOOL tblCounts.tmp
>
> select 'SELECT RPAD(''' || owner || '.' || table_name || ': '', 50) ||
> COUNT(*) FROM ' || owner || '.' || table_name || ';'
> from dba_tables
> where owner in ('SCHEMA1', 'SCHEMA2')
> order by owner, table_name;
>
> SPOOL off
>
> @tblCounts.tmp
>
> [snip]
>
> Erik
>
> In article <106d149e.911676ac_at_usw-ex0107-049.remarq.com>,
> narayan <narayan_raykarNOnaSPAM_at_engineer.com.invalid> wrote:
> > hi guys..
> > can u help me with a script that will
> > give me the
> > no of records in each table of each user within a database.
> >
> > i have 6 users and 151 tables for each user.
> > help me out on this
> > narayan
> >
> > * Sent from RemarQ http://www.remarq.com The Internet's Discussion
> Network *
> > The fastest and easiest way to search and participate in Usenet -
> Free!
> >
> >
>
> --
> Erik
> Consultant
> Saraswati Systems Corporation - (SSC)
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Dec 17 1999 - 11:06:49 CST
![]() |
![]() |