Oracle Tables Visible to Other Users

oracle

I have an Oracle database that has one user that has access to everything. This was fine when we only had one user working on the database. But now that we have more users we want to tighten up security and have different users.

I created each user, gave them DBA access, and they are part of the same tablespace. When the user logs in, there are no tables visible to the users. I've tried to GRANT SELECT to a test table and still nothing. I tired to set up a role for the user and still nothing. Am I missing something or if the user is not the owner of the table other users cannot see the tables or run queries?

Best Answer

It's hard to guess what's going on on your system without code snipets to evaluate, but it seems you're not using the fully qualified table name [schema name].[table name]. If you don't want to use the fully qualified table name, you may create PUBLIC SYNONYMS. Ex from Oracle documentation:

CREATE PUBLIC SYNONYM offices 
   FOR hr.offices;

Having said that, if you are granting DBA privileges to all users, you're not tightening up security at all! If you only want them to query some tables, grant them CONNECT and SELECT privileges. If you're felling really lazy, grant them SELECT ANY TABLE privilege, but don't grant them DBA! DBA privileges give users a lot more power than to just query tables. They'll be able to change system parameters, drop or alter any objects etc etc.