Home » SQL & PL/SQL » SQL & PL/SQL » insufficient privileges message
insufficient privileges message [message #183916] Mon, 24 July 2006 06:42 Go to next message
khosravi
Messages: 68
Registered: April 2006
Member
hello

i have three users scott,ali,reza in oracle database
scott has emp table and ali has t1 table
ali has not select privilage on scott.emp table
and reza has not select privilage on ali.t1 table
when i login by ali and run this script "select * from scott.emp;"
i will receive this error message
"ERROR at line 1: ORA-01031: insufficient privileges"
but when i login by reza and run this script
"select * from ali.t1;" i will recieve this error message
"ERROR at line 1: table or view does not exist"

do you know why i recieve two kind error mesages while ali has not select privilage on scott.emp
and reza has not select privilage on ali.t1 too?

thanks

Re: insufficient privileges message [message #183923 is a reply to message #183916] Mon, 24 July 2006 07:01 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Here's what Oracle says about it:
Quote:

ORA-00942 table or view does not exist

Cause: The table or view entered does not exist, a synonym that is not allowed here was used, or a view was referenced where a table is required. Existing user tables and views can be listed by querying the data dictionary. Certain privileges may be required to access the table. If an application returned this message, the table the application tried to access does not exist in the database, or the application does not have access to it.

Action: Check each of the following:

the spelling of the table or view name.

that a view is not specified where a table is required.

that an existing table or view name exists.

Contact the database administrator if the table needs to be created or if user or application privileges are required to access the table.

Also, if attempting to access a table or view in another schema, make certain the correct schema is referenced and that access to the object is granted.
Quote:

ORA-01031 insufficient privileges

Cause: An attempt was made to change the current username or password without the appropriate privilege. This error also occurs if attempting to install a database without the necessary operating system privileges.

Action: Ask the database administrator to perform the operation or grant the required privileges.
Compare those causes and possible actions and see which one covers your situation.

ORA-00942: does user "reza" have a synonym (or a view) named "t1" which is now invalid (but worked once, when underlying table existed)?
Re: insufficient privileges message [message #183929 is a reply to message #183923] Mon, 24 July 2006 07:42 Go to previous messageGo to next message
khosravi
Messages: 68
Registered: April 2006
Member
no ali.t1 exists
and spelling of the table is true
even i run "select * from scott.emp;" in reza login
i will receive "ERROR at line 1: table or view does not exist" message (reza has no select privilege on scott.emp)
while when i run "select * from scott.emp;" in ali login
i will receive "ERROR at line 1: ORA-01031: insufficient privileges" message

I want know why while "ali" and "reza" either have not select privilege on scott.emp table they receive tow kind message
Re: insufficient privileges message [message #183939 is a reply to message #183929] Mon, 24 July 2006 08:18 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Can you just check that the REZA login is actually in the same database as the other two schemas.

Then can you cut and paste from sql a series of commands and results showing you connecting as SCOTT, showing that the table exists, then connecting as ALI and attempting to select from the table, then connecting as REZA and attempting to select from the table.

Don't edit this before you paste is, and please paste it inside CODE tags.

Not that we don't believe you, but there's something a bit fishy going on here - your SELECTs from REZA don't seem to have an ORA error number
icon14.gif  Re: insufficient privileges message [message #183964 is a reply to message #183939] Mon, 24 July 2006 09:25 Go to previous message
khosravi
Messages: 68
Registered: April 2006
Member
thank all of you
i find out the reason
user ALI has insert or update or delete privilege on scott.emp
but ali and reza neither don't have select privilege on scott.emp

[Updated on: Mon, 24 July 2006 09:27]

Report message to a moderator

Previous Topic: partition in a table should get created automatically
Next Topic: Clear Temporary Tablespace
Goto Forum:
  


Current Time: Thu Dec 08 22:16:45 CST 2016

Total time taken to generate the page: 0.12031 seconds