Sponsored Content
Full Discussion: Grant privileges in Oracle
Top Forums Programming Grant privileges in Oracle Post 302369366 by Scott on Saturday 7th of November 2009 07:28:37 PM
Old 11-07-2009
Hi.

What do you mean by:
Quote:
i give the privileges as "select on" to user1
Select on what?

Who does the table belong to? If it belongs to a different user (schema) then the owner should grant you select.

i.e.
Code:
SQL> show user
USER is "USER12"
SQL> select * from scott.emp;
select * from scott.emp
                    *
ERROR at line 1:
ORA-00942: table or view does not exist

SQL> conn scott/tiger
Connected.
SQL> grant select on emp to user12;

Grant succeeded.

SQL> conn user12/user12
Connected.
SQL> select count(1) from scott.emp;

  COUNT(1)
----------
        14

SQL> show user
USER is "USER12"

SQL> select grantor, grantee, table_name from user_tab_privs;

GRANTOR                        GRANTEE                        TABLE_NAME
------------------------------ ------------------------------ ------------------------------
SCOTT                          USER12                         EMP


SQL> select view_name from all_views where view_name like '%PRIV%' order by 1;
...
...

There's a bunch of data dictionary views which can give you the info you're after.

Catalog Views / Data Dictionary Views
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

MySQL GRANT permission.

Hi, I'm one of a server administrators. I've the linux root account but I don't know the root password of MySQL (Server version: 5.0.32). I want to GRANT ALL PRIVILEGES to my MySQL account without changing the MySQL's root password. How can I do so? (0 Replies)
Discussion started by: mjdousti
0 Replies

2. Linux

grant root privileges to ordinary user

Hi, Is it possible to grant root privileges to an ordinary user? Other than 'sudo', is there some way under Users/Groups configuration? I want ordinary user to be able to mount, umount and use command mt. /Brendan (4 Replies)
Discussion started by: brendan76
4 Replies

3. UNIX and Linux Applications

grant usage to users listed in a file

hi, i'm trying to grant usage to multiple users whose ids are in a file. i thought that i could put the mysql code within a while loop, but that's not working for me: while read user; do userid=$user passwd="changeme" query="grant usage on mysql.USERS.* to $userid... (2 Replies)
Discussion started by: ankimo
2 Replies

4. Solaris

Grant print related privileges

Afternoon everyone, I would want to ask that how/what privileges i should grant to a new user so that the user can clear /disable printing job queue? Solaris OS: 5.9 Thanks. :b: (4 Replies)
Discussion started by: beginningDBA
4 Replies

5. UNIX for Dummies Questions & Answers

grant sudo permission

Hi all, I have to grant sudo permission to a user. I have searched online and find that /etc/sudoers file needs to be changed with visudo command. As i am new to linux, this is not clear to me. Can anybody take an example and show me how exactly this done. Thanks in advance! (2 Replies)
Discussion started by: lramsb4u
2 Replies

6. UNIX for Advanced & Expert Users

Unix privileges for Oracle user

Hi I have an issue I am currently trying to execute Unix Commands through a Java Source within Oracle 10g I am currently running Oracle on a Unix Sun Solaris Platform. I am executing the Java Source through a PL/SQL and on SQL Navigator it is saying that it has been executed. I'm... (2 Replies)
Discussion started by: CRL88
2 Replies

7. Shell Programming and Scripting

How can i prepare grant staement with 2 files ?

---file1 ( tables A B C D E F ... ... Z ---file2 Joe Bob Mary Sally Fred Elmer David (1 Reply)
Discussion started by: rocking77
1 Replies

8. UNIX for Beginners Questions & Answers

Solaris, grant user to kill another process

the task is grant user1 to kill another (for example user2) process. My steps: by root: usermod -P "Process Management" user1 login user1 user1@server (~) pfexec kill <PID> the result is: ksh: <PID>: not found or user1@server (~) pfexec pkill <PID> the result: nothing happens, still... (0 Replies)
Discussion started by: dsyberia
0 Replies
newtask(1)							   User Commands							newtask(1)

NAME
newtask - create new task and optionally change project SYNOPSIS
newtask [-p project] [-v] [-c pid | [-Fl] [command...]] DESCRIPTION
The newtask command executes the user's default shell or a specified command, placing the executed command in a new task owned by the spec- ified project. The user's default shell is the one specified in the passwd database, and is determined using getpwnam(). Alternatively, newtask can be used to cause an already running process to enter a newly created task. A project for the new task can also be specified in this form of the command. This might be desirable for processes that are mission critical and cannot be restarted in order to put them into a new project. In the case that extended accounting is active, the newtask command can additionally cause the creation of a task accounting record marking the completion of the preceding system task. OPTIONS
The following options are supported: -c pid Cause a running process to enter a newly created task. A project for the new task can also be specified using the -p option. The invoking user must either own the process or have super-user privileges. If the project is being changed, the process owner must be a member of the specified project, or the invoking user must have super-user privileges. When the project is changed for a running process, its pool binding as well as resource controls are modi- fied to match the configuration of the new project. Controls not explicitly specified in the project entry is preserved. This option is incompatible with the -F and -l options. -F Creates a finalized task, within which further newtask or settaskid(2) invocations would fail. Finalized tasks can be useful at some sites for simplifying the attribution of resource consumption. -l Changes the environment to what would be expected if the user actually logged in again as a member of the new project. -p Changes the project ID of the new task to that associated with the given project name. The invoking user must be a valid member of the requested project, or must have super-user privileges, for the command to succeed. If no project name is specified, the new task is started in the invoking user's current project. -v Verbose: displays the system task id as the new system task is begun. OPERANDS
The following operands are supported: project The project to which resource usage by the created task should be charged. The requested project must be defined in the project databases defined in nsswitch.conf(4). command The command to be executed as the new task. If no command is given, the user's login shell is invoked. (If the login shell is not available, /bin/sh is invoked.) EXAMPLES
Example 1: Creating a New Shell The following example creates a new shell in the canada project, displaying the task id: example$ id -p uid=565(gh) gid=10(staff) projid=10(default) example$ newtask -v -p canada 38 example$ id -p uid=565(gh) gid=10(staff) projid=82(canada) Example 2: Running the date Command The following example runs the date command in the russia project: example$ newtask -p russia date Tue Aug 31 11:12:10 PDT 1999 Example 3: Changing the Project of an Existing Process The following example changes the project of the existing process with a pid of 9999 to russia: example$ newtask -c 9999 -p russia EXIT STATUS
The following exit values are returned: 0 Successful execution. 1 A fatal error occurred during execution. 2 Invalid command line options were specified. FILES
/etc/project Local database containing valid project definitions for this machine. /proc/pid/* Process information and control files. ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
proc(1), id(1M), poolbind(1M), execvp(2), setrctl(2), settaskid(2), setproject(3PROJECT), nsswitch.conf(4), proc(4), project(4), attributes(5) SunOS 5.10 17 Nov 2004 newtask(1)
All times are GMT -4. The time now is 08:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy