How can I see my tables in SQL Developer? [duplicate] - sql

I am not sure why but I just installed SQLdeveloper 32 bit (3.0.0.4). When I click to expand the tables/views/indexes or etc it displays nothing at all!
But when I do the following:
SELECT owner, table_name
FROM dba_tables
I see the list of tables and I have read access to these tables since I can do a select * from anytable and data shows. Any thoughts?

The SQL Developer tree shows you what objects you own, not what objects you have access to. If you want to see the objects that you have access to that are owned by other users, you would need to navigate to the "Other Users" branch of the tree, then the user that owns the table, then the "Tables" branch.

Add select privilege to all_objects/user/ojects in the db user

Launch SQL Developer as administrator

Related

How can I list all tables existent in a Database Link (Oracle)?

Basically I have a Database link (Oracle) called mylink.domain, in this link we can access foundation information like name of them members and other general information.
I would like to list all table's name in this link but i don't know how to do that.
Thanks in advance
You can access the all_tables view through the dblink:
select owner, table_name
from all_tables#dblink
order by owner, table_name;
Selecting the content of ALL_TABLES dictionary view will list you all tables your user has access to. Generally, it is not always possible to get a list of tables you dont have permissions for - they just do not show up. If your user has the SELECT ANY DICTIONARY priviledge, you can select the content of DBA_TABLES, which will always list all tables existing in the database.
select table_name from all_tables#dblinkname;
This shows all tables your linked user has access to.
Where I got the answer from

in oracle SQL developer How do I display list of all tables from current user/schema

I m working in oracle SQL developer database where I want to display list of all tables from current user/schema
You see the list of tables as owned by the current schema user in the Tree view of the connection under "tables". If you login as sys, then you see sys owned (of course).
If you want to see the schema of a different user, you need to have select permissions on the tables (and maybe some more in SQL Developer). Then you can see the tables of the other schema under <Connection>/Other Users/<User>/Tables/*.
If you don't see tables there, then you need to check for Synonyms, global synonyms or views. Finally if none of them are showing the expected tables (and you are aure you logged into the correct instance and CDB) then there might be a different active default schema for your user active after logon (typical case of a logon trigger). In this case the statement from before applies: look under the user who owns them.
SQL Developer internally used the ALL_* and USER_ system views. For example your tables owned by you: select TABLE_NAME from user_tables. More complete description of that is here.

Getting all tables from an oracle database

I'm trying to retrieve a list of tables from an Oracle connection. I'm not very familiar with Oracle terminology and thus, having hard time finding the information I need.
Right now I can use Microsoft Access to connect via ODBC and it pops up with a "Link Tables" dialog that lists all tables, not just the ones I "own". None of the queries I've tried so far, give me this data.
I'm trying "SELECT * FROM all_tables" but that doesn't show me the right data.
ALL_TABLES will show you all the tables that you have access to SELECT from. DBA_TABLES will show you all the tables that exist in the database though you'll need an additional privilege grant to be able to query the DBA* data dictionary objects.
Try select * from all_tables, that should do what you want.
It can be.. (If user has dba role)
select * from dba_tables
SELECT owner, table_name
FROM all_tables
You can also try
SELECT * FROM USER_TABLES
It will return list of tables owned by your user.
SELECT * FROM TAB; that will show you all the table and views

SQL Server - Permission on a per table basis?

I have a .net where I only have read access to the SQL Server database. Is it possible for SQL Server to give me write access to just ONE of the tables in the database, and restrict me to read only for the rest of the database?
Use this TSQL script, if you need:
EXEC sp_addrolemember N'db_datareader', N'User1';
GRANT INSERT, UPDATE, SELECT ON
MyTable
TO User1 --for multiples, it's TO User1,User2
In SQL Server Management Studio, right-click the read-only user in database name|security|Users and select Properties.
Select "Securables" and click "Search...". In the popup select "All objects of the type..." and click OK. Select "Tables" in the next window and click OK.
Then back in the Securables window, for each table that the user may write to:
Click on the table, and in the Permissions window underneath, in the "Grant" column, select "Insert", "Select" and "Update".
Yes, yes it is.
Just grant yourself the ReadOnly role and give yourself explicit write permissions to the table in question.

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?
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