Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Create Oracle User to only have ability to create tables, triggers, functions etc in one tablespace

Posted on 2016-09-03
4
Medium Priority
?
57 Views
Last Modified: 2016-09-07
Please help me in creating an Oracle user that can only create Oracle objects in a single tablespace that can only view tables that are granted them in another tablespace within the same SID.
0
Comment
Question by:goldieretriever
[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
4 Comments
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 1000 total points
ID: 41783584
Functions, procedures, packages, triggers, views, etc. are created in the SYSTEM tablespace.  There is no way around that.  You cannot control where Oracle stores code.

If you want a user to only create objects in one tablespace, then only give them quota in that one tablespace.  Unless they have a role that has been granted unlimited tablespace or it is granted to public, that works just fine.

You cannot grant privileges based on a tablespace.  You can generate a script or statements that would do that, but there are no tablespace privileges.  Something like this:
SELECT 'grant select on ' 
       || owner 
       || '.' 
       || table_name 
       || ' to <newuser>;' 
FROM   dba_tables 
WHERE  tablespace_name = '<ts>'; 

Open in new window

Replace <newuser> with the username and <ts> with the tablespace.  That will generate a list of SQL statements, then just run them.
0
 
LVL 38

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 1000 total points
ID: 41783597
after you have read and understood the security guide for assigning privileges
you will understand that, even with the latest version, that's not possible

http://docs.oracle.com/cd/E11882_01/server.112/e10575/tdpsg_privileges.htm#TDPSG30000
0
 
LVL 35

Accepted Solution

by:
johnsone earned 1000 total points
ID: 41783612
How is 11.2 the latest version?  If you are going to say read the latest version of the doc, at least post a link to the latest version.  This would be the latest documentation version of the same section of documentation.

http://docs.oracle.com/database/121/TDPSG/GUID-800F33CF-26E2-4246-86D5-7DD5B3B7B2ED.htm#TDPSG30000
0
 

Author Closing Comment

by:goldieretriever
ID: 41788301
Thank you for your help - the Oracle Security guide will be a great asset for me in the future
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
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 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.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

722 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