SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Utilities
HP NonStop SQL/MX Reference Manual540440-003
5-46
Examples of migrate
== SQLMP ALIAS
CREATE SQLMP ALIAS appcat.appsch.t1
\TEXMEX.$DATA01.SQLDATA.T1;
CREATE SQLMP ALIAS appcat.appsch.t2
\TEXMEX.$DATA01. DATA.T2;
/usr/tandem/sqlmx/bin: migrate EXECUTE SCRIPT script.out
ERROR_LOG errlog.out > mig.out
This example uses the SHOW SCRIPT command to find discrepancies, which is
an iterative approach to identify discrepancies or problems, correct the script file,
and reissue the EXECUTE command:
/usr/tandem/sqlmx/bin: migrate PRELIMINARY_REPORT >
prelim.out
/usr/tandem/sqlmx/bin: cat prelim.out |more
/usr/tandem/sqlmx/bin: migrate SHOW SCRIPT script.out
/usr/tandem/sqlmx/bin: edit script.out and change catalogs
and schemas as needed
/usr/tandem/sqlmx/bin: migrate EXECUTE SCRIPT script.out
ERROR_LOG errlog1.out > mig1.out
/usr/tandem/sqlmx/bin: cat errlog1.out |more
/usr/tandem/sqlmx/bin: rename errlog1.out script2.out
/usr/tandem/sqlmx/bin: edit script2.out to fix the problem
/usr/tandem/sqlmx/bin: migrate EXECUTE SCRIPT script2.out
ERROR_LOG errlog2.out > mig2.out
...Repeat previous steps until all errors have been resolved.
This example shows how to issue the EXECUTE command if you are not the super
ID:
Logon as owner1 of SCH1.
/usr/tandem/sqlmx/bin: migrate SHOW SCRIPT sch1.out
/usr/tandem/sqlmx/bin: Edit sch1.out to include only those
entries owned by owner1 and make any modifications or
deletions.
/usr/tandem/sqlmx/bin: migrate EXECUTE SCRIPT sch1.out
Logon an owner2 of SCH2.
/usr/tandem/sqlmx/bin: migrate SHOW SCRIPT sch2.out
/usr/tandem/sqlmx/bin: Edit sch2.out to include only those
entries owned by owner2 and make any modifications or
deletions.
/usr/tandem/sqlmx/bin: migrate EXECUTE SCRIPT sch2.out
...iterate through each user in this manner.