IDAX.ALTER_MODEL - Alter properties of a model

Use this stored procedure to change properties of a specified model. Thus, you can, for example, rename a model, change the owner of a model, or categorize and describe a model.

Prerequisites

  1. You must specify at least one of the optional parameters.
  2. If you specify a new model name, the name must not yet exist.
  3. You can change the model name and the owner only if the state of the model is Complete.
  4. You cannot change the model schema.
  5. When a model name is changed, the names of the managed tables or views of the model are also changed.
  6. You can change the name and version of the application only if the model is imported from another application, for example, from IBM® Netezza® Analytics.
  7. Models that are built through the model building procedures on the local computer get the application name IBM DB Analytics and the current DB2® version. These names cannot be changed but are read-only.

Authorities

The privileges held by the authorization ID of the statement must include at least one of the following authorities:

  • All changes: CONTROL privilege on the model
  • To rename a model, one of the following privileges:
    • ALTERIN privilege in the model schema
    • DBADM authority
  • To change the model owner: SECADM authority
  • All other changes: DATAACCESS authority

Syntax

IDAX.ALTER_MODEL(in parameter_string varchar(32672))

Parameter descriptions

parameter_string
Mandatory one-string parameter that contains pairs of <parameter>=<value> entries that are separated by a comma.
Data type: VARCHAR(32672)
The following list shows the parameter values:
model
Mandatory.
The name of the model that is to be changed.
You can qualify the value of the model parameter with a schema name as follows:
<schema name>.<model name>
name
Optional.
The new name of the model without schema.
owner
Optional.
The new owner of the model.
description
Optional.
A description of the model.
copyright
Optional.
A copyright statement.
appname
Optional.
The name of the application that is used to create the model.
appversion
Optional.
The version of the application that is used to create the model.
category
Optional.
A user-defined category name for the model.

Returned information

If an error occurs, an exception is raised.

Example

CALL IDAX.ALTER_MODEL('model=cc_nb_ewd, category=sample');