Link to home
Start Free TrialLog in
Avatar of Brant Snow
Brant Snow

asked on

oracle sql developer and users

So i have inherited a datawarehouse type project.  The tool that has been in use has been oracle sql developer.  The problem is that the main user has been assigned out to random marketing and sales people who log onto the database and run random sql reports that have been given to them.  They dont know sql they just copy and paste.  So i am trying to get away from that.  I have made new users and assigned them roles using the script below but when i make a connection i cant see any of the tables.  The database name is myData, so the default user of 'master' can see all the tables but any of the new users i make cant see them even though i am assigning (what i think should be the correct roles to them)

What am i doing wrong and or is there a way to copy exactly the user 'master' with all permissions etc but give it a different name and password
create user mikes identified by oprules default tablespace users temporary tablespace temp;

grant connect to mikes;
grant resource to mikes;
grant dba to mikes;

Open in new window

Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

NEVER grant DBA to random users!!!

Greate a role and grant individual select to that role.

Then grant that role to the new users.

You are missing the synonyms for the master tables.  Without them you need to qualify the tables: select * from master.table;
Avatar of Brant Snow

ASKER

So how do i qualify the tables?

say i have a table called orders

GRANT SELECT ON orders TO READ_ONLY_ROLE;

i have done this but its still not working when i assign this role to the user, like i said even if i assign dba to the user i still cant access the tables

so when i created the user below was i supposed to enter the database name where 'tablespace' exists.


create user mikes identified by oprules default tablespace users temporary tablespace temp;

I know its not best practices to assign out dba to anyone, but even if i could copy the master user which seems to have dba priveledges, my only other option RIGHT NOW is to give out the master user to everyone, at least i would prefer to have different users with dba rights than just one user that everyone is using.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial