Oracle® Business Intelligence Server Administration Guide > Using Variables in the Oracle BI Repository > Process of Creating Initialization Blocks >

Associating Variables With Initialization Blocks


This task is a step in Process of Creating Initialization Blocks.

The SQL SELECT statement in the Default initializer list can contain multiple columns. The order of the columns in the SQL statement and order of the variables associated with the initialization block determine the column value that is assigned to each variable. Therefore, when you associate variables with an initialization block, the value returned in the first column will be assigned to the first variable in the list.

For more information, see About Using Initialization Blocks With Variables.

Repository Variables

When you open a repository in online mode, the value shown in the Default initializer field of the Initialization Block dialog box is the current value of that variable as known to the Oracle BI Server.

NOTE:  The number of associated variables can be different from the number of columns being retrieved. If there are fewer variables than columns, extra column values are ignored. If there are more variables than columns, the additional variables are not refreshed (they retain their original values, whatever they may be). Any legal SQL can be executed using an initialization block, including SQL that writes to the database or alters database structures, assuming the database permits the user ID associated with the connection pool to perform these actions.

If you stop and restart the Oracle BI Server, the server automatically executes the SQL in the repository variable initialization blocks, re-initializing the repository variables.

Session Variables

For session variable initialization blocks, you can select Row-wise initialization. The Cache variables check box is automatically selected when you select the Row-wise initialization check box. Selecting the cash variables option directs the Oracle BI Server to store the results of the query in a main memory cache. For more information, refer to Row-Wise Initialization.

The Oracle BI Server uses the cached results for subsequent sessions. This can reduce session startup time. However, the cached results may not contain the most current session variable values. If every new session needs the most current set of session variables and their corresponding values, you clear this check box.

To associate variables with the initialization block

  1. From the Administration Tool menu bar, select Manage > Variables.
  2. In the Variable Manager dialog box, double-click the variable.
  3. In the Variable Initialization Block dialog box, click Edit Data Target.
  4. In the Variable Initialization Block Variable Target dialog box, you can select one of the following:
    • Variables. Associates variables with the initialization block.
    • Row-wise initialization. Used with session init blocks only. For more information, see Row-Wise Initialization.

      If you select Row-wise initialization, the Use caching check box becomes available.

  5. If you select the Variables option, perform one of the following steps:
    1. Click new, and in the Variable dialog box, create a new variable.

      NOTE:  For the Custom Authentication data source type (Session variables), the variable USER is required.

      For information about creating variables, see Using the Variable Manager.

    2. Click Link, to associate an existing variable with an initialization block.
      • In the Browse dialog box, select the variable to be refreshed by this initialization block, and then click OK.
  6. To reorder variables, select a variable, and then click Up or Down.
  7. To remove a variable from association with this block, select the variable, and then click the remove button.
  8. Click OK.

The next step is to establish execution precedence.

Oracle® Business Intelligence Server Administration Guide Copyright © 2007, Oracle. All rights reserved.