Restrictions on altering nicknames

You need to be aware of several restrictions when you alter a nickname.

Column options
If one of the following options is set on a column, you cannot add any other options to that column:
  • SOAPACTIONCOLUMN
  • URLCOLUMN
  • PRIMARY_KEY
  • FOREIGN_KEY
For BioRS
  • If you change the element name of a column by using the ELEMENT_NAME option, the new name is not checked to ensure that it is correct. An incorrect option might result in errors when the column is referenced in a query.
  • If you make changes to the IS_INDEXED column option, the changes are not verified with the BioRS server. An incorrect option might result in errors when the column is referenced in a query.
Data types
  • If you change the data type of a column, the new data type must be compatible with the data type of the corresponding data source column or element. Changing the local data type to a data type that is incompatible with the remote data type might cause unpredictable errors.
  • The local_data_type cannot be LONG VARCHAR, LONG VARGRAPHIC, XML, or a user-defined data type.
  • The data_source_data_type cannot be a user-defined type.
  • You cannot override the existing local types or create new local types for some of the nonrelational data sources. Check the documentation for the specific data source wrapper for more information on this restriction.
  • When the local specification of a column's data type is changed, the federated database manager invalidates any statistics (for example, HIGH2KEY and LOW2KEY) that are gathered for that column.
  • The local type is set for the specific data source object when it is accessed with that nickname. The same data source object can have another nickname that uses the default data type mapping.
Indexes
The ALTER NICKNAME statement cannot be used to register a new data source index in the federated database. Use the CREATE INDEX statement with the SPECIFICATION ONLY clause to create an index specification.
LOCAL NAME and LOCAL TYPE parameters
  • ALTER NICKNAME statement cannot be used to change the local names or data types for the columns in the nickname if:
    • The nickname is used in a view, SQL method, or SQL function
    • You define an informational constraint on the nickname
  • The federated_column_options clause must be specified last if you also need to specify the LOCAL NAME parameter, the LOCAL TYPE parameter, or both in the ALTER NICKNAME statement.
Nicknames
The ALTER NICKNAME statement cannot be used to change the name of the BioRS databank that is referenced by or used in a BioRS nickname. If the name of a BioRS databank changes, you must drop the nickname and create the nickname again.

You cannot use the ALTER NICKNAME statement to disallow caching on a nickname with cache tables or materialized query tables. You must drop the cache tables and the materialized query tables before you disallow caching on the nickname.

Units of work
The federated server cannot process an ALTER NICKNAME statement within a given unit of work under any of the following conditions:
  • If the nickname referenced in the ALTER NICKNAME statement has a cursor open on it in the same unit of work.
  • If an insert, delete or update is issued in the same unit of work for the nickname that is referenced in the ALTER NICKNAME statement.