5.1

Table Of Contents
Using the SQL Plug-In 4
You can use the API that the SQL plug-in provides to implement connectivity to SQL databases and other
tabular data sources, such as spreadsheets or flat files.
The SQL plug-in API which is based on JDBC, provides a call-level API for SQL-based database access. The
SQL plug-in also provides sample workflows that demonstrate how to use the API in workflows.
This chapter includes the following topics:
n
“SQL Plug-In Scripting API,” on page 35
n
“Running the SQL Sample Workflows,” on page 37
n
“SQL Plug-In Workflow Library,” on page 42
SQL Plug-In Scripting API
The SQL scripting API contains classes, with their respective methods, that enable interaction between vCenter
Orchestrator and SQL-based databases. You can use the API to create workflows that read data from and write
data to SQL-based databases.
Connection Class
The Connection class contains methods that control the connection to a database.
The Connection class defines the following methods.
Method Returns Description
close():Object Object
Releases the database and JDBC
resources for a Connection object.
createStatement():Object Object
Creates a Statement object for sending
SQL statements to the database.
prepareCall(string):PreparedSta
tement
PreparedStatement
Creates a CallableStatement object
for calling database stored procedures.
prepareStatement(string):Prepar
edStatement
PreparedStatement
Creates a PreparedStatement object
for sending parameterized SQL
statements to the database.
JDBCConnection Class
The JDBCConnection class contains a method that specifies the URL and credentials for a connection to a
database.
The Connection class defines the following method.
VMware, Inc.
35