ODBC Server Reference Manual

Managing Customized Catalogs
HP NonStop ODBC Server Reference Manual429151-002
7-29
USERCAT REFRESH Statement
If An Object Is Partitioned
For each object with multiple partitions, SYSCAT REFRESH adds only one entry to the
ZNUOBJ mapping table. Even if primary and secondary partitions of the same object
are registered in different catalogs, ZNUOBJ has only one entry for the object.
NonStop ODBC Server determines which partition to map as follows:
If the primary partition is located in the same subvolume as the specified catalog,
the primary partition is the mapped object.
If the primary partition is not located in the same subvolume as the specified
catalog, the first partitioned object in the list of objects in the catalog (TABLES,
INDEXES) is the mapped object.
If the object has no local partitions, the primary partition is the mapped object.
How ODBC/SQL Server Object Names Are Assigned
When you customize or refresh the system catalog, the NonStop ODBC Server
assigns ODBC/SQL Server names to the objects in the catalog. The NonStop ODBC
Server usually assigns the Guardian file name. For example, a NonStop SQL/MP table
named \TESS.$NOSS.PERSNL.EMPLOYEE is given the ODBC/SQL Server name
EMPLOYEE. Sometimes, however, the NonStop ODBC Server must assign a name
other than the Guardian file name.
For information about viewing and changing the mapped names, see Renaming ODBC
or SQL Server Objects on page 7-7.
How SYSCAT REFRESH Affects Stored Procedures
Stored procedures are not necessarily SQL objects. If a stored procedure becomes
invalid or is deleted from ZNUPROC and ZNUPCOL, SYSCAT REFRESH cannot re-
create object references for the procedure. Instead, SYSCAT REFRESH deletes from
ZNUPCOL any row that corresponds to a parent procedure no longer found in
ZNUPROC.
USERCAT REFRESH Statement
Use the USERCAT REFRESH statement to add objects to the mapping tables. When
you run USERCAT REFRESH, all objects that are not mapped become mapped and
therefore are available through the NonStop ODBC Server.
You must run USERCAT REFRESH if objects registered in the catalog are not listed in
the mapping tables. An object does not appear in the mapping tables if:
You create the object in pass-through mode.
Note. SYSCAT REFRESH truncates object names that are more than 8 characters long. To
preserve a longer object name, manually add the object to ZNUOBJ by executing ADD TABLE,
INDEX, or VIEW.