开发者

Oracle SQL Developer How To Default To Other Users Tables?

开发者 https://www.devze.com 2022-12-10 15:04 出处:网络
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 table开发者_运维技巧s?Any table t

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 table开发者_运维技巧s?


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.


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;


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.


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.


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号