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 Guide540435-005
6-7
Steps for Migrating MPALIAS Metadata to SQL/MX
Release 2.x
The PRELIMINARY_REPORT command displays these discrepancies in the
MPALIAS table contents to be migrated:
References to base files that do not physically exist on disk in the SQL/MP
environment
References to catalogs or schemas that do not exist in the SQL/MX
environment
5. If you find discrepancies, use the
SHOW SCRIPT command of the migrate utility
to generate a script file in which you can fix the discrepancies:
/usr/tandem/sqlmx/bin: migrate SHOW MPALIAS SCRIPT
mpalias_script.out CLEAR
This command generates a script file, which is mpalias_script.out in this
example, that contains all the statements necessary for the metadata entries,
including all the CREATE SQLMP ALIAS statements for the MPALIAS table. The
metadata in the MPALIAS table remains intact during and after the execution of this
command.
If you do not specify 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.
6. Fix discrepancies by editing the script file.
Modify or remove the CREATE SQLMP ALIAS statements in the script as
necessary. For example, modify the CREATE SQLMP ALIAS statements by
renaming the catalogs, schemas, or physical file locations:
7. Migrate the SQL/MP alias entries from the SQL/MP metadata to the SQL/MX
metadata by using the
EXECUTE command of the migrate utility.
To migrate all entries from the MPALIAS table, enter:
/usr/tandem/sqlmx/bin: migrate EXECUTE MPALIAS
ERROR_LOG mpalias_errors.out CLEAR
To migrate only MPALIAS entries in the script file, enter:
/usr/tandem/sqlmx/bin: migrate EXECUTE SCRIPT
mpalias_script.out
ERROR_LOG mpalias_errors.out CLEAR
If you do not specify the name and OSS location of the error log file, the default is
error_log.out in the current directory. If you specify an existing error log file,
use the CLEAR option to direct the
migrate utility to clear the contents of the file
==SQL/MP ALIAS
CREATE SLLMP ALIAS cat1.schema1.t1 \USER.$DATA01.T1.TSTDEC
CREATE SQLMP ALIAS cat1.schema1.t2 \USER.$DATA01.T2.TSTFLT
==