bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Building Queries and Data Views

Defining Stored Procedures to Liquid Data

To use stored procedures in Liquid Data, you must create a Stored Procedure Description file. The Stored Procedure Description file is an XML schema file that defines the types and the functions for a set of stored procedures. For details on defining a Stored Procedure Description file, see Stored Procedure Description File Schema and Rules for Specifying Stored Procedure Description Files. For database-specific information, see Stored Procedure Support by Database.

To Define Stored Procedures to Liquid Data

Perform the following steps to define a stored procedure for use with Liquid Data.

1. Create your stored procedures in the underlying database, if they do not already exist. For details about Liquid Data support of stored procedures for your database, see Stored Procedure Support by Database.

2. In the WebLogic Console, create a JDBC Connection Pool to access your database, if one does not already exist.

3. In the WebLogic Console, create a JDBC Data Source for the connection pool created in the previous step.

4. Create a Stored Procedure Description file for your stored procedures and save it to the stored_procedures directory of the Liquid Data repository. For details, see Stored Procedure Description File Schema and Rules for Specifying Stored Procedure Description Files.

5. In the Liquid Data Administration Console (to access the Liquid Data Console, click the Liquid Data link at the bottom of the list on the WebLogic administration console), click the Data Sources tab.

6. Click the Relational Databases tab.

7. Click the Configure a New Relational Data Source Description Link (or open an existing Data Source to modify it).

8. If you are creating a new data source, enter values for Name, Data Source Name, and Schema fields in the Configure Relational Data Source Description screen. For more details on configuring relational data sources, see Configuring Access to Relational Databases in the Administration Guide.

9. In the Configure Relational Data Source Description screen, specify a Stored Procedure Description file by clicking the Browse Repository link next to the Stored Procedure Description File field.

10. In the Repository Browser, select the file you created containing your stored procedure definitions. After making your selection, click the Select button.

11. In the Configure Relational Data Source Description screen, click the Apply button to save your Data Source definition.

12. Check the WebLogic Server log file for any errors, and correct them as necessary.

You can now access your stored procedures in the Data View Builder. If you are already connected to the server in the Data View Builder, you must re-connect by selecting File —> Connect from Data View Builder menu. The Stored Procedures tab appears in the Design view under the sources tab of the Data View Builder. You can now use your stored procedures as you do other building blocks (for example, data sources, XQuery functions, and so on) to build queries.