[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to grant table privilege to a user in oracle

Posted on 2010-01-07
3
Medium Priority
?
737 Views
Last Modified: 2013-12-18
I need to grant lock table table_name in share update mode privilege to a user in oracle. How do I do that. I want to grant the privilege to only one table.

Thanks
0
Comment
Question by:happylife1234
3 Comments
 
LVL 13

Expert Comment

by:sameer2010
ID: 26202590
Grant lock any table
to user_id
with admin option;
0
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1000 total points
ID: 26202923
>>grant the privilege to only one table

The above grant will allow locks to ANY table (you also probably don't want to admin option).  Per the docs all you need to do is grant select.  This automatically grants 'lock'.

--11g docs but I tested in in 10.2.0.3 and it seems to work as described
http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_9013.htm#SQLRF01603

grant select on table to user;
0
 
LVL 15

Assisted Solution

by:Franck Pachot
Franck Pachot earned 1000 total points
ID: 26204312
Hi,
If you want something more restrictive than wwhat can be doen with grant command, you can create a stored procedure with the required action (lock table...) and only grant execution on that procedure.
Why do you need to do that ? maybe there is another solution.
Regards,
Franck.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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 article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
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.
Via a live example, show how to take different types of Oracle backups using RMAN.

829 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