SQLPlus syntax for looking at an Oracle DB schema.

How do I check the Schema of an Oracle Db in SQLPlus?
strtnAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tschofiledCommented:
What exactly do you want to check?

Space available
Space used
extent sizes
number of extents
table names, other objects
object status
etc.....

All of this and more???

Tony
0
strtnAuthor Commented:
Trying to validate the differences between two different
versions of a third party Oracle DB.
0
vcdayaniCommented:
There are several views in the Oracle Dictionary that you can use to compare 2 schemas. These views are accessible from SQL*Plus. Example:

All objects in the database - ALL_OBJECTS
Tables - ALL_TABLES
Columns in a table - ALL_TAB_COLUMNS
Synonyms - ALL_SYNONYMS
Indexes - ALL_INDEXES
Columns in an index - ALL_IND_COLUMNS.

For more information on how the dictionary works, refer to the Oracle Documentation on dictionary views.

HTH
Vikram
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tschofiledCommented:
If you just want to check existance (or not) of objects, I would suggest :-

Create a database link between the two and run :

Select object_name from all_objects where owner ='<SCHEMA_OWNER_NAME>'
minus
Select object_name from all_objects@<DB_LINK_NAME> where owner ='<SCHEMA_OWNER_NAME>'
/

This will show all on one but not on the other. Then complete the opposite :-

Select object_name from all_objects@<DB_LINK_NAME> where owner ='<SCHEMA_OWNER_NAME>'
minus
Select object_name from all_objects where owner ='<SCHEMA_OWNER_NAME>'
/

Tony
0
anand_2000vCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: vcdayani {http:#8123427} & tschofiled {http:#8126901}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

anand_2000v
EE Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.