Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see ALTER and BMC AMI Change Manager for Db2 13.1.

-SETS (SET CURRENT SQLID statement)


The -SETS command sets the current SQLID for all subsequent SQL statements.

The command also records the schema creator when the Execution component restarts a worklist. 

Example of -SETS command

-SETS 000120 SET CURRENT SQLID = 'BSR1'

The products use the -SETS and -SETA worklist commands as follows when the following conditions exist:

  • You create an unqualified alias, table, or index with a one-part name.
  • The owner and the creator of the object are different.

Example of commands for unqualified aliases, tables, or indexes

-SETS 000900 SET CURRENT SQLID = '
SQLID'
-SETA 000950 SET SCHEMA = '
creator'
-SQL  001000 CREATE
object
onePartName
-SETA 001100 SET SCHEMA = DEFAULT
-SETS 001150 SET CURRENT SQLID = USER

When you create an unqualified view, trigger, or MQT, the products use the -SETS, -SETA, and -SETP commands .

Example of commands for unqualified views, triggers, or MQTs

-SETS 001650 SET CURRENT SQLID = '
SQLID'
-SETA 001700 SET SCHEMA = '
creator'
-SETP 001750 SET CURRENT PATH = 'SYSIBM','SYSFUN','SYSPROC','J1OSS9A'
-SQL  001800 CREATE
object
onePartName
-SETA 001850 SET SCHEMA = DEFAULT
-SETS 001900 SET CURRENT SQLID = USER
-SETP 001950 SET CURRENT PATH = SYSTEM PATH


Note

Note the following items when the -SETS command is used in a worklist:

  • If the worklist uses a global authorization ID (GLID), a -SETS command with a value of USER sets the current SQLID to the GLID. If the worklist does not use a GLID, a -SETS command with a value of USER sets the current SQLID to that of the user who is executing the worklist.
  • If the Analysis component cannot determine the qualifier of a table that is used in a view, a -SETS command is specified with a value of UNKNOWN.
  • The -SETS command can exit to an installation-supplied security exit. You can use this exit for additional authorization ID control. For information about the security exit and about using 8-byte authorization IDs, see Authorization-switching.
  • Use the -SETS command instead of an SQL command for setting the current SQLID. Restart processing might not set the SQLID correctly if an SQL command is used.
  • For information about the AUTHSW option, see Authorizations-used-for-authorization-switching. This option determines whether -AUTH, -SETS, or both commands are used for authorization ID switching.


Related topic



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*