Home » SQL & PL/SQL » SQL & PL/SQL » help needed
help needed [message #6719] Fri, 02 May 2003 10:51 Go to next message
shawlin
Messages: 25
Registered: April 2003
Junior Member
Hello,

This is the small procedure.
after creating a table i will create a synonym
and grant the same.I had written this simple
piece.I was reported an error saying insufficient
privileges.what's the reason for this error.
do anyone have some idea.

create or replace procedure pcGetTableName (tname in varchar2)
as
begin
execute immediate('create public synonym ' || tname || ' for ' || tname );
execute immediate('Grant all on ' || tname || ' to public' );
end;

Thanks and regards
shawlin
Re: help needed [message #6724 is a reply to message #6719] Fri, 02 May 2003 11:51 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
The owner of this procedure needs to have the 'create public synonym' grant directly, not through a role.

Re: help needed [message #6731 is a reply to message #6724] Fri, 02 May 2003 23:28 Go to previous messageGo to next message
shawlin
Messages: 25
Registered: April 2003
Junior Member
Hello barry,

I had set the role to none.still could not
run the procedure.I did not understand this.
how to give the privilege for running the
procedure.At the time of user creation mos
I had granted the connect,resource,dba
what else i had to do.BTW how to successfully
run this procedure.what a help.

thanks and regards
shawlin
Re: help needed [message #6745 is a reply to message #6731] Sun, 04 May 2003 18:57 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Do you understand that the owner of the procedure needs a direct grant in order to successfully execute this procedure?

SYSTEM>grant create public synonym to shawlin;
Previous Topic: like and quotes data URGENT !!
Next Topic: Where can I get an example of "sql compiler"?
Goto Forum:
  


Current Time: Fri Apr 19 00:48:15 CDT 2024