Dropping a server definition deletes the definition from the global
catalog. The data source object that the server definition references is not
affected. You can drop a server definition using the DB2® Control Center or using DROP statement
from the DB2 command
line processor.
Restrictions
The federated server cannot process a DROP SERVER statement within a given
unit of work (UOW) under either of the following conditions:
- The statement references a single data source, and the UOW already includes
one of the following statements:
- A SELECT statement that references a nickname for a table or view within
the data source
- An open cursor on a nickname for a table or view within the data source
- An insert, delete or update issued against a nickname for a table or view
within the data source
- The statement references a category of data sources (for example, all
data sources of a specific type and version), and the UOW includes one of
the following statements:
- A SELECT statement that references a nickname for a table or view within
one of the data sources
- An open cursor on a nickname for a table or view within one of the data
sources
- An insert, delete or update issued against a nickname for a table or view
within one of the data sources
About
this task
When
you no longer need to access a data source server, drop the server definition
from the federated database. When you drop a server definition, other objects
that you registered with the federated server are impacted:
- All user-defined function mappings, user-defined data type mappings, and
user mappings that are dependent on the dropped server definition are also
dropped.
- All nicknames that are dependent on the dropped server definition are
also dropped. Dropping the nicknames dependent on the server definition, affects
the objects dependent on those nicknames:
- Any index specifications dependent on the dropped nicknames are also dropped.
- Any views dependent on the dropped nicknames are marked inoperative.
- Any materialized query tables dependent on the dropped nicknames are also
dropped.
- All packages and cached dynamic SQL statements dependent on the dropped
nicknames are marked invalid, and remain invalid until the dependent objects
are re-created.
Procedure
To delete a server definition, issue the DROP statement:
DROP SERVER server_name
where
server_name identifies the server
definition to be dropped.
Example: An Informix® server uses the server name
INFMX01. The following DROP statement drops the server definition:
DROP SERVER INFMX01