db2se disable_db command

The db2se disable_db command removes resources that allow Db2® Spatial Extender to store and support spatial data.

These resources include spatial data types, spatial index types, catalog views, supplied functions, and stored procedures that were created when you enable a database for support of spatial operations.

Authorization

The user ID must have DBADM and DATAACCESS authority on the spatially enabled database to run this command.

Command syntax

db2se disable_db command

Read syntax diagramSkip visual syntax diagramdisable_dbdatabase_name-userIduser_id-pwpassword -forceforce_value

Command parameters

Where:
database_name
Specifies the name of the database for which you want to disable Db2 Spatial Extender.
-userId user_id
Specifies the database user ID that has DATAACCESS authority on the database indicated by database_name.
-pw password
Specifies the password for user_id.
-force force_value
Specifies that you want to disable a database for spatial operations, even though you might have database objects that are dependent on the spatial types or spatial functions. Database objects that might have such dependencies include tables, views, constraints, triggers, generated columns, methods, functions, procedures, and other data types (subtypes or structured types with a spatial attribute).

If you specify a non-zero value for the -force parameter, the database is disabled and all resources of Db2 Spatial Extender are removed. If you specify zero as force_value, the database is disabled only if database objects are independent on spatial types or spatial functions.

Usage notes

If you already defined spatial columns but still want to disable a database for spatial operations, you must specify a value other than 0 (zero) for the force parameter to remove all spatial resources in the database that do not have other dependencies on them.

Examples

The following example disables the support for spatial operations on the MYDB database even if there are database objects with dependencies to spatial types and functions.

db2se disable_db mydb -force 1