SQL/MX 2.x Database and Application Migration Guide (G06.23+, H06.04+, J06.03+)
Migrating SQL/MP Metadata From SQL/MX Release 
1.8 to SQL/MX Release 2.x
HP NonStop SQL/MX Database and Application Migration Guide—540435-005
6-14
Steps for Migrating PROCS and PARAMS Metadata
to SQL/MX Release 2.x
5. To fix the reported discrepancies:
•
Create the missing catalogs and schemas in SQL/MX, or change the catalog 
and schema names in the migration script by using the SHOW SCRIPT 
command. See Step 6
.
•
Copy the missing class and JAR files to the specified paths, or change the path 
names in the migration script by using the SHOW SCRIPT command. See 
Step 6
.
6. If you want to migrate SPJs selectively or correct discrepancies, generate a script 
file by using the 
SHOW SCRIPT command of the migrate utility:
/usr/tandem/sqlmx/bin: migrate SHOW PROCS SCRIPT 
spj_script.out CLEAR
This command generates a script file (spj_script.out in this example) that 
contains the CREATE PROCEDURE statements of all the SPJs in the PROCS 
table. The metadata in the PROCS table remains intact during and after the 
execution of this command. 
If you do not specify the name and OSS location of the script file, the default is 
script.out in the current directory. If you specify an existing script file, use the 
CLEAR option to direct the migrate utility to clear the contents of the script file 
before adding metadata entries to the file. If the script file already exists and you 
omit the 
CLEAR option, the migrate utility uses script.out. 
7. Edit the script file to remove SPJs or fix discrepancies.
Modify or remove the CREATE PROCEDURE statements as necessary. For 
example, modify the CREATE PROCEDURE statements by renaming the catalogs, 
schemas, and Java class or JAR file paths: 
8. Verify that the Java class or JAR files exist in the specified OSS directories. 
CREATE PROCEDURE SAMDBCAT.PERSNL.PRNTMETH( IN INT SIGNED  ) 
external name 'PrintTest.starsWithException(int)' external path 
'/PUB/susan/spj_errors' language JAVA parameter style JAVA contains SQL 
not deterministic isolate;
CREATE PROCEDURE SAMDBCAT.SALES.STARS1( IN INT SIGNED  ) 
external name 'ErrorTesting.starsWithException1(int)' external path 
'/PUB/susan/spj_errors' language JAVA parameter style JAVA contains SQL 
not deterministic isolate;
CREATE PROCEDURE PUBS.SUSAN.STARS2( IN INT SIGNED   ) external 
name 'ErrorTesting.starsWithException2(int)' external path '/PUB/susan' 
language JAVA parameter style JAVA  contains SQL not deterministic 
isolate;
Note. The SPJ classes must exist on the disk for CREATE PROCEDURE statements in 
the script file to execute successfully.










