473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Are DBADM privs really needed for db2expln?

Hello,

In a DB2 LUW v. 8.1.1.96, I have a hard time giving users access to the
db2expln utility.

Let's say that user FOOBAR needs to be able to run the db2expln utility. I
do:
- provide IMPLICIT_SCHEMA, CREATETAB, BINDADD, IMPLICIT_SCHEMA
to the user
- ask the user to run /home/db2inst1/sqllib/misc/EXPLAIN.DDL; this
seems to work well

Now, the user tries
db2expln -d dbname -stmtfile somefile.sql -terminal
and gets:

================================================== ===============
Error during VALUES for package check.

Message Text =
SQL0551N "FOOBAR" does not have the privilege to perform operation
"EXECUTE" on object "NULLID.SQLNAE01". SQLSTATE=42501
sqlcaid = SQLCA
sqlcabc = 136
sqlcode = -551
sqlstate = 42501
sqlerrml = 28
sqlerrmc = "FOOBAR", "EXECUTE", "NULLID.SQLNAE01"
sqlerrp = SQLRAEAC
sqlerrd0 = 0x8012006D = -2146303891
sqlerrd1 = 0x00000000 = 0
sqlerrd2 = 0x00000000 = 0
sqlerrd3 = 0x00000000 = 0
sqlerrd4 = 0x00000000 = 0
sqlerrd5 = 0x00000000 = 0
sqlwarn = ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '
================================================== ===============

If the user proceeds by working only in the command line processor
(EXPLAIN PLAN FOR ...), things work (no error messages; and stuff ends up
in the EXPLAIN_OPERATOR and EXPLAIN_STREAM tables.

Now, if
- I give the user DBADM privileges
- (s)he runs the "db2expln -help -database dbname" command
- I revoke the DBADM privileges from the user, making sure
that only CREATETAB, BINDADD remain,
then db2expln works fine for the user.

What am I missing? I assume that (temporary) DBADM privileges shouldn't be
needed to run db2expln?

--
Regards,
Troels Arvin <tr****@arvin.dk>
http://troels.arvin.dk/
Feb 12 '07 #1
1 3593
It looks like db2expln is expecting to use the SQLNAE01 package. The
error message indicates that the user doesn't have execute authority for
the package.

Try granting execute authority for the package to a user and see if that
solves the problem. If it does, then you'll need to work out a way for
all of the developers to have execute authority for it.

Phil Sherman
Troels Arvin wrote:
Hello,

In a DB2 LUW v. 8.1.1.96, I have a hard time giving users access to the
db2expln utility.

Let's say that user FOOBAR needs to be able to run the db2expln utility. I
do:
- provide IMPLICIT_SCHEMA, CREATETAB, BINDADD, IMPLICIT_SCHEMA
to the user
- ask the user to run /home/db2inst1/sqllib/misc/EXPLAIN.DDL; this
seems to work well

Now, the user tries
db2expln -d dbname -stmtfile somefile.sql -terminal
and gets:

================================================== ===============
Error during VALUES for package check.

Message Text =
SQL0551N "FOOBAR" does not have the privilege to perform operation
"EXECUTE" on object "NULLID.SQLNAE01". SQLSTATE=42501
sqlcaid = SQLCA
sqlcabc = 136
sqlcode = -551
sqlstate = 42501
sqlerrml = 28
sqlerrmc = "FOOBAR", "EXECUTE", "NULLID.SQLNAE01"
sqlerrp = SQLRAEAC
sqlerrd0 = 0x8012006D = -2146303891
sqlerrd1 = 0x00000000 = 0
sqlerrd2 = 0x00000000 = 0
sqlerrd3 = 0x00000000 = 0
sqlerrd4 = 0x00000000 = 0
sqlerrd5 = 0x00000000 = 0
sqlwarn = ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '
================================================== ===============

If the user proceeds by working only in the command line processor
(EXPLAIN PLAN FOR ...), things work (no error messages; and stuff ends up
in the EXPLAIN_OPERATOR and EXPLAIN_STREAM tables.

Now, if
- I give the user DBADM privileges
- (s)he runs the "db2expln -help -database dbname" command
- I revoke the DBADM privileges from the user, making sure
that only CREATETAB, BINDADD remain,
then db2expln works fine for the user.

What am I missing? I assume that (temporary) DBADM privileges shouldn't be
needed to run db2expln?
Feb 12 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Rob R. Ainscough | last post by:
This is more of a conceptual question: 1. More and more companies are using VPN's and locking out internet connectivity (for a host of reasons, security, productivity, etc.). 2. ASP.NET...
4
by: ezra epstein | last post by:
I've got a user with CREATEUSER privs. I've not granted that user and DB specific privs but it can do what it will with non-public schemas... Is there a user that can do SET SESSION AUTHORIZATION...
2
by: APAPF | last post by:
Hi, I'm trying to interpet a db2 explain. I'm trying to determine if the SQL is being executed as I expect/hope. The sql is generally: select key from table where key1=value and key2 >...
3
by: Terry | last post by:
Hi All, Im trying to run db2expln over some sql in order to find out why its so slow. I receive the following error message. LINE MESSAGES FOR DYNEXPLN.sqc ------ ...
12
by: dgk | last post by:
I'm planning on writing a fairly small app (VB2005) to be distributed via shareware that needs a single user database. I don't even think that SQL Server Express edition is needed since I think...
4
by: tuarek | last post by:
Hi all, Can you suggest any reference on analyzing db2expln results? Regards, Mehmet
1
by: jefftyzzer | last post by:
Colleagues: Can anyone tell me what the number to the right of "Index Prefetch: Eligible" designates in the output from db2expln, e.g., "Index Prefetch: Eligible 14409"? I see such a number...
3
by: JackBlack | last post by:
Hi, all. Still trying to track down what privileges are necessary to allow a Windows XP/Pro SP2+ (appropriate .Net framework installed) workstation to execute a stand-alone VB.Net (2k5)...
1
by: David Hearn | last post by:
(Apologies if this is not the appropriate group) I'm trying to use an external USRobotics USB modem (Model 5633B) in Vista - and talk to it via AT commands from my C# application (using VS2008 +...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.