Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

show database, show all_tables ?

Posted on 2006-11-28
5
Medium Priority
?
5,390 Views
Last Modified: 2008-01-09
hi guys, please view my screenshot :

http://img143.imageshack.us/img143/2308/sqldatamh8.jpg

this is capture from sql 2000, we can see the databases, tables easily in one view.

But what if I am using oracle 8i and oracle 10g ? how do I view it in sqlplus ? what is the command?

when i do a show database or show databases,  it say unknow show option database/databases.

i want to view all databases in one glance and the tables inside the database in one glance.

if i am in a command prompt, i wont know wat databases are running.

if i am in a command prompt,  i wont know wat tables are inside the database.

I want to learn the command.

THanks.


Thanks.


0
Comment
Question by:binary_1001010
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 28

Accepted Solution

by:
Naveen Kumar earned 500 total points
ID: 18034030
to see the database name :

select name from v$database; -- but for this you need privileges to access v$ data dictionary views.

select global_name from global_name;

to see the list of tables:

select * from cat ; -- from catalogue ..this gives a list of tables/views/synonyms etc which you have in your schema
select * from tab; -- this will give only tables

actually you have user_tables , all_tables , dba_tables which you can query accordingly. You have these views similarly for other objects like indexes which is user_indexes,all_indexes...,user_triggers,...user_synonyms..., user_views...

first give

desc emp  -- this is to see the structe of any table

Thanks


0
 
LVL 7

Expert Comment

by:Daniel Stanley
ID: 18034056
sqlplus is not a graphical tool, it's a command line tool. (PERIOD) if you want graphical representation of instances and database objects use the "Oracle Enterprise Manager Console" provided with 8i, or download a copy of Oracle Sql Developer and use it.

(sql developer)
http://www.oracle.com/technology/products/database/sql_developer/index.html

(OEM)
start menu -> programs -> Oracle - OraHome8i -> Enterprise Manager Console

or from command line.

C:> oemapp console

to do so make sure the Oracle home is in your path.

good luck,
daniels
0
 
LVL 17

Expert Comment

by:NicksonKoh
ID: 18034089
Hi binary_1001010,

For Oracle 8i, there is the DBA Studio. In Oracle 10g, I think they change it to Enterprise Manager. You should be able to find this tool when u install Oracle. These will be choice that I use to manage the database objects ONLY when there is no TOAD installed on the machine otherwise, usually I would use TOAD which is much faster and more user friendly to use.

Cheers
Nickson
0
 
LVL 9

Author Comment

by:binary_1001010
ID: 18034243
thanks nav_kum_v, btw  desc emp  does not work.
0
 
LVL 7

Expert Comment

by:Daniel Stanley
ID: 18034800
try "sql> desc scott.emp" if you are logged in as a user other than "scott". if logged in as scott then "sql> desc emp" will work if table does exist.

regards,
daniels
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question