Report definition error after migrating database to a new server
Database is migrated to a new server. While testing the application, error is observed while running Report Definitions.
There was a problem getting a list: code: -4304 SQLState: 42724 Message: DB2 SQL Error: SQLCODE=-4304, SQLSTATE=42724, SQLERRMC=SCHEMA.PR_READ_FROM_;SQL130726133530800;com/pega/pegarules/data/udf/, DRIVER=3.65.92
There was a problem getting a list: code: -4304 SQLState: 42724 Message: DB2 SQL Error: SQLCODE=-4304, SQLSTATE=42724, SQLERRMC=SCHEMA.PR_READ_FROM_;SQL130726133530800;/directory/home/schema/sqllib/, DRIVER=3.65.92
Steps to Reproduce1. Migrate database to new server.
2. Attempt to run report definitions.
The root cause of this problem is defect/misconfiguration in the operating environment. User Defined Functions must be reinstalled when migrating to a new server.
This issue is resolved by making the following change to the operating environment:
1. Create a configuration file "user-deployudf.properties". In this example it is saved to a directory in the distribution media. Have it contain the following information, but specify the connection information.
2. Update the below command to reference the locations of the specified files.
java -cp "C:\Media\PRPC6_2SP2withHotfixes\scripts\prdeploy.jar:C:\Media\PRPC6_2SP2withHotfixes\scripts\db2jcc.jar" com.pega.pegarules.install.DatabaseLibraryLoader --config="C:\Media\PRPC6_2SP2withHotfixes\archives\udf\user-deployudf.properties" --profile=dev.udb"C:\Media\PRPC6_2SP2withHotfixes\archives\udf\prreadstream.jar"
prdeploy.jar – Located in the scripts directory of the distribution media.
db2jcc.jar – Not included in the media.
user-deployudf.properties – Created in step 1.
Prreadstream.jar – Located in the \archives\udf directory of the distribution media.
3. After updating the command, run it. This places the classes in the database.
4. Edit the scripts in \schema\udb\install\udfstatements directory of the distribution media. These contain the text #DBOWNR, each occurrence must be manually replaced with the name of the schema into which the UDF is to be installed.
5. Run the scripts.