i'm using db2 9.7 on linux and created a user "db2fee1i" to be a instance owner. I restored a database, but even being SYSADM i only can connect to database. I need to give DATAACCESS to another user, and even doing a query appears…
The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it
returned: SQL0551N "DB2FEE1I" does not have the required authorization
or privilege to perform operation "EXECUTE" on object
"NULLID.SQLC2H23". SQLSTATE=42501
I tryed everything but nothing solves my problem, now i found "SECADM" that can give me the "privileges to execute" into database, but i dont know how to do it. Someone can help me?!
Best Answer
Under 9.7, whichever ID creates the database is automatically granted
DBADM WITH DATAACCESS WITH ACCESSCTRL
andSECADM
.So you should be able to log in to the databases with that ID to perform the grants you need. If this came from another environment, you may have to create the ID locally in order to get into the database. Only an ID with
SECADM
can grantSECADM
to another ID. And also with 9.7, you cannotGRANT
to orREVOKE
from yourself.Now...as to your problem.....when you do not have
EXECUTE
on aNULLID
package, then you may either need to perform aBIND
of the appropriate bind file, or grantEXECUTE
on that package. If it is a system package that pretty much everyone can use, you can alwaysGRANT EXECUTE ON PACKAGE NULLID.SQLC2H23 TO PUBLIC
.