Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

oracle sql developer and users

Posted on 2011-02-21
3
Medium Priority
?
666 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

636 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