To run a stored procedure against a database, use the Query Database operator.
This example uses the SQL Server driver that CA Process Automation provides during installation. To run the process against another database, upload the corresponding JDBC driver from the Manage User Resources palette on the Configuration tab. CA Process Automation can access the driver when you restart the Orchestrator service. For more information, see the Content Administrator Guide.
You can duplicate this example in the SQL Server Management Studio in the PAMReporting database. PAMReporting is the database name that is provided for the CA Process Automation Reporting tables during the installation. You can use a different name. You can also use any database of your choice.
Follow these steps:
USE PAMReporting GO -- ================================================ -- Template generated from Template Explorer using: -- Create Procedure (New Menu).SQL -- -- Use the Specify Values for Template Parameters -- command (Ctrl-Shift-M) to fill in the parameter -- values below. -- -- This block of comments will not be included in -- the definition of the procedure. -- ================================================ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE sp_getSOAPRows -- Add the parameters for the stored procedure here AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. -- SET NOCOUNT ON; -- Insert statements for procedure here select count(*) from SOAPClientCall; END GO
CA Process Automation saves the new stored procedure in the PAMReporting database.
EXECUTE sp_getSOAPRows
The number of rows the procedure returns is displayed as a result of the process.
Note: Your result depends on the number of rows in the SOAPClientCall table.
|
Copyright © 2014 CA.
All rights reserved.
|
|