SQL/MX Connectivity Service Manual (SQL/MX 2.x)

Migrating Applications from NonStop ODBC Server
HP NonStop SQL/MX Connectivity Service Manual524944-008
A-5
Accessing Migrated Names
For example, the following command generates an initial script containing SQL
commands:
log mvscript;
select 'SELECT ''CREATE SQLMP ALIAS ''',
'||'T_DBNAME || ''.'' || T_UNAME || ''.'' || T_OBJNAME || '' '' ||N_OBJNAME',
'|| '';''',
'FROM ZNSDB, ', TRIM(N_CATALOG) || '.ZNUOBJ ',
'WHERE N_CATALOG = ''' || N_CATALOG || ''';'
FROM ZNSDB;
log;
After the script mvscript is generated, you must edit the script file to remove the
headers and the initial SQL command. Make sure to leave the commands that insert
the aliases into SQL/MX.
You must make some additional modifications to meet the specific installation rules
when using SQL/MX.
The generated SQL commands for this example are:
select 'SELECT ''CREATE SQLMP ALIAS '' || T_DBNAME || ''.'' '
|| '|| T_UNAME || ''.'' || T_OBJNAME || '' '' || '
|| 'N_OBJNAME || '';'' '
|| 'from \TEST.$data02.startup.znsdb, '
|| trim(N_CATALOG) || '.ZNUOBJ WHERE '
|| 'N_CATALOG = ''' || N_CATALOG || ''';'
from \TEST.$data02.startup.znsdb;
where the ZNSDB table is in the system catalog and contains a list of NonStop ODBC
Server databases, and \TEST.$DATA02.STARTUP is the catalog you are migrating to
SQL/MX.
The same query is repeated for each of the NonStop ODBC Server customized
catalogs to provide a complete mapping of NonStop ODBC Server objects to the
SQL/MX environment. The generated MXCI commands have this form:
CREATE SQLMP ALIAS MASTER.DBO.TABLES \TEST.$DATA02.STARTUP.TABLES;
Accessing Migrated Names
After the names have been migrated to SQL/MX, you can access them through both
MXCI and client applications.
Server: Migrating NonStop ODBC Server
Configuration Settings
You do not need to migrate the existing NonStop ODBC Server configuration to MXCS.
No exact correspondence exists between their settings. MXCS supports the same
highly scalable and available servers as NonStop ODBC Server and achieves the
same functionality even when specific settings do not match between products.