Why does a SQL -551 occur on a call to stored procedure PTI.RMRTPE using RC/Migrator
search cancel

Why does a SQL -551 occur on a call to stored procedure PTI.RMRTPE using RC/Migrator

book

Article ID: 192267

calendar_today

Updated On:

Products

RC/Migrator for DB2 for z/OS RC Compare for DB2 for z/OS

Issue/Introduction

 
When executing a RC/Migrator for Db2 for z/OS (RCM) strategy with sequence objects, the following error occurs:

AUTH xxxxxxx                                                           
RETCODE =     0                                                         
                                                                        
.CALL PROCEDURE PTI.RMRTPE                                              
.DATA                                                                   
GETIDCOLS xxxxxxx                           
.ENDDATA                                                                
 BPA0052E: STORED PROCEDURE CALL ON ssid FAILED, SQL ERROR: -0551.      
 BPA0077E: xxxxxxx CALL PTI.RMRTPE                                      
 BPA0012E: DB2 SQL/DDL ERROR HAS OCCURRED - ROLLBACK ISSUED.            
RETCODE =    16

Resolution

Information on stored procedures RMRTPE and RMRSSP can be found in hlq.CDBASAMP(RCMCUST)
 
RMRTPE:

The RC/Migrator Table Process Exit DB2 Stored Procedure can be installed to support resetting the identity column sequences for tables involved in alter, compare,
or in-place migration strategies.     RMRTPE is a REXX procedure in the installation hlq.CLIST library.    RMRTPE is called using the Batch Processor .CALL PROCEDURE function
before and after any table is unloaded, dropped, recreated, and   reloaded as part of one of these strategy types. The procedure sets the RESTARTWITH value for the identity
column of a recreated table to the original MAXASSIGNED value (+1) after it is loaded.


SQLCODE -0551 is an authority issue, below is from DB2 for z/OS: Codes:

If this error occurs during invocation of a routine, the authorization  ID auth-id does not have the EXECUTE privilege on any candidate routine
       in the SQL path. The variable for object-name is the name of a candidate  routine in the SQL path.