I had a user that was getting the following ora error message while creating a table in another user's schema:ORA-01031 Insufficient privileges
When i looked it up this is what oracle suggests:
01031, 00000, "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.
// When Trusted Oracle is configure in DBMS MAC, this error may occur
// if the user was granted the necessary privilege at a higher label
// than the current login.
// *Action: Ask the database administrator to perform the operation or grant
// the required privileges.
// For Trusted Oracle users getting this error although granted the
// the appropriate privilege at a higher label, ask the database
// administrator to regrant the privilege at the appropriate label.
However, this didn't solve my problem. I gave the user the following privileges and still didn't work:
grant select any table to <user>;
grant drop any table to <user>;
grant create any table to <user>;
After doing this, still the user was having issues when logging in through his application via odbc connection.
After many tries, and research I granted all to the tables he was using :
grant all on <schema>.<table_name> to <user>;
and then also did the following:
grant references on <schema>.<table_name> to <user>;
That did the trick. I hope this helps you out as well.
If that didn't work my last resort was to grant dba to the user. Which I didn't want to do because that was just way too much privilege for him.
Thanks,