4. Maintaining a Distributed Database : Register as Link Statement—Define Database Objects to Ingres Star : Register Table as Link Statement—Define Table to Ingres Star
 
Share this page                  
Register Table as Link Statement—Define Table to Ingres Star
The register table as link statement defines an already existing local DBMS table to Ingres Star. No new table is created. All secondary indexes associated with the table are registered automatically when you register a table in your distributed database if the table is in a local database.
Note:  Ingres Star does not support ALTER TABLE RENAME or RENAME TABLE statements for renaming tables and columns. If a table is registered in Star and it is renamed in the local database, any SELECT statements from the old table name will fail with error E_US0845 table does not exist. Similarly, if a column of a registered table is renamed in the local database, any SELECT statements involving that table column will fail with error E_US0834 table does not contain the column specified. Table and column names are recorded in the iiregistrations catalog, which you can access with the StarView utility. If you renamed a table or column registered in Ingres Star using one of these commands, you must drop the old table and register the new table name with the Ingres Star database using StarView.
The register table as link statement has the following format:
register [table] table_name
       [(col_name {, col_name})]
       as link
       [from [local_owner_name.]local_table_name]
       [with
              [node = node_name,
              database = database_name]
              [, dbms = server_class]]
table
Is an optional object type identifier. Whether or not you specify table, Ingres Star queries the local DBMS and determines the object type.
If you specify table, Ingres Star issues an error if the local DBMS type is not a table.
table_name
Is the Ingres Star name of the local DBMS table you are registering.
It can be delimited with double quotes to preserve case and allow special characters. However, if the Ingres Star database does not support mixed-case delimited identifiers and the local DBMS or Enterprise Access product does support mixed-case delimited identifiers, you should use a single-quote delimiter in order for Ingres Star to preserve the case.
This name must follow Ingres naming conventions. It will appear in the Ingres Star catalogs as a table. In the table_subtype column of the iitables standard system catalog, it will have a subtype of L (registered as Link). For information, see the chapter "Understanding Ingres Star Catalogs."
local_table_name
Is the name of the table in the local DBMS.
It can be delimited with double quotes to preserve case and allow special characters. However, if the Ingres Star database does not support mixed-case delimited identifiers and the local DBMS or Enterprise Access product does support mixed-case delimited identifiers, you should use a single-quote delimiter in order for Ingres Star to preserve the case.
The default is to use the distributed database table_name you specify as the name of the local DBMS table that you are registering.
Enter this name if you are registering the table in your distributed database with a name different from its name in the local DBMS or if the table name in the local DBMS does not follow naming conventions and/or is case sensitive or is owned by another user.
Note:  This table name must be the actual base table name, not a synonym.
The elements that are common to all three register as link statements are described in Register as Link Statement (see page Register as Link Statement—Define Database Objects to Ingres Star).