Q
Problem solve Get help with specific problems with your technologies, process and projects.

"Table or view does not exist" error with DESC command

On one of the production databases, when I select table_name from dba_tables I get names of 372 tables. But when I use Desc command on most of those tables, I get an error message, "Table or view does not exist."

Hello Brian,
I really liked your article "Grow Your DBA Career." Thanks so much for that. I am a mid-level DBA and still have to learn a lot. I have a question: On one of the production databases, when I select table_name from dba_tables I get names of 372 tables. But when I use DESC command on most of those tables, I get an error message, "Table or view does not exist." Can you please tell me what structures those supposed table names would be?
DBA_TABLES shows you all tables in the database. If you issue "DESC table_name" in SQL*Plus, Oracle assumes that this table is owned by the current user. Chances are good that the table is owned by a different user, which is why Oracle is telling you that the table does not exist (in your schema). So you'll have to instruct Oracle to look for the table in a different schema. This is done with "schema dot" notation. You prepend the table name with the schema name and a period. So your describe command would look like "DESC owner.table_name". The DBA_TABLES view includes a column called OWNER so that you can determine who owns the table.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close