UTILITY -- Access Issue.



IBM's flagship relational database management system

UTILITY -- Access Issue.

Postby manojlives » Thu Jun 17, 2010 11:27 am

hi i am trying to run DB2 utility in REXX using the below code

Uid = "REPAIR32"
UTSTMT = "REPAIR SET TABLESPACE("DBNAME"."TSNAME")" ,
"NOCOPYPEND"
RetCode = 0
UTILITY = "REPAIR"
Address DSNREXX "EXECSQL" ,
"CALL SYSPROC.DSNUTILS(:UID,:RESTART," || ,
":UTSTMT," || ,
":RETCODE," || ,
":UTILITY," || ,
":RECDSN,:RECDEVT,:RECSPACE," || ,
":DISCDSN,:DISCDEVT,:DISCSPACE," || ,
":PNCHDSN,:PNCHDEVT,:PNCHSPACE," || ,
":COPYDSN1,:COPYDEVT1,:COPYSPACE1," || ,
":COPYDSN2,:COPYDEVT2,:COPYSPACE2," || ,
":RCPYDSN1,:RCPYDEVT1,:RCPYSPACE1," || ,
":RCPYDSN2,:RCPYDEVT2,:RCPYSPACE2," || ,
":WORKDSN1,:WORKDEVT1,:WORKSPACE1," || ,
":WORKDSN2,:WORKDEVT2,:WORKSPACE2," || ,
":MAPDSN,:MAPDEVT,:MAPSPACE," || ,
":ERRDSN,:ERRDEVT,:ERRSPACE," || ,
":FILTRDSN,:FILTRDEVT,:FILTRSPACE)"


But I am getting below Authorization Issue:

DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = REPAIR32
DSNU1044I DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I DSNUGUTC - REPAIR
DSNU650I -DB2D DSNUCBRS - SET TABLESPACE(XXXXXX.SSSSSSS) NOCOPYPEND
DSNU060I -DB2D DSNUGMAP - USER UUUUU NOT AUTHORIZED FOR REPAIR UTILITY ON DA
TABASE XXXXXX
DSNU012I DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=12


But if i Run the same Utility using DSNUTILB, I am able to run the UTIL
//REPAIR EXEC PGM=DSNUTILB,PARM='DB2A,REPAR23I'

Output:
DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = REPAR23I
DSNU1044I DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I DSNUGUTC - REPAIR
DSNU650I -DB2D DSNUCBRS - SET TABLESPACE XXXXXX.SSSSSS NOCOPYPEND
DSNU651I -DB2D DSNUCBRS - SET NOCOPYPEND OPERATION SUCCESSFUL
DSNU010I DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0


Can anyone help me why is it so , because i got the REXX code from IBM site and i had gone through the code , but not able to find why the authorization issue occurs. pls let me know if you need any more details on this.
manojlives
 
Posts: 37
Joined: Wed Dec 24, 2008 5:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: UTILITY -- Access Issue.

Postby dick scherrer » Fri Jun 18, 2010 1:04 am

Hello,

Suggest you talk with your database or security people.

I suspect that when you are trying to do this and it fails an unauthorized uid is being detected.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: UTILITY -- Access Issue.

Postby manojlives » Fri Jun 18, 2010 2:38 pm

Dick ,

Can you pls guide me to any Ibm manuals for DSNUTILS Util . Or guide me with any REXX Code to Run DB2 Utility.

Thanks
Manoj
manojlives
 
Posts: 37
Joined: Wed Dec 24, 2008 5:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: UTILITY -- Access Issue.

Postby dick scherrer » Fri Jun 18, 2010 11:04 pm

Hello,

Read here:
http://publibz.boulder.ibm.com/cgi-bin/ ... 10/3.17.52

There is no amount of utility or rexx knowledge that will help you. . .

Someone has to determine why your process/uid is not authorized. The manuals cannot help with this. Your dba and/or security people can.

This is the result of a "utility manual" search for dsnutils:
http://publibz.boulder.ibm.com/cgi-bin/ ... &rank=RANK
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: UTILITY -- Access Issue.

Postby manojlives » Mon Jun 21, 2010 4:04 pm

Dick,

One Doubt here is ,

I have Access to REPAIR Utility on the Database, Because i was able to run the UTIL using DSNUTILB .
But why i get a ACCESS ISSUE if i run the REPAIR Util on the same database using DSNUTILS.

And one more is that , i have access to DSNUTILS Util as well.

Further Details on the JOB used. Any small help on this will be of great help.

In the below Program in the link below , I changed below values and ran the job

Uid = "REPAIR32"
UTSTMT = "REPAIR SET TABLESPACE("DBNAME"."TSNAME")" ,
"NOCOPYPEND"
RetCode = 0
UTILITY = "REPAIR"

http://www.ibm.com/developerworks/exchange/servlet/KbServlet/download/230-102-188/CLDSNUTL.txt
manojlives
 
Posts: 37
Joined: Wed Dec 24, 2008 5:15 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post