Quantcast
Channel: Oracle Bloggers
Viewing all articles
Browse latest Browse all 19780

Why Can’t I See My Tables in Oracle SQL Developer?

$
0
0

Because you don’t have any tables.

I hate to be the bearer of bad news, but you don’t actually ‘OWN’ any tables. What you mostly likely DO have are SYNONYMS that point to tables in a application schema. When you log on to Oracle, you are seeing this:

Your Table List is Empty!

Your Table List is Empty!

The solution is simple!

Enable Synonym Support in the Tables Filter Dialog

Mouse-right click on your tables tree node, and select ‘Apply Filter…’

Treat Local Synonyms for Tables as Tables

Treat Local Synonyms for Tables as Tables

With this checked, bam!

Oh my sweet, sweet darlings, how I missed you.

Oh my sweet, sweet darlings, how I missed you.

Note: This is also available for views.

Still Don’t Believe Me?

Trust, but verify. Great words to live by. And if you’re reading a blog post on a technical subject, I would advise you doubt and double-check.

Let’s query the USER_OBJECTS view!

I told you so!

I told you so!

The cool part is that SQL Developer is going to treat those synonym objects as tables now that they’re in the Tables node. So all of the Table goodies are available to you, including context menus and drag-and-drop mouse operations.

Drag and drop your synonyms to get INSERT statements, or access the table context menus

Drag and drop your synonyms to get INSERT statements, or access the table context menus

But Why Were We Lied To?

I think lying is a bit of a stretch. Perhaps you were using other tools that treat synonyms as tables and you just assumed the tables you saw were yours?

It’s a pretty common security scheme to create a user with very low privilege levels and then only grant SELECT on objects they should see or to create local synonyms to objects they need to access.

The ‘trick’ is just to remember to ask SQL Developer to show you SYNONYMS under your TABLES node. And I should clarify, it will only show synonyms that resolve to tables, not all types of objects.


Viewing all articles
Browse latest Browse all 19780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>