db2se enable_db command
The db2se enable_db command supplies a database with the resources that it needs to store spatial data and to support spatial operations.
These resources include spatial data types, spatial index types, catalog views, supplied functions, and other stored procedures.
Authorization
The user ID must have DBADM, DATAACCESS, and CTRLACCESS authority on the spatially enabled database to run this command. In addition, with the release of the Db2® 11.5.8 security special build 29133, the user ID must have either SYSADM authority or CREATE_EXTERNAL_ROUTINE and CREATE_NOT_FENCED_ROUTINE authority on the database.
Command syntax
Command parameters
- Specifies the name of the database for which you want to enable Db2 Spatial Extender.
- Specifies the database user ID that has DATAACCESS authority on the database indicated by database_name.
- Specifies the password for user_id.
- Specifies parameters for the CREATE TABLE statements that are
used to create the Db2 Spatial Extender catalog tables. Use the parameter syntax for the CREATE TABLE
statement. The following example in Windows operating
system, specifies a table space in which to create the tables and
a table space in which to create the table indexes:
-tableCreationParameters "IN TS_name INDEX IN IDX_TS_name"
The maximum length for this parameter is 32,672 characters.
Usage notes
Ensure that you have a system temporary table space with a page size of 8 KB or larger and with a minimum size of 500 pages. This is a requirement to run the db2se enable_db command successfully.
Examples
The following example enables a database named MYDB for spatial operations.
db2se enable_db mydb