Home » RDBMS Server » Server Administration » Tables and Table Counts
icon9.gif  Tables and Table Counts [message #109905] Tue, 01 March 2005 15:46 Go to next message
verynewtothis
Messages: 11
Registered: March 2005
Location: Washington DC Metro Area
Junior Member
I would like to start out by saying that I am very new to Oracle so please excuse my ignorance and my "simple" questions. My questions are with regard to an Oracle 8i db on an NT box.

1. How do I locate the tables in the database?
2. How do I obtain logical record counts for each table?
3. How do I obtain the data volume?
-Below is what I have so far for obtaining the data volume. Can I just do this from SQL Plus? Is dba_data_files an arbitrary name or will it apply to my db as well?

select sum(bytes)/1024/1024 "Meg" from dba_data_files;

4. Lastly, I tried logging into SQLPlus and I got denied. I have accounts for Oracle NT Admin, Oracle Web Admin and OAS Management. None of these worked for SQLPlus login.
Re: Tables and Table Counts [message #109924 is a reply to message #109905] Tue, 01 March 2005 21:55 Go to previous messageGo to next message
pgongloo
Messages: 8
Registered: February 2005
Junior Member
I think it would be easy for you if you used EM or some other equivalent tool. If you're using Oracle Database 10g, EM DB console is configured out of the box and you dont need to install it. Check the 2-day DBA Guide on details regarding how to use it..
-GP
Re: Tables and Table Counts [message #109963 is a reply to message #109924] Wed, 02 March 2005 07:09 Go to previous messageGo to next message
waveblue
Messages: 22
Registered: December 2004
Junior Member
Hello,

of course, OEM is very good but it's very useful to know tables of Oracle.
There is one of interesting views for what you want.

"DBA_TABLES".

connect you on sqlplus and tape "DESC DBA_TABLES".
it will give you all informations about this view.
Then, you can select all that you want with sql commands.


Waveblue.
icon14.gif  Re: Tables and Table Counts [message #109976 is a reply to message #109905] Wed, 02 March 2005 08:56 Go to previous message
dbalaji_oracle
Messages: 4
Registered: February 2005
Junior Member
1. How do I locate the tables in the database?
SQL> select table_name,owner,tablespace_name from dba_tables
order by owner ;

2. How do I obtain logical record counts for each table?
simplest is
select count(1) from table_name

3. How do I obtain the data volume?
SQL>select num_rows , avg_row_len ,table_name,num_rows*avg_row_len from dba_tables where table_name='PRMAEMP'

hope this works
DBAlaji
Previous Topic: ORA-600, "17113"
Next Topic: ORA-28527: Heterogeneous Services datatype mapping error
Goto Forum:
  


Current Time: Fri Jan 10 03:45:20 CST 2025