IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Getting SQLCODE -908 When Executing Load Job


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prasun007

New User


Joined: 03 Jul 2009
Posts: 5
Location: pune

PostPosted: Wed Dec 15, 2010 9:53 pm
Reply with quote

I have droped one table and recreated the same and all of its corresponding indexes.

Now when trying to run a load job to load data, I am getting SQLCODE -908. It seems some authorization problem or rebind needed.
Quote:

-908
bind-type ERROR USING auth-id AUTHORITY. BIND, REBIND OR AUTO-REBIND OPERATION IS NOT ALLOWED

Explanation
For BIND and REBIND, the indicated authorization ID is not allowed to perform the indicated bind-type against a plan or package. An entry in the resource limit specification table (RLST) prohibits binding and rebinding by this authorization ID, or all authorization IDs. For AUTO-REBIND, the system parameter controlling AUTO-REBIND operations is set to disallow AUTO-REBIND.
bind-type
Type of bind operation (BIND, REBIND or AUTO-REBIND).
auth-id
Authorization ID of the invoker of the BIND subcommand or primary authorization ID of the invoker of the plan for AUTO-REBIND operations.
System action
The plan or package is not bound.

System programmer response
If the indicated authorization id should be allowed to bind, change the entry in the active RLST table. If AUTO-REBIND operations are disabled, rebind the package before reexecuting the package.

SQLSTATE
23510




So can anyone please help me to identify why I am getting this error? and Please let me know what is the solution.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Wed Dec 15, 2010 10:33 pm
Reply with quote

Is this a BMC or IBM utility? If so, it should be providing a message as well as a SQLCODE. If not, use DSNTIAR to create and format the message, and then write to sysout.
Back to top
View user's profile Send private message
prasun007

New User


Joined: 03 Jul 2009
Posts: 5
Location: pune

PostPosted: Wed Dec 15, 2010 10:43 pm
Reply with quote

It's an IBM utility. Actually I am not sure how to use DSNTIAR to create and format the message, and then write to sysout. Could you please give some reference or link?

Also please let me know the normal process to follow after dropping a table & recreating the same and its indexes. Do I need to issue the grant commands again? or all the authorization will be preserved as before?

Thanks
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Wed Dec 15, 2010 11:38 pm
Reply with quote

OK, in SYSPRINT for the load step and procstep you should find a message identified by the number DSNT408I. Following it should be the SQLCODE -908, and the message from your opening post with the lower-case variables replaced by actual values. Post that.

DSNTIAR will not be useful when using a utility, but in an application program it is invaluable. I include a PL/I invocation here; a COBOL version may be given by someone who has used the language in the current millennium.

Code:
OOPS:  PROC(WHY);                                                 
                                                                 
DCL WHY                            CHAR(*);                       
DCL DATA_LEN FIXED BIN(31) INIT(132);                             
DCL DATA_DIM FIXED BIN(31) INIT(10);                             
DCL 1 ERROR_MESSAGE AUTOMATIC,                                   
      3 ERROR_LEN    FIXED BIN(15) UNAL INIT((DATA_LEN*DATA_DIM)),
      3 ERROR_TEXT(DATA_DIM) CHAR(DATA_LEN);                     
                                                                 
CALL DSNTIAR ( SQLCA, ERROR_MESSAGE, DATA_LEN );                 
PUT SKIP EDIT (WHY) (A);                                         
                                                                 
DO I = 1 TO DATA_DIM;                                             
  PUT SKIP EDIT (ERROR_TEXT(I)) (A);                             
END;                                                             
                                                                 
END OOPS;                                                         


Grants need not be re-made after a table is dropped and re-created.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Dec 16, 2010 3:46 pm
Reply with quote

prasun007 wrote:
Do I need to issue the grant commands again? or all the authorization will be preserved as before?

grants are gone.

Its' very unlikely that you need to (auto-)rebind something when running a DB2 utility.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Thu Dec 16, 2010 3:47 pm
Reply with quote

Akatsukami wrote:
Grants need not be re-made after a table is dropped and re-created.

icon_eek.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Thu Dec 16, 2010 4:04 pm
Reply with quote

GuyC wrote:
Akatsukami wrote:
Grants need not be re-made after a table is dropped and re-created.

icon_eek.gif

Well, possibly there has been some messing about with our installation of DB2 (I can quote a couple of other instances), but I am 90% sure that this is the case. I will check when I get into the office in a few hours.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1787
Location: Bloomington, IL

PostPosted: Thu Dec 16, 2010 8:58 pm
Reply with quote

You are correct, Guy; it turns out that grant persistence is not part of standard DB2, but a "feature" of my site's scheme for allowing multiple copies of a DB2 data base on the development subsystems. Prasun, I apologize for giving you incorrect information.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Dec 16, 2010 10:15 pm
Reply with quote

Hello,

What can be done is to run a query (before DROPping the table(s)) that generates all of the grants which can then be applied after the DROP/CREATE. . .
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Dec 17, 2010 6:32 pm
Reply with quote

any decent change management Tool or Setup will take care of all this.
Back to top
View user's profile Send private message
prasun007

New User


Joined: 03 Jul 2009
Posts: 5
Location: pune

PostPosted: Wed Dec 22, 2010 10:38 pm
Reply with quote

Thanks for all the replies.. I also want to know After dropping and re creating a table and its corresponding indexes Is it necessary to execute runstat ? Since I am creating new indexes, RUNSTAT should be executed but my doubt is if DB2 retains the old statistics in it's catalog even after dropping the table.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Thu Dec 23, 2010 12:18 am
Reply with quote

Prasun007,

When you dropped the table, all the information regarding it is gone along with it from the DB2 Catalog.

If the table is populated by a load, include STATISTICS INDEX(ALL) UPDATE ALL keyword in the load utility.

If populated by a program, execute runstats after its execution.

Thanks,
Sushanth
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Executing DB2 SQL store procedure via... DB2 0
No new posts SQLCODE=-311 in Cobol SP-DB2. COBOL Programming 2
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts Load new table with Old unload - DB2 DB2 6
No new posts How to load to DB2 with column level ... DB2 6
Search our Forums:

Back to Top