Solved

oracle sql developer and users

Posted on 2011-02-21
3
660 Views
Last Modified: 2013-12-12
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

0
Comment
Question by:Brant Snow
  • 2
3 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
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;
0
 
LVL 4

Author Comment

by:Brant Snow
Comment Utility
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.
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
Comment Utility
Either add the schema name: select * from master.orders;

or synonyms:
Create synonym mikes.orders for master.orders;
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now