Cisco Cisco Process Orchestrator 3.1 ユーザーガイド
13-72
Cisco Process Orchestrator 3.1 User Guide
Appendix 13 Using Adapters
Database Adapter—IBM DB2
•
DB2 Universal Database
Step 2
Click the General tab and enter the required information.
Step 3
Click the Connection tab to specify the required information.
Step 4
Click the Permission tab to define the type of SQL commands that can run on the target.
•
Select—Select the radio button to indicate that SELECT SQL statements can be run against the
database target.
database target.
•
Modify (insert/update/delete)—Select the radio button to indicate that INSERT/UPDATE/DELETE
SQL statements can be run against the database target.
SQL statements can be run against the database target.
•
Execute SQL Command—Select the radio button to indicate that SQL scripts can be run on the
database target.
database target.
Step 5
Click OK to close the dialog box and complete the procedure.
Automating SQL Queries in the IBM DB2 Database
Executing a DB2 SQL Script
This script executes an SQL script against a DB2 database.
Step 1
In the Process Editor Toolbox, choose the [DB2 Database Activity] property page, then click the
Execute DB2 SQL Script tab.
Execute DB2 SQL Script tab.
Step 2
Specify the information that describes the script you want to run, including the SQL script text for the
selected database. For example, in the sample table - EMPLOYEE, find rows (and certain columns)
where the salary of a particular employee is greater than or equal to the average salary for their particular
department.
selected database. For example, in the sample table - EMPLOYEE, find rows (and certain columns)
where the salary of a particular employee is greater than or equal to the average salary for their particular
department.
CREATE VIEW employee_view AS
SELECT a.empno, a.firstnme, a.salary, a.workdept
FROM employee a
WHERE a.salary >=
(SELECT AVG(b.salary)
FROM employee b
WHERE a.workdept = b.workdept);