Technote

(troubleshooting)
DB2 stored procedures were not created during database creation
Problem(Abstract)
You notice the stored procedures are not always created properly when you create a new DB2 database for use in the development environment, . When you examine the <WCDE_installdir>/logs/createdb.db2.log file, you see an error message similar to the following :

DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0440N No authorized routine named "CURRENTVERSION" of type "PROCEDURE"
having compatible arguments was found. LINE NUMBER=81. SQLSTATE=42884

This situation occurs only when the database is being created using a DBA user ID that is not the same as the DB user ID. For example, creating a database using the following command will result in this error:

setdbtype db2 c:\sqllib mall db2admin XXXX db2user XXXX createdb
Cause The creation script does not properly handle the different user IDs when creating a stored procedure Resolving the problem There are two solutions to this problem:

  1. Create a new database using the same user ID for both the DBA and the DB user IDs. From the example above, a new create command would be:

    setdbtype db2 c:\sqllib mall db2admin XXXX db2admin XXXX createdb

  2. Add the missing stored procedures to the existing database. Using the WCDE_installdir/bin/createsp.db2.bat script, it is possible to create the missing stored procedures. The command takes the following usage:

    createsp.db2.bat <db name> <db admin> <db admin password> <db user>

    Using the example above, this script can be run as follows:

    createsp.db2.bat mall db2admin XXXX db2user

    When running this script, it is perfectly normal to see error messages indicating that procedures already exist. This is because some procedures were successfully created at database creation time.

Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Developer Express Configuration Windows 5.6, 5.6.1, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Developer Express
Commerce WebSphere Commerce Developer Professional Edition Configuration Windows 5.6, 5.6.1, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Developer Professional Edition
Commerce WebSphere Commerce Enterprise 6.0
Commerce WebSphere Commerce Business Edition 5.6, 5.6.1
   

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21257302