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


How to grant table privilege to a user in oracle

Posted on 2010-01-07
Medium Priority
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.

Question by:happylife1234
LVL 13

Expert Comment

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

Accepted Solution

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 and it seems to work as described

grant select on table to user;
LVL 15

Assisted Solution

by:Franck Pachot
Franck Pachot earned 1000 total points
ID: 26204312
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.

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