The Query editor has a text editor for composing free-form
SQL statements to any JDBC- or ODBC-compliant database located on
the computer where the Cloud Pak System Software
Monitoring Portal server is installed.
Before you begin
Your user ID must have Modify Query permission for this function.
If you do not see the Queries tool, your user ID does not have View
or Modify Query permissions; if you can open the Query editor but
the tools are disabled, your user ID does not have Modify Query permission.
About this task
Use this task to create a new query of JDBC or ODBC attributes,
thus enabling you to integrate systems management data from monitoring
agents with data from other sources in one workspace.
Procedure
- Do either of the following actions to open the Query editor:
- Click Query editor in the
main toolbar.
- In the title bar of the view where you want to apply the new query,
click Properties > Click here to assign a query.
- Click Create New Query.
- In the Name field, type a name of up to 32 letters,
numbers, underscores (_) and spaces and, optionally, in the Description field,
type a description of up to 256 characters and spaces.
- From the Category list, select the folder where you want the new query to appear
in the Queries tree.
- Select a JDBC or ODBC database in the Data Sources list.
Custom SQL is selected
for you. If you do not see the database for which you want to create
the query, it must be added through Manage Tivoli Monitoring Services.
- Click OK.
The new query
is displayed in the Queries tree under
Folder (where
Folder is the Category you selected)
in the
Custom_SQL folder. The
Specification tab opens with
a Custom SQL text box for you to enter SQL commands.
- Write an SQL SELECT statement in the text box using the
correct syntax.
You must be familiar with SQL commands
and syntax to write a valid SQL query.
- When you are finished writing the SQL statement, click Apply to
save the query and keep the window open; or click OK to
save the query and close the window.
What to do next
If
the view remains empty after you assign the query, the query has not
been entered correctly. Review the notes for JDBC or ODBC database
queries and return to the Query editor to edit the SELECT statement
as needed.