Creating or modifying stored procedure query subjects
After you import or create a stored procedure query subject, you can modify it. To avoid inconsistencies, the modified query subject should return the same result set structure as the original stored procedure.
IBM® Cognos® Framework Manager supports only user-defined stored procedures. System stored procedures are not supported.
There are different types of stored procedures:
Type of Stored Procedure |
Description |
---|---|
Data Query |
Issues a read-only transaction If you have a stored procedure with its type set to Data Query, the stored procedure issues a read-only transaction. When you run the stored procedure in Event Studio, an error message says that the stored procedure wants to update the database. The reason for the error is that the stored procedure contains a passive transaction that is supported by the underlying database. The solution is to click OK so that the stored procedure updates the database. No other action is required. |
Data Modification |
Writes a record to the data source. Use this type when you want to use the stored procedure in Event Studio. If you want Event Studio users to be able to select a parameter in a task, you must put quotation marks around the parameter. Warning: Testing a data modification stored procedure in the Edit Definition dialog box results in data being written to the data source. You cannot roll back transactions to the data source in Framework Manager. If undesired data is written to the data source as a result of testing the stored procedure, a rollback can be done by the database administrator if the data source is configured to support it. To test the stored procedure without data being written to the data source, click Test from the Tools menu. |
You can also create data source query subjects, which directly reference data in a single data source Data source query subjects, and model query subjects, which are based on metadata that exists in your model Model query subjects.