Link to home
Start Free TrialLog in
Avatar of banumaran
banumaran

asked on

db2 privileges

hi

how do i grant execute permission for stored procedure in db2

db2> grant execute on schemaname.spname to user xyz

i am getting SQL0204N  "schema.spname" is an undefined name.  SQLSTATE=42704

db2 >grant execute on package schemaname.spname to user xyz

i am getting SQL0204N  "schema.spname" is an undefined name.  SQLSTATE=42704

db2 > select procname from syscat.procedures where procschema='schemaname'
i am able to see the procedure.

how do i grant execute (or any) permission on stored procedure to an user

thanks
banu
Avatar of Lowfatspread
Lowfatspread
Flag of United Kingdom of Great Britain and Northern Ireland image

try

Select 'Grant EXEC on "' concat ProcShema concat '"."' concat procname
 concat '" to XYZ ' from syscat.procedures
 where procshema='schemaname'
order by 1

is the USER before xyz required?

which OS & UDB version?
ASKER CERTIFIED SOLUTION
Avatar of ghp7000
ghp7000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial