9.13.3.2 Configuration
Assignments
The Database agents are designed to either collect data from a database column and assign it to a UDR field, or vice versa. In their configuration they share the Assignment tab, where these mappings are configured. Due to the resemblance this configuration is described here.
Database collection/forwarding agents configuration dialog - Assignment tab
Item | Description |
---|---|
Refresh | Updates the table with all the columns or parameters from the selected table or stored procedure (Database forwarding agent, only). Note! Potential changes in the database table will not be visible until Refresh for the database in the Source tab, has been selected. If rows already exist in the table, the refresh operation preserves the configuration for all rows with a corresponding column or parameter name. Thus, if a table has been extended with a new column, the old column configurations are left untouched and the new column appears when Refresh is selected. The value type on each new column that appears in the table is automatically set to UDR Field. Auto assignment: All rows with no value assigned and with a value type of UDR Field will be targeted for auto assignment in the end of the refresh process. If the selected UDR type contains a field whose name matches the column name, the field will be automatically assigned in the Value column. Matching is not case-sensitive and is done after stripping both the column and field names from any characters, except a-z and 0-9. |
Column Name | Displays a list of all columns or stored procedure parameters (Database forwarding agent, only) for the selected table or stored procedure, except the Transaction ID column. |
Column Type | Displays the data type for each column as declared in the database table. If the column does not accept NULL this is displayed as: (NOT NULL). Note! If using Oracle and assigning a value of type |
Value Type | Allows the user to select what type of value to be assigned to the column, or vice versa. For further information, see the section below, Value Types. |
Value | The value to be assigned to the column, or vice versa. The technique of selecting a value depends on the selected Value Type. Note! It is important that the data type of the selected value corresponds to the data type of the column. Most incompatibilities will automatically be detected, however, there are situations where validation is not possible. |
Value Types
The Database agents offer six different types of values that may be assigned to a column, or vice versa. Depending on the agent, not all value types are applicable and will therefore not be available in the list.
Value Type | Description |
---|---|
UDR Field | If selected, a UDR browser will be launched when the corresponding Value cell is selected. When a UDR field has been selected in the browser it will appear in the Value cell. Note! To save the user from launching the UDR browser for every cell to be assigned, the browser window may be kept on display. When a UDR field is selected and Apply is selected or if a UDR field is double-clicked, the field will go into the Value cell of the selected row, provided that this row has a value type of UDR Field. The same rule applies when OK is selected in the browser, however the browser will be dismissed. It is possible to change target (Value cell) by selecting the desired row in the Assignment tab in the configuration dialog, while still keeping the UDR browser window open. Whether data types of the selected UDR and the database column are compatible or not, is validated when the configuration dialog is confirmed. |
MIM Entry | Only applicable for the Database forwarding agent. If selected, a MIM browser will be launched when the corresponding Value cell is clicked. When a MIM resource has been selected in the browser it will appear in the Value cell. The previous Note for the UDR Field applies to this browser as well. Whether data types of the selected UDR and the database column are compatible or not, is validated when the configuration dialog is confirmed. |
Constant | Only applicable for the Database forwarding agent. If selected, a text entry field will be available in the Value cell where any constant to be assigned to the column may be entered. The agent automatically appends possible quotes needed in the SQL statement, based on the data type of the column. |
Function | Only applicable for the Database forwarding agent. If selected, a text entry field will be available in the Value cell where any database related function to be called may be entered. If the function takes parameters, these must be marked as question marks. Selecting a cell containing question marks will display the Function Editor dialog where each question mark is represented by a row. Function Editor dialog The selection of parameter values follows the same procedures as for the assignment of column values however Constant, UDR Field and MIM Entry are the only available value types. Note! If constants are entered in the Function Editor they must be quoted correctly since the agent has no way of knowing what data types they must have. |
NULL | If selected, no value may be entered. In Database collection agents, NULL must be selected for all columns whose values are not mapped into a UDR Field. In Database forwarding agents, NULL must be selected for columns populated with a NULL value or columns that, when inserted, will be populated by internal database triggers. |
From UDR | Only applicable for the Database forwarding agent. It is selected if a complete UDR is to be stored in a binary column to later be collected by a Database collection agent. The Database forwarding agent must populate the column from the special field Storable, available in all UDR types. This is only applicable for column types RAW, LONG RAW or BLOB. |
To UDR | Only applicable for the Database collection agent. It is supposed to be selected if a complete UDR has been stored in a binary column by a Database forwarding agent and that UDR will be recollected by the Database collection agent. The Database forwarding agent must have been populating the column from the special field Storable, available in all UDR types. If this value type is selected no other assignments are allowed. If other columns exist their value types must be set to NULL. An evaluation to ensure the column type is actually a RAW, LONG RAW or BLOB, is carried out. |