Home » SQL & PL/SQL » SQL & PL/SQL » How to use package dbms_sqlhash without privileges?
How to use package dbms_sqlhash without privileges? [message #634270] Fri, 06 March 2015 17:39 Go to next message
Adam Brave
Messages: 12
Registered: March 2015
Location: Lisboa
Junior Member
I need to use the package dbms_sqlhash with the function GETHASH but I'm getting some errors related to privileges or permissions (My error is:"identifier 'DBMS_SQLHASH' must be declared").

It seems that for these cases it can be use some sql keywords/ functions like the "authid current_user" which allows one to get access to this kind of packages. I've tried to use it with PL-SQL but I'm not having success. Can someone give me examples of how get access to this package?
Re: How to use package dbms_sqlhash without privileges? [message #634271 is a reply to message #634270] Fri, 06 March 2015 17:46 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and read http://www.orafaq.com/forum/t/174502/

>I need to use the package dbms_sqlhash
Results for dbms_sqlhash
No results found.

please post URL to some Oracle documentation for whatever package you need assistance with.
GOOGLE is your friend
Re: How to use package dbms_sqlhash without privileges? [message #634273 is a reply to message #634271] Fri, 06 March 2015 18:27 Go to previous messageGo to next message
Adam Brave
Messages: 12
Registered: March 2015
Location: Lisboa
Junior Member
http://docs.oracle.com/cd/B19306_01/network.102/b14266/appendixb.htm#CHDGHCAE
Re: How to use package dbms_sqlhash without privileges? [message #634275 is a reply to message #634273] Fri, 06 March 2015 19:22 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SQL> SELECT SYS.DBMS_SQLHASH.GETHASH ('SELECT * FROM SYS.DBA_USERS ORDER BY USER_ID', 3) sh1_dba_user_hash FROM DUAL;

SH1_DBA_USER_HASH
--------------------------------------------------------------------------------
3A5AF92F5F5A27CD6B81BF47C260018E47ED9957

Re: How to use package dbms_sqlhash without privileges? [message #634290 is a reply to message #634270] Sat, 07 March 2015 01:48 Go to previous message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
By default, no-one has any privileges on DBMS_SQLHASH:
orclz>
orclz> select grantee from dba_tab_privs where table_name='DBMS_SQLHASH';

no rows selected

orclz>

so you'll have to ask your DBA to grant you EXECUTE on it.
Previous Topic: datatype conversion --- INTERVAL DAY(9) TO SECOND(6) ---> HH24:MI
Next Topic: rowid and index
Goto Forum:
  


Current Time: Wed May 01 16:14:03 CDT 2024