db2se enable_autogc command
The db2se enable_autogc command enables autogeocoding.
This command enables Db2® Spatial Extender to synchronize a geocoded column with its associated geocoding column or columns. A geocoding column is used as input to the geocoder. Each time that values are inserted into, or updated in, the geocoding column or columns, triggers are activated. These triggers invoke the associated geocoder to geocode the inserted or updated values and to place the resulting data in the geocoded column. The information about geocoded columns is available from the DB2GSE.ST_GEOCODING catalog view.
Authorization
- DBADM and DATAACCESS authority on the database that contains the table on which the triggers that are created by this stored procedure are defined
- CONTROL privilege on the table
- ALTER privilege on the table
- SELECT privilege on the table on which autogeocoding is enabled or DATAACCESS authority.
- Necessary privileges to evaluate the SQL expressions that are specified for the parameters in the geocoding setup.
Command syntax
Command parameters
- Specifies the name of the database for which you want to enable autogeocoding.
- Specifies the database user ID that has DATAACCESS authority on the database indicated by database_name.
- Specifies the password for user_id.
- Specifies the schema name for the specified table_name. If you do not specify a schema name, the value in the CURRENT SCHEMA special register is used as the schema name for the table or view.
- Specifies the unqualified name of the table containing the specified column on which you want to enable autogeocoding. The triggers are created to synchronize the geocoded column. The table_name value is converted to uppercase unless you enclose it in double quotation marks.
- Identifies the column into which the geocoded data is to be inserted or updated. This column is referred to as the geocoded column. The column_name value is converted to uppercase unless you enclose it in double quotation marks.
Usage notes
Before enabling autogeocoding, you must perform the geocoding setup step to specifies the geocoder and the geocoding parameter values. It also identifies the geocoding columns that are to be synchronized with the geocoded columns.
You can enable autogeocoding only on tables on which INSERT and UPDATE triggers can be created. Consequently, you cannot enable autogeocoding on views or nicknames.
Examples
The following example sets up automatic geocoding for a column named MYCOLUMN in table MYTABLE
db2se enable_autogeocoding mydb -tableName mytable -columnName mycolumn