Clive
Clive

Reputation: 71

Oracle SQL Developer How To Default To Other Users Tables?

In order to see all of the tables in our companies DB I have to go find the main sys account. Is there a way to default my connection so that it shows the other users tables?

Upvotes: 7

Views: 21244

Answers (6)

Jordi M.
Jordi M.

Reputation: 69

As Ram, I also do it with

alter session set current_schema = otheruser;

It works if you want to access to the tables of a particular user

Upvotes: 0

xarx
xarx

Reputation: 657

If you connect to (e.g.) DB2 using JDBC driver, you can use this syntax:

jdbc:db2://localhost:50000/WESBDB:currentSchema=WESB;

Not only that the schema WESB will be your current schema, but it will be also the default schema in the tree on the Connections tab.

Note: It seems that it works for DB2 only.

Upvotes: 0

Ram
Ram

Reputation: 2387

Think you don't want to repeated type otheruser.tablename in all your queries. If that is the case you want to run this

alter session set current_schema = otheruser;

Upvotes: 9

Doug Porter
Doug Porter

Reputation: 7897

Change your connect to login as the main Sys user. Otherwise like dpbradley says you will have to go find them under the Other Users node.

Upvotes: 0

dpbradley
dpbradley

Reputation: 11915

Any table that your connecting account has at least SELECT privileges on will show up in the "Other Users" node of the navigation tree. If the table does not show up there then it is a database permissions issue, not a SQL Developer configuration issue.

Upvotes: 8

René Nyffenegger
René Nyffenegger

Reputation: 40499

What do you mean by "see all of the tables"? Are you happy if you know they're there, or do you need to see their content. In the former case dba_tables should do. In the latter case it's a matter of the privileges assigned to you.

Upvotes: 0

Related Questions