SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—523725-004
2-72
Considerations for CREATE SQLMP ALIAS
Usage Restrictions
If the catalog and schema do not exist, NonStop SQL/MX returns an error.
If the specified alias name already exists, NonStop SQL/MX returns an error.
You can map the same SQL/MP table or view to multiple different ANSI names in the
same catalog and schema and in different catalogs and schemas. For example, you
can create these four mappings for a single SQL/MP table or view:
cat1.sch1.obj1
cat1.sch1.obj2
cat2.sch1.obj2
cat2.sch2.obj2
In SQL/MX releases earlier than SQL/MX Release 2.x, if you re-mapped a table
without dropping the SQLMP alias, NonStop SQL/MX would issue an error. In SQL/MX
Releases 2.x you can map multiple ANSI names to one SQL/MP object, and access
the same MP object using different alias names.
Only these DDL statements allow the use of an SQL/MP alias name: CREATE SQLMP
ALIAS, DROP SQLMP ALIAS, ALTER SQLMP ALIAS, and UPDATE STATISTICS.
Moving and dropping of the underlying SQL/MP object does not result in altering or
dropping the associated SQLMP aliases. For information , see Considerations for
DROP SQLMP ALIAS.
Managing Changes to SQLMP Aliases When SQL/MP Files Change
The alias information described in NonStop SQL/MX might become incorrect or
orphaned. It becomes incorrect if the SQL/MP file name associated with the SQLMP
ALIAS is moved to a different location. It becomes orphaned if the SQL/MP file name
associated with the SQLMP ALIAS is removed. SQL/MP objects might be moved to
different locations when users issue partition management commands with the
SQL/MP ALTER statement or when they recover files to a different location by using
TMF RECOVERY. SQL/MP files can be removed when users drop the table or view
with an SQL/MP ALTER statement. You must alter the SQLMP ALIAS (if objects are
moved) or drop the SQLMP ALIAS (if objects are dropped). For information, see
ALTER SQLMP ALIAS Statement on page 2-9 and DROP SQLMP ALIAS Statement
on page 2-128.
Late Bind
If you compile an application that uses an SQL/MP alias and later you change the
SQL/MP alias to map to a different SQL/MP table, the SQL/MP table definition is no
longer compatible with the definition used at compile time. As a result, you must
manually recompile applications that use the alias. If the late bind does not find the
SQL/MP table underlying the SQL/MP alias or if the SQL/MP table was moved,
NonStop SQL/MX returns an error.
For more information, see the SQL/MX Programming Manual for C and COBOL or the
SQL/MX Programming Manual for Java.