ODBC Server Reference Manual
Managing Customized Catalogs
HP NonStop ODBC Server Reference Manual—429151-002
7-5
Listing Customized Catalogs
Listing Customized Catalogs
Although you can list customized catalogs using the NonStop ODBC Server by
selecting from the table SYSDATABASES, you might also want to list customized
catalogs using SQLCI so you can see both the NonStop SQL/MP name and the
ODBC/SQL Server name of the catalog.
You can list customized catalogs by accessing the mapping table ZNSDB, which is in
the same subvolume as your NonStop SQL/MP system catalog.
For example, if the NonStop SQL/MP system catalog is in \TEST01.$SYSTEM.SQL,
you can list all customized catalogs by executing the following statement in SQLCI:
SELECT n_catalog, t_dbname FROM \test01.$system.sql.znsdb;
SQLCI displays a row for each customized catalog. Each row lists the columns
N_CATALOG and T_DBNAME, which contain the NonStop SQL/MP catalog name and
ODBC/SQL Server database name.
For details about the mapping table ZNSDB, see Section 8, HP NonStop ODBC Server
Mapping Tables.
Locating an Object Using the ODBC/SQL Server Object Name
Although you might know the ODBC/SQL Server name of an object in a customized
catalog, you might also need to know the corresponding NonStop SQL/MP name. For
example, you must have the NonStop SQL/MP name of a table if you want to do the
following:
•
Use the table name in pass-through statements
•
Use the table name in NonStop SQL/MP statements
You can locate the NonStop SQL/MP name by accessing the mapping table ZNUOBJ,
which is in the same subvolume as your customized catalog.
For example, suppose you know the following information about a table:
•
Your database name is TEST_VOL2_PERSNL.
•
The owner of the database is ADMIN_LEN.
•
The owner of the table is ADMIN_LEN.
•
The ODBC/SQL Server name of the table is FUTURES_TABLE.
You can determine the NonStop SQL/MP name of the table by executing the following
statement in SQLCI. (Note that you must enter the owner name and table name in
uppercase letters.)
SELECT n_objname
FROM \test.$vol2.persnl.znuobj
WHERE t_uname = "ADMIN_LEN"
AND t_objname = "FUTURES_TABLE"