SQL/MX Connectivity Service Manual for SQL/MX Release 3.2 (H06.25+, J06.14+)
Figure 3 Mapping NonStop ODBC Server Name Components to ODBC/MX
CREATE SQLMP ALIAS Command
CREATE SQLMP ALIAS catalog_name.schema_name.object_name Guardian_file_name;
logical name of an existing SQL/MX catalog (database
name in NonStop ODBC Server)
catalog_name
logical name for an existing SQL/MX schema (owner name
in NonStop ODBC Server)
schema_name
logical name for the object name (table or view)object_name
physical name (fully qualified) of the object name (table or
view)
Guardian_file_name
Using SQL Scripts to Automate Name Mapping
You can simplify the process of adding logical names based on NonStop ODBC Server names by
running an SQL statement in MXCI that produces a script with SQL statements. You can edit the
script and use MXCI to execute it to create the alias 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:
58 Migrating Applications from NonStop ODBC Server










