Solved

oracle sql developer and users

Posted on 2011-02-21
3
662 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 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34946156
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
ID: 34946917
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 77

Accepted Solution

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

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

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

821 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