Вы находитесь на странице: 1из 62

CONTROL-M for Databases Administrator Guide

Supporting
CONTROL-M for Databases version 6.4.01
July 2009

www.bmc.com

Contacting BMC Software


You can access the BMC Software website at http://www.bmc.com. From this website, you can obtain information about the company, its products, corporate offices, special events, and career opportunities.

United States and Canada


Address BMC SOFTWARE INC 2101 CITYWEST BLVD HOUSTON TX 77042-2827 USA Telephone 713 918 8800 or 800 841 2031 Fax 713 918 8000

Outside United States and Canada


Telephone (01) 713 918 8800 Fax (01) 713 918 8000

Copyright 2009 BMC Software, Inc. BMC, BMC Software, and the BMC Software logo are the exclusive properties of BMC Software, Inc., are registered with the U.S. Patent and Trademark Office, and may be registered or pending registration in other countries. All other BMC trademarks, service marks, and logos may be registered or pending registration in the U.S. or in other countries. All other trademarks or registered trademarks are the property of their respective owners. DB2 is a registered trademark of International Business Machines Corporation in the United States, other countries, or both. Linux is the registered trademark of Linus Torvalds. MSSQL is a registered trademark of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX is the registered trademark of The Open Group in the US and other countries.

BMC Software considers information included in this documentation to be proprietary and confidential. Your use of this information is subject to the terms and conditions of the applicable End User License Agreement for the product and the proprietary and restricted rights notices included in this documentation.

Restricted rights legend


U.S. Government Restricted Rights to Computer Software. UNPUBLISHED -- RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF THE UNITED STATES. Use, duplication, or disclosure of any data and computer software by the U.S. Government is subject to restrictions, as applicable, set forth in FAR Section 52.227-14, DFARS 252.227-7013, DFARS 252.227-7014, DFARS 252.227-7015, and DFARS 252.227-7025, as amended from time to time. Contractor/Manufacturer is BMC SOFTWARE INC, 2101 CITYWEST BLVD, HOUSTON TX 77042-2827, USA. Any contract notices should be sent to this address.

Customer support
You can obtain technical support by using the BMC Software Customer Support website or by contacting Customer Support by telephone or e-mail. To expedite your inquiry, see Before contacting BMC.

Support website
You can obtain technical support from BMC 24 hours a day, 7 days a week at http://www.bmc.com/support. From this website, you can
I I I I I I I I

read overviews about support services and programs that BMC offers find the most current information about BMC products search a database for issues similar to yours and possible solutions order or download product documentation download products and maintenance report an issue or ask a question subscribe to receive proactive e-mail alerts when new product notices are released find worldwide BMC support center locations and contact information, including e-mail addresses, fax numbers, and telephone numbers

Support by telephone or e-mail


In the United States and Canada, if you need technical support and do not have access to the web, call 800 537 1813 or send an e-mail message to customer_support@bmc.com. (In the subject line, enter SupID:<yourSupportContractID>, such as SupID:12345). Outside the United States and Canada, contact your local support center for assistance.

Before contacting BMC


Have the following information available so that Customer Support can begin working on your issue immediately:
I

product information product name product version (release number) license number and password (trial or permanent)

operating system and environment information machine type operating system type, version, and service pack or other maintenance level such as PUT or PTF system hardware configuration serial numbers related software (database, application, and communication) including type, version, and service pack or maintenance level

I I I

sequence of events leading to the issue commands and options that you used messages received (and the time and date that you received them) product error messages messages from the operating system, such as file system full messages from related software

License key and password information


If you have questions about your license key or password, contact BMC as follows:
I

(USA or Canada) Contact the Order Services Password Team at 800 841 2031, or send an e-mail message to ContractsPasswordAdministration@bmc.com. (Europe, the Middle East, and Africa) Fax your questions to EMEA Contracts Administration at +31 20 354 8702, or send an e-mail message to password@bmc.com. (Asia-Pacific) Contact your BMC sales representative or your local BMC office.

CONTROL-M for Databases Administrator Guide

Contents
About this book 7 Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Syntax statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 .......................................................................... 8 Chapter 1 Introduction to CONTROL-M for Databases 9

CONTROL-M for Databases overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Administrative tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Chapter 2 Installation 13 14 14 16 16 17 18 18 19 20 21 21 22 23 23 24 24 25 27 28 28 31 32 32 33

Installation overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UNIX installation on CONTROL-M/Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing CONTROL-M for Databases on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . Performing a silent installation on UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Windows installation on CONTROL-M/Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing CONTROL-M for Databases on Windows. . . . . . . . . . . . . . . . . . . . . . . . Performing a silent installation on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation on CONTROL-M/EM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Importing the Databases form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing the CONTROL-M for Databases plug-in on the CONTROL-M Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enabling Find and Update support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CONTROL-M for Databases Uninstall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Uninstalling CONTROL-M for Databases from UNIX . . . . . . . . . . . . . . . . . . . . . . Performing Silent Uninstall from UNIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Uninstalling CONTROL-M for Databases from Windows . . . . . . . . . . . . . . . . . . . Performing Silent Uninstall from Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 3 Account management

Account management overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding an account. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Updating an account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deleting an account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Testing an account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying an account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Contents

Chapter 4

Databases job definition

35

Databases job definition overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Accessing the Database job editing form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Defining a Stored Procedure job. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Defining an SQL Script job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Defining an SSIS Package job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Defining an Open Query database job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Defining a database job with the Query Designer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Chapter 5 CONTROL-M for Databases parameters 47

CONTROL-M for Databases parameters overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Execution Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Parameter Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Auto-Edit Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Query text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Data Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Parameter Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Append log to sysout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Append output to sysout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Select output format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Package Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Package Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 SSIS Configuration File Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 SSIS Parameter Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 SSIS Parameter Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Appendix A Startup and shutdown 57

Stopping the CONTROL-M for Databases service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Starting the CONTROL-M for Databases service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Viewing the status of the CONTROL-M for Databases service. . . . . . . . . . . . . . . . . . . 59 Disabling the Preview feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

CONTROL-M for Databases Administrator Guide

About this book


This book contains detailed information about CONTROL-M for Databases and is intended for CONTROL-M Administrators, CONTROL-M Production Controllers, system administrators and database administrators (DBAs). Like most BMC documentation, this book is available in printed and online formats. To request printed books or to view online books and notices (such as release notes and technical bulletins), see the Customer Support website at http://www.bmc.com/support. Most product shipments also include the books on a documentation CD.

NOTE
Online books are formatted as PDF or HTML files. To view, print, or copy PDF books, use the free Adobe Reader from Adobe Systems. If your product installation does not install the reader, you can obtain the reader at http://www.adobe.com.

The software also offers online Help. To access Help, press F1 within any product or click the Help button in graphical user interfaces (GUIs).

Related publications
I

CONTROL-M Administrator Guide describes setup, customization, maintenance, security and utilities for CONTROL-M on a specific operating system (for example, UNIX, or Microsoft Windows). CONTROL-M User Guide describes concepts, features, facilities, and how to define and manage CONTROL-M job processing definitions, Scheduling tables, and Calendars.

Syntax statements
The following example shows a sample syntax statement:
COMMAND KEYWORD1 [KEYWORD2 | KEYWORD3] KEYWORD4={YES | NO} fileName...

About this book

The following table explains conventions for syntax statements and provides examples:
Item Items in italic type represent variables that you must replace with a name or value. If a variable is represented by two or more words, initial capitals distinguish the second and subsequent words. Brackets indicate a group of optional items. Do not type the brackets when you enter the option. A comma means that you can choose one or more of the listed options. You must use a comma to separate the options if you choose more than one option. Braces indicate that at least one of the enclosed items is required. Do not type the braces when you enter the item. Example alias databaseDirectory serverHostName [tableName, columnName, field] [-full, -incremental, -level] (UNIX)

{DBDName | tableName} UNLOAD device={disk | tape, fileName | deviceName} {-a | -c} (UNIX)

A vertical bar means that you can choose only one of the listed items. In the example, you would choose either commit or cancel. An ellipsis indicates that you can repeat the previous item or items as many times as necessary.

{commit | cancel} {-commit | -cancel} (UNIX) columnName . . .

CONTROL-M for Databases Administrator Guide

Chapter

Introduction to CONTROL-M for Databases


1

CONTROL-M for Databases overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Administrative tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Chapter 1 Introduction to CONTROL-M for Databases

CONTROL-M for Databases overview

CONTROL-M for Databases overview


CONTROL-M for Databases is a control module that enables you to do the following:
I

Connect to any supported database from a single computer with secure login, which eliminates the need to provide authentication, as described in Chapter 3, Account management. Define and monitor Stored Procedure, SQL Script, SQL Server Integration Services (SSIS) Package, and Open Query database jobs, as described in Chapter 4, Databases job definition. Integrate database jobs with other CONTROL-M jobs into a single scheduling environment, as described in CONTROL-M User Guide. Introduce all CONTROL-M capabilities to Databases, including advanced scheduling criteria, complex dependencies, quantitative and control resources, and autoedit variables, as described in the CONTROL-M User Guide.

Administrative tasks
Certain CONTROL-M tasks might need to be performed by different professionals in your organization, as follows:
I

System Administrator: Responsible for reviewing the system requirements and performing the installation process. CONTROL-M Administrator: Responsible for the administration of all CONTROL-M processes. CONTROL-M Production Controller: Responsible for defining and/or monitoring CONTROL-M jobs. Application Expert: Oracle, MSSQL, and DB2 application developers and database administrators.

10

CONTROL-M for Databases Administrator Guide

Administrative tasks

Table 1 lists the tasks performed when working with the CONTROL-M for Databases and the role of the professional who is responsible for its administration. Table 1
Tasks Installing CONTROL-M for Databases on a CONTROL-M/Agent on UNIX, as described in UNIX installation on CONTROL-M/Agent on page 16 and on Windows, as described in Windows installation on CONTROL-M/Agent on page 18 Importing the database form, installing CONTROL-M for Databases on a CONTROL-M/EM client, and enabling Find and Update support, as described in Installation on CONTROL-M/EM on page 20 Adding, updating, deleting, copying, and testing accounts, as described in Chapter 3, Account management Defining Predefined Objects and Open Query database jobs, as described in Chapter 4, Databases job definition

Tasks and professional roles


Roles
I I

System Administrator CONTROL-M Administrator

I I

CONTROL-M Administrator Production Controller CONTROL-M Administrator Application Expert DBA CONTROL-M Production Controller CONTROL-M Administrator Application Expert DBA

I I I I I

Starting, stopping, and viewing the CONTROL-M for Databases process, as described in Appendix A, Startup and shutdown.

CONTROL-M Administrator

Chapter 1 Introduction to CONTROL-M for Databases

11

Administrative tasks

12

CONTROL-M for Databases Administrator Guide

Chapter

2
14 14 16 18 20 23

Installation
Installation overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UNIX installation on CONTROL-M/Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Windows installation on CONTROL-M/Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installation on CONTROL-M/EM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CONTROL-M for Databases Uninstall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 2

Installation

13

Installation overview

Installation overview
CONTROL-M for Databases can be installed on Windows and UNIX and must be installed on a CONTROL-M/Agent and a CONTROL-M/EM client. Table 2 describes the installation information and tasks for CONTROL-M for Databases. Table 2 Installation information and tasks
Description

Task/Information

Installation requirements on page 14 UNIX installation on CONTROL-M/Agent on page 16 Windows installation on CONTROL-M/Agent on page 18 Installation on CONTROL-M/EM on page 20

Defines the hardware and software installation requirements Describes how to install CONTROL-M for Databases on CONTROL-M/Agent on UNIX via regular and silent installation Describes how to install CONTROL-M for Databases on CONTROL-M/Agent on Windows via regular and silent installation Describes how to import the database form, install CONTROL-M for Databases on a CONTROL-M/EM client, and enabling Find and Update support

Installation requirements
Table 3 describes the software requirements to install CONTROL-M for Databases. Table 3
Software CONTROL-M/EM CONTROL-M/Agent CONTROL-M/Server Windows, UNIX, or Linux operating systems

Software requirements
Version 6.4.01 Fix Pack 2 or later 6.3.01 Fix Pack 2 or later 6.3.01 Fix Pack 2 or later For a list of the most current compatibility information for this version, see http://www.bmc.com/support/PAC_utility/index.cfm.

Table 4 describes the additional installation requirements to install CONTROL-M for Databases.

14

CONTROL-M for Databases Administrator Guide

Installation requirements

Table 4

Additional installation requirements


Details 512 MB 256 MB

Requirements Minimum RAM Required Disk Space

Table 5 lists the supported databases for CONTROL-M for Databases. Table 5
Database Oracle

Supported databases
Versions
I I I

9.2 10 11 2000 2005 2008 9.1 9.5

MSSQL

I I I

DB2

I I

NOTE
If you are using a DB2 database on z/OS or iSeries platforms, you need to obtain the required license file by contacting an IBM representative. After you have obtained the license file, you need to do the following: 1. Copy the license file to one of the following locations:
I I

Windows: <Agent_Home_Dir>\CM\DB\JDBCDrivers\db2\9\ UNIX: <Agent_Home_Dir>/ctm/cm/DB/JDBCDrivers/db2/9/

2. Stop the container, as described in the Stopping the CONTROL-M for Databases service on page 57. 3. Do the following: A. Access the following configuration file: Windows: <Agent_Home_Dir>\CM\DB\data\DriverList.xml UNIX: <Agent_Home_Dir>/ctm/cm/DB/data/DriverList.xml B. Open the file and locate <DBVendor>DB2</DBVendor>. C. Locate <DriverJars> and add the following element value: <Jar>db2/9/<license filename></Jar>

Chapter 2

Installation

15

UNIX installation on CONTROL-M/Agent

UNIX installation on CONTROL-M/Agent


The following procedures describe how to install CONTROL-M for Databases on CONTROL-M/Agent on UNIX via interactive or silent installation.
I I

Installing CONTROL-M for Databases on UNIX on page 16 Performing a silent installation on UNIX on page 17

Installing CONTROL-M for Databases on UNIX


This procedure describes how to install the CONTROL-M for Databases on a CONTROL-M/Agent via interactive installation.

NOTE
The default installation is interactive and uses a GUI display. XServer must be running and configured using the DISPLAY environment variable. If you do not have XServer available, it is recommended that you perform a silent installation. For more information, see Performing a silent installation on UNIX on page 17.

To install on UNIX: 1 Ensure that all jobs running on the CONTROL-M/Agent have ended. 2 Log in as user root, and stop the CONTROL-M/Agent by running the following
command:
<CONTROL-M Agent directory>/scripts/shut-ag -u <agentUser> -p all

3 Mount the installation DVD. 4 Log in as the CONTROL-M/Agent user. 5 Set your DISPLAY environment variable according to your computer name.
For csh or tcsh shell users: setenv DISPLAY <your computer name>:0.0

6 Type the following command:


<dvd_path>/Setup.sh

7 Continue with the installation wizard, following the on-screen instructions.

16

CONTROL-M for Databases Administrator Guide

Performing a silent installation on UNIX

8 To view the installation log, click View Log. 9 Log in as user root, and start the CONTROL-M/Agent by running the following
command:
<CONTROL-M Agent directory>/scripts/start-ag -u <agentUser> -p all

10 Continue with Installation on CONTROL-M/EM on page 20.

Performing a silent installation on UNIX


This procedure describes how to perform a silent installation on a UNIX platform. You need to prepare an XML parameter file before you can perform the silent installation. To create the XML parameter file you must first run a full installation on one of your machines.

NOTE
If XServer is not available to run a full installation, to prepare the XML parameters file, copy the XML parameters file from the Setup_files folder on the installation DVD.

To prepare an XML parameter file: 1 Log in as an Agent user. 2 Set your DISPLAY environment variable according to your computer name.
For csh or tcsh shell users: setenv DISPLAY <your computer name>:0.0

3 From the installation DVD, activate the installation script with the following
command:
<dvd_path>/Setup.sh

4 Continue with the installation wizard, following the instructions on each screen to
complete the interactive installation.

5 On the last screen, click Generate Silent Installation File and select the location to
create the XML parameter file.

Chapter 2

Installation

17

Windows installation on CONTROL-M/Agent

6 Copy the automatic installation parameters file to a network location that is


accessible to all computers on which a silent installation will be performed.

To perform the silent installation: 1 Log in as user root, and stop the CONTROL-M/Agent by running the following
command:
<CONTROL-M Agent directory>/scripts/shut-ag -u <agentUser> -p all

2 Log in as an Agent user. 3 To run the installation script, type the following command:
<dvd_path>/Setup.sh <silent.xml>

The installation log can be found at the following location:


/tmp/bmc_<timestamp>.log

4 Log in as user root, and start the CONTROL-M/Agent by running the following
command:
<CONTROL-M Agent directory>/scripts/start-ag -u <agentUser> -p all

5 Continue with Installation on CONTROL-M/EM on page 20.

Windows installation on CONTROL-M/Agent


The following procedures describe how to install CONTROL-M for Databases on CONTROL-M/Agent on Windows via interactive or silent installation.
I I

Installing CONTROL-M for Databases on Windows on page 18 Performing a silent installation on Windows on page 19

Installing CONTROL-M for Databases on Windows


This procedure describes how to install the CONTROL-M for Databases on CONTROL-M/Agent via an interactive installation.

18

CONTROL-M for Databases Administrator Guide

Performing a silent installation on Windows

To install on Windows: 1 Ensure that all jobs running on the CONTROL-M/Agent have ended. 2 Log in to the computer using a user ID that has Administrator privileges. 3 Do one of the following:
I

From the installation DVD, double-click the Setup.bat file. From a command prompt window, enter <dvd_path>/Setup.bat.

4 Select the CONTROL-M/Agent to perform the installation. Continue with the


installation wizard, following the on-screen instructions until the completion of the installation.

5 To view the installation log, click View Log.


Continue with Installation on CONTROL-M/EM on page 20.

Performing a silent installation on Windows


This procedure describes how to perform a silent installation on Windows. You need to prepare an XML parameter file before performing the silent installation. To create the XML parameter file, you must first run a full installation on one of your machines.

To prepare an XML parameter file: 1 Log in to the computer using a user ID that has Administrator privileges. 2 Do one of the following:
I I

From the installation DVD, double-click the Setup.bat file. From a command prompt window, enter <dvd_path>\Setup.bat.

3 Continue with the installation wizard, following the instructions on each screen in
order to complete the interactive installation.

4 On the last screen, click Generate Silent Installation File and select the location to
create the XML parameter file.
Chapter 2 Installation 19

Installation on CONTROL-M/EM

5 In the XML parameter file, modify the following parameter as needed:


I I

Agent.Folder - location of Agent installation directory. Agent.Name - logical name of Agent installation.

6 Copy the automatic installation parameters file to a network location that is


mapped to a drive that is accessible to all computers where a silent installation is performed.

To perform the silent installation: 1 Log in using a user ID that has Administrator privileges on the current computer
as an Agent user.

2 Ensure that the installation DVD is still in the DVD drive. 3 To run the installation script, type:
<dvd_path>\Setup.bat <silent.xml>

The installation log can be found at the following location:


%temp%\bmc_<timestamp>.log

Installation on CONTROL-M/EM
The following procedures describes how to install CONTROL-M for Databases on CONTROL-M/EM and must be done in the following order: 1. Importing the Databases form on page 21 2. Installing the CONTROL-M for Databases plug-in on the CONTROL-M Configuration Manager on page 21 3. Enabling Find and Update support on page 22

20

CONTROL-M for Databases Administrator Guide

Importing the Databases form

Importing the Databases form


This procedure describes how to import the Databases form, which enables you to define database jobs in the job editing form in CONTROL-M/Desktop.

NOTE
This procedure must be performed on every computer that has CONTROL-M/EM client components installed.

To import the Databases Job Editing form: 1 Ensure that the CONTROL-M for Databases <Databases 6401 DVD> is mounted or
easily accessible through your network.

2 In CONTROL-M/Desktop, select Tools => Import Applications Forms. 3 Navigate to the Forms directory on the application DVD. 4 Select the DATABASE.xml file and click Import to import the Databases panel. 5 Continue with Installing the CONTROL-M for Databases plug-in on the
CONTROL-M Configuration Manager on page 21.

Installing the CONTROL-M for Databases plug-in on the CONTROL-M Configuration Manager
This procedure describes how to install CONTROL-M for Databases plug-in on the CONTROL-M Configuration Manager, which enables you to manage database accounts.

To install the plug-in on the CONTROL-M Configuration Manager: 1 Log in with a user ID with administrator privileges on the specific computer. 2 Ensure that the CONTROL-M Configuration Manager is closed. 3 Navigate to the <Databases 6401 DVD>\CCM\EM_Client directory. 4 Run the Install_EM_Client_Databases_Plugin.cmd file, and follow the installation
instructions provided.

Chapter 2

Installation

21

Enabling Find and Update support

NOTE
To use the CONTROL-M for Databases utilities in the CONTROL-M Configuration Manager, you must ensure that the ctmgetcm utility has run in CONTROL-M/Server. For more information, see the CONTROL-M Administrator Guide.

5 Continue with Enabling Find and Update support on page 22.

Enabling Find and Update support


This procedures describes how to enable the Find and Update support, which enables you to find and update multiple jobs with one action.

To enable Find and Update support: 1 From the installation DVD, copy the DATABASE_appl.xml file located in the
ApplFields directory to the following CONTROL-M/EM directory:
I

CONTROL-M/EM client installation: <EM home directory>\etc\applfields\

CONTROL-M/EM server installation: I Windows: <EM home directory>\etc\applfields\ I Unix: <EM home directory>/etc/applfields/

2 From the CONTROL-M Configuration Manager, restart the CONTROL-M GUI


server.

Where to Go from Here


After you have finished installing CONTROL-M for Databases, you need to create an account in the CONTROL-M Configuration Manager, as described in Chapter 3, Account management. After you have created an account you can define a CONTROL-M for Databases job, as described in Chapter 4, Databases job definition.

22

CONTROL-M for Databases Administrator Guide

CONTROL-M for Databases Uninstall

CONTROL-M for Databases Uninstall


The following procedures describe how to uninstall CONTROL-M for Databases from UNIX and Microsoft Windows:
I I I I

Uninstalling CONTROL-M for Databases from UNIX on page 23 Performing Silent Uninstall from UNIX on page 24 Uninstalling CONTROL-M for Databases from Windows on page 24 Performing Silent Uninstall from Windows on page 25

Uninstalling CONTROL-M for Databases from UNIX


This procedure describes how to uninstall CONTROL-M for Databases from UNIX.

To uninstall from UNIX: 1 On a CONTROL-M/Agent computer, log in as user root, and run the shut-ag
command to shut down CONTROL-M/Agent.

2 Set your DISPLAY environment variable according to the computer name.


For csh or tcsh shell users: setenv DISPLAY <your computer name>:0.0

3 Navigate to the following directory:


<Agent_Root_Dir>/ctm/cm/DB/Uninstaller

4 Run the following command:


./Uninstall.sh

CONTROL-M for Databases has been successfully removed from your computer.

5 To restart CONTROL-M/Agent, log in as user root and run the start-ag command.

Chapter 2

Installation

23

Performing Silent Uninstall from UNIX

Performing Silent Uninstall from UNIX


This procedure describes how to perform silent uninstall from UNIX.

To perform silent uninstall from UNIX: 1 On your CONTROL-M/Agent computer, log in as user root, and run the shut-ag
command to shut down CONTROL-M/Agent.

2 Navigate to the following directory:


<Agent_Root_Dir>/ctm/cm/DB/Uninstaller

3 Run the following command:


./Uninstall.sh -silent

CONTROL-M for Databases has been successfully removed from your computer.

4 To restart CONTROL-M/Agent, log in as user root and run the start-ag command.

Uninstalling CONTROL-M for Databases from Windows


This procedure describes how to uninstall CONTROL-M for Databases from Windows.

To uninstall from Windows: 1 From the Start menu, select Settings => Control Panel. 2 Double-click Add/Remove Programs. 3 Select CONTROL-M for Databases, and click Add/Remove. 4 Click OK to continue.
CONTROL-M for Databases has been successfully removed from your computer.

24

CONTROL-M for Databases Administrator Guide

Performing Silent Uninstall from Windows

Performing Silent Uninstall from Windows


This procedure describes how to perform silent uninstall from Windows.

To perform silent uninstall from Windows: 1 Log into the computer using a user ID that has Administrator privileges. 2 Navigate to the following directory:
<Agent_Root_Dir>\cm\DB\Uninstaller

3 Run the following command:


Uninstall.bat -silent

CONTROL-M for Databases has been successfully removed from your computer.

Chapter 2

Installation

25

Performing Silent Uninstall from Windows

26

CONTROL-M for Databases Administrator Guide

Chapter

3
28 28 31 32 32 33

Account management
Account management overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding an account. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Updating an account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deleting an account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Testing an account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Copying an account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 3

Account management

27

Account management overview

Account management overview


Before you can define a database job in CONTROL-M/Desktop, you need to add an account in the CONTROL-M Configuration Manager, which enables you to connect to the required database. An account contains the connection parameters to a specified database, such as database server name, database type, schema, username, and password. By adding an account to the CONTROL-M Configuration Manager, you enable CONTROL-M for Databases users to connect to the required database with only the account name. Users then can define or modify a job without having to provide authentication details every time they connect to the database. The following procedures describe how to add, update, delete, test, and copy an account in the CONTROL-M Configuration Manager:
I I I I I

Adding an account on page 28 Updating an account on page 31 Deleting an account on page 32 Testing an account on page 32 Copying an account on page 33

Adding an account
This procedure describes how to add an account in the CONTROL-M Configuration Manager, which enables you to connect to a database.

To add an account: 1 From the CONTROL-M Configuration Manager, right-click the Databases Control
Module and select Account Management. The CONTROL-M for Databases - Account Management dialog box appears.

2 Click the

icon.

The Add Account-Choose target database dialog box appears.

3 Do the following:
I

In the Account Name field, type the name of the account that you want to add without any spaces.

28

CONTROL-M for Databases Administrator Guide

Adding an account

From the Database Type dropdown list, select one of the following database types:
I I I

MSSQL DB2 Oracle

From the Database Version dropdown list, select the version of the database.

NOTE
CONTROL-M for Databases SSIS feature only supports MSSQL 2005 and 2008.

4 Click Next.
The Add Account-Database Connection Parameters dialog box appears.

NOTE
The database account type that appears depends on what you selected in the Add Account-Initial Step dialog box.

5 Type the required values for each field, as described in Table 6.


Table 6
Parameter Host Name Port Number Database Name SQL Server Authentication

Add Account-Database Connection Parameters (part 1 of 2)


Description Defines the hostname of the specified database. Defines the port number of the specified database. The default values are different for each database type. Defines the name of the specified database. Authenticates the user to the database through an SQL server. This field is only relevant for MSSQL.

Chapter 3

Account management

29

Adding an account

Table 6
Parameter

Add Account-Database Connection Parameters (part 2 of 2)


Description Authenticates the user to the database through Windows. This field is only relevant for MSSQL. Note: To perform any related SSIS task, you need to do the following:
I

Windows Authentication

Verify that the defined user in the account has the Log on as a batch job permission in the Local Security policy window (Control Panel > Administrative Tools > Local Security Policy > Local Policies > User Rights Assignment) Verify that the defined user in the account either has read and write permissions in the CONTROL-M/Agent root directory or is added to the Administrator group

User Name Password Confirm Password

Defines the username of the specified database. Defines the password of the specified database. Confirms the password of the specified database.

6 Click Next.
The Advanced Account Configuration dialog box appears.

7 Type the required values for each field, as described in Table 7.


Table 7
Parameter Maximum concurrent connections

Add Account-Advanced Account Configuration parameters


Description Determines the maximum number of connections between 1-512 that the database can process at the same time

Number of connection retries Determines the number of connection attempts between 1-24 after a connection failure Connection retry time out Disconnect after Determines the time in seconds (1-300) between each connection attempt Determines the number of seconds that the database account remains idle before disconnecting

Disconnect immediately if no Defines the database account to disconnect when idle pending request

8 Click Next.
If you selected the MSSQL database type, the Add Account-SSIS Package Password Definition dialog box appears; otherwise, go to step 11.

9 To enable access to an SSIS package, add a password to the package by doing the
following:
30 CONTROL-M for Databases Administrator Guide

Updating an account

A Click Add.
The Add Package dialog box appears.

B Enter the required details and click OK. 10 Click Next.


The Add Account-Summary dialog box appears.

11 Review the account details and click Test.


If the test completed successfully, the database account is validated and you can now define a database job, as described in Chapter 4, Databases job definition. If the test failed, review the account parameters and test it again.

12 Click Finish.

Updating an account
This procedure describes how to update an account in the CONTROL-M Configuration Manager, which enables you to connect to a database.

To update an account: 1 From the CONTROL-M Configuration Manager, right-click on the Databases
Control Module and select Account Management. The CONTROL-M for Databases - Account Management dialog box appears.

2 Select an account that you want to update and click the

icon.

3 Update the required parameters in the Database Connection Parameters tab, as


described in Table 6 and the Advanced Connection Configuration tab, as described in Table 7.

4 Click Test.
If the test completed successfully, the database account is validated and you can now define a database job, as described in Chapter 4, Databases job definition. If the test failed, review the account parameters and test it again.

5 Click OK.

Chapter 3

Account management

31

Deleting an account

Deleting an account
This procedure describes how to delete an account from the CONTROL-M Configuration Manager.

To delete an account: 1 From the CONTROL-M Configuration Manager, right-click the Databases Control
Module and select Account Management. The CONTROL-M for Databases - Account Management dialog box appears.

2 Select an account that you want to delete, and click the


A confirmation messages appears.

icon.

3 Click OK.
The account is deleted.

Testing an account
This procedure describes how to test an account in the CONTROL-M Configuration Manager, to confirm that you are able to connect to the required database.

To test an account: 1 From the CONTROL-M Configuration Manager, right-click the Databases Control
Module and select Account Management. The CONTROL-M for Databases - Account Management dialog box appears.

2 Select an account that you want to test and click the

icon.

If the test completed successfully, the database account is validated and you can now define a database job, as described in Chapter 4, Databases job definition. If the test failed, review the account parameters and test it again.

32

CONTROL-M for Databases Administrator Guide

Copying an account

Copying an account
This procedure describes how to copy an account in the CONTROL-M Configuration Manager, which enables you to create an account using the parameters of an existing account.

To copy an account: 1 From the CONTROL-M Configuration Manager, right-click the Databases Control
Module and select Account Management. The CONTROL-M for Databases - Account Management dialog box appears.

2 Select an account that you want to copy and click the


The Copy <accountName> Account dialog box appears.

icon.

3 Update the required parameters in the Database Connection Parameters tab, as


described in Table 6 and the Advanced Connection Configuration tab, as described in Table 7.

4 Click Test.
If the test completed successfully, the database account is validated and you can now define a database job, as described in Chapter 4, Databases job definition. If the test failed, review the account parameters and test it again.

5 Click OK.

Chapter 3

Account management

33

Copying an account

34

CONTROL-M for Databases Administrator Guide

Chapter

4
36 36 37 39 40 42 43

Databases job definition


Databases job definition overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Accessing the Database job editing form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining a Stored Procedure job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining an SQL Script job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining an SSIS Package job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining an Open Query database job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining a database job with the Query Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 4 Databases job definition

35

Databases job definition overview

Databases job definition overview


In CONTROL-M for Databases, you can define one or more of the following database jobs:
I

Stored Procedure: Defines a database job with a program that is stored on the

database, as described in Defining a Stored Procedure job on page 37.


I

SQL Script: Defines a database job with a script that is stored on a file system, as described in Defining an SQL Script job on page 39. SQL Server Integration Services (SSIS): Defines an SSIS Package job, as described in Defining an SSIS Package job on page 40 Open Query: Defines a database job by creating an SQL query statement, as described in Defining an Open Query database job on page 42. You can also create an SQL statement with the Query Designer, which acts as a wizard to build an SQL statement, as described in Defining a database job with the Query Designer on page 43.

After you have defined a database job, you can enhance it by doing the following:
I

Integrate database jobs with other CONTROL-M jobs into a single scheduling environment, as described in CONTROL-M User Guide. Introduce all CONTROL-M capabilities to databases, including advanced scheduling criteria, complex dependencies, quantitative and control resources, and AutoEdit variables, as described in the CONTROL-M User Guide.

Accessing the Database job editing form


This procedure describes how to access the database job editing form, which enables you to define a database job.

To access the Database form: 1 Log in to CONTROL-M/Desktop, as described in the CONTROL-M User Guide. 2 From the Edit menu, select New Job. 3 From the Job Type dropdown list, select Databases. 4 Click the DATABASE tab.

36

CONTROL-M for Databases Administrator Guide

Defining a Stored Procedure job

The DATABASE job editing form appears.

Defining a Stored Procedure job


This procedure describes how to define a database job with a program that is stored on the database.

Before You Begin


Ensure that you have met the following requirements:
I

A configured database account, as described in Chapter 3, Account management. Successful completion of Accessing the Database job editing form on page 36.

To define a Stored Procedure job: 1 From the Account field, click Load.
The Selector dialog box appears.

2 Select the account that you want to use to connect to a database and click OK. 3 From the Execution Type dropdown list, select Stored Procedure. 4 In the Name field, do one of the following:
I

To retrieve available stored procedures from all available schemas or packages (Oracle only), click the icon, select the required stored procedure and click OK. To retrieve available stored procedures from a specific schema and/or a package (Oracle only), do the following:
I I I

In the Schema field, click the icon, select the schema, and click OK. In the Package field, type the name of the package, and click OK (Oracle only). Click the icon, select the required stored procedure, and click OK.

Chapter 4 Databases job definition

37

Defining a Stored Procedure job

To retrieve available stored procedures from a partial list of available schemas and/or packages (Oracle only), do the following:
I I

In the Schema field, type a partial name of a schema, followed by an *. In the Package field, type a partial name of a package, followed by an * (Oracle only). Click the icon, select the required stored procedure and click OK.

The object parameters are retrieved from the database and appear in the Parameters table.

5 Do one or more of the following:


I

For each In parameter, in the Value column, type a value such as string or an integer, or type an autoedit, as described in the CONTROL-M Parameter Guide. For each Out parameter, in the Auto-Edit Variable column, type an autoedit, as described in the CONTROL-M Parameter Guide (optional). For each In/Out parameter, in the Value column, type a value, such as an integer, or a string, or type an autoedit, as described in the CONTROL-M Parameter Guide. For each Return parameter, in the Auto-Edit column, type an autoedit, as described in the CONTROL-M Parameter Guide (optional).

6 Click Sysout Handling.


The Sysout Handling dialog box appears.

7 Select one or more of the following:


I

Append Log to Sysout: Shows the Environment information, Request statement, and Job statistics in the Sysout. Append Output to Sysout: Shows the job output in a Text, XML, CSV, or HTML

format. From the Select Output format dropdown list, select an output format and click OK. For more information about defining a job in the job editing form, see the CONTROL-M User Guide.

38

CONTROL-M for Databases Administrator Guide

Defining an SQL Script job

Defining an SQL Script job


This procedure describes how to define a database job with a script that is stored on a file system.

NOTE
CONTROL-M for Databases does not support conversion of database separators between different database types. The following list the database separators for each database:
I I I

Oracle and DB2 statement separators are defined as ; Oracle block separator is defined as / DB2 block separator is defined as @

A block separator must appear on a new line at the end of each block.

Before You Begin


Ensure that you have met the following requirements:
I

A configured database account, as described in Chapter 3, Account management. Successful completion of Accessing the Database job editing form on page 36.

To define an SQL Script job: 1 From the Account field, click Load.
The Selector dialog box appears.

2 Select the account that you want to load and click OK. 3 From the Execution Type dropdown list, select SQL Script. 4 Click Browse. 5 Browse for the required SQL script and click Open. 6 If there are script variables for this script, in the Script Variables table, click the
icon and type the variable and its value.

Chapter 4 Databases job definition

39

Defining an SSIS Package job

EXAMPLE
If the script content is select count(*) from $1, then $1 is the variable that requires a value in the Scripts Variables table.

NOTE
Variables and the conventions of the SQL script are not displayed in the CONTROL-M for Databases job editing form.

7 Click Sysout Handling.


The Sysout Handling dialog box appears.

8 Select one or more of the following:


I

Append Log to Sysout: Shows the Environment information, Request statement, and Job statistics in the Sysout. Append Output to Sysout: Shows the job output in a Text, XML, CSV, or HTML

format. From the Select Output format dropdown list, select an output format and click OK. For more information about defining a job in the job editing form, see the CONTROL-M User Guide.

Defining an SSIS Package job


This procedure describes how to define an SSIS Package job.

NOTE
The SSIS feature in CONTROL-M for Databases has the following requirements:
I I

SSIS Packages are executed only on a Windows computer. SSIS Packages are executed locally on the computer where the CONTROL-M/Agent is installed. SSIS service installed on the CONTROL-M/Agent computer.

40

CONTROL-M for Databases Administrator Guide

Defining an SSIS Package job

Before You Begin


Ensure that you have met the following requirements:
I

A configured database account, as described in Chapter 3, Account management. Successful completion of Accessing the Database job editing form on page 36.

To define an SSIS Package job: 1 From the Account field, click Load.
The Selector dialog box appears.

2 Select the MSSQL account that you want to load and click OK. 3 From the Execution Type dropdown list, select SSIS Package. 4 From the Package Source dropdown list, select one of the following:
I I I

SQL Server: Package stored on an MSSQL database File System: Package stored on the CONTROL-M/Agents local file system SSIS Package Store: Package stored on a file system that is managed by an SSIS

service.

5 Click the

icon, browse to the location, and select the SSIS Package.

6 If you want to apply specific data that is saved in a configuration file to the SSIS
Package, in the Configuration Files area, click the icon.

7 Browse and select the configuration file that you want to add. 8 If there are property paths in this package, in the Properties table, click the
and type the property path and its value. icon

9 Click Sysout Handling.


The Sysout Handling dialog box appears.

10 Select one or more of the following:


I

Append Log to Sysout: Shows the Environment information, Request statement, and Job statistics in the Sysout. Append Output to Sysout: Shows the job output in Text format.

Chapter 4 Databases job definition

41

Defining an Open Query database job

11 Click OK.
For more information about defining a job in the job editing form, see the CONTROL-M User Guide.

Defining an Open Query database job


This procedure describes how to define a database job by creating a query or editing a predefined query.

NOTE
CONTROL-M for Databases does not support conversion of database separators between different database types. The following list the database separators for each database:
I I I

Oracle and DB2 statement separators are defined as ; Oracle block separator is defined as / DB2 block separator is defined as @

A block separator must appear on a new line at the end of each block.

Before You Begin


Ensure that you have met the following requirements:
I

A configured database account, as described in Chapter 3, Account management. Successful completion of Accessing the Database job editing form on page 36.

To define a query database job: 1 From the Account field, click Load.
The Selector dialog box appears.

2 Select the account that you want to load and click OK. 3 From the Execution Type dropdown list, select Open Query. 4 Do one of the following:
42 CONTROL-M for Databases Administrator Guide

Defining a database job with the Query Designer

To create an SQL query statement, in the Query Text field, type the required query. To edit an existing SQL statement, do the following:
I I

Click Insert from File, and select the required SQL file. In the Query Text field, edit the query, or use the Query Designer, as described in Defining a database job with the Query Designer on page 43.

5 Click Sysout Handling.


The Sysout Handling dialog box appears.

6 Select one or more of the following:


I

Append Log to Sysout: Shows the Environment information, Request statement,

and Job statistics in the Sysout.


I

Append Output to Sysout: Shows the job output in a Text, XML, CSV, or HTML

format. From the Select Output format dropdown list, select an output format and click OK. For more information about defining a job in the job editing form, see the CONTROL-M User Guide.

Defining a database job with the Query Designer


This procedure describes how to define a database job with the Query Designer, which acts as a wizard to build an open query. You can also write an open query and then use the Query Designer to finish the statement or vice versa. At any point in the query, you can use the Query Designer to add to the statement.

Before You Begin


Ensure that you have met the following requirements:
I

A configured database account, as described in Chapter 3, Account management. Successful completion of Accessing the Database job editing form on page 36.

Chapter 4 Databases job definition

43

Defining a database job with the Query Designer

To define a database job with the Query Designer: 1 From the Account field, click Load.
The Selector dialog box appears.

2 Select the account that you want to load and click OK. 3 From the Execution Type dropdown list, select Open Query. 4 Click Query Designer.
The Query Designer dialog box appears.

5 In the Filter field, type <tableNameOrViewName>* or <partOfTableOrViewName>*


and click Load. The generated items appear in the Object Selection table.

6 Select the required table or view and click the

icon.

The selected items appear in the Selected Objects table.

7 In the Relations area, click the


select the field names.

icon.

8 To create a relationship between two fields, from the Column dropdown lists, 9 In the Output Definition area, click the
icon.

10 For each field name, apply output definitions as required.


The SQL query statement appears in the Statement area.

11 To view a sample output of the query, click Preview. 12 Click Insert.


The query statement appears in the Query text field.

13 Click Sysout Handling.


The Sysout Handling dialog box appears.

14 Select one or more of the following:

44

CONTROL-M for Databases Administrator Guide

Defining a database job with the Query Designer

Append Log to Sysout: Shows the Environment information, Request statement,

and Job statistics in the Sysout.


I

Append Output to Sysout: Shows the job output in a Text, XML, CSV, or HTML

format. From the Select Output format dropdown list, select an output format and click OK. For more information about defining a job in the job editing form, see the CONTROL-M User Guide.

Chapter 4 Databases job definition

45

Defining a database job with the Query Designer

46

CONTROL-M for Databases Administrator Guide

Chapter

5
48 49 49 49 49 50 50 50 51 51 51 52 52 52 53 53 53 53 54 54 54 55

CONTROL-M for Databases parameters


5

CONTROL-M for Databases parameters overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . Account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Execution Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameter Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Auto-Edit Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Query text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameter Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Append log to sysout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Append output to sysout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Select output format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Package Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Package Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SSIS Configuration File Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SSIS Parameter Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SSIS Parameter Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Chapter 5

CONTROL-M for Databases parameters

47

CONTROL-M for Databases parameters overview

CONTROL-M for Databases parameters overview


Job definition parameters in CONTROL-M for Databases enable you to apply values for the Auto Edit variables, as described in the CONTROL-M User Guide. Table 8 describes the parameters for the CONTROL-M for Databases. Table 8
Parameter Account Execution Type Query Schema Package Name Parameter Name Value Auto-Edit Variable

Job definition parameter descriptions


Description Defines the database account Defines the database job as a stored procedure, SQL Script, SSIS package, or Open Query Defines the database job as an Open Query job Filters stored procedures results according to schema names Filters stored procedures results according to package names Defines the name of the stored procedure Defines the names of the stored procedure parameters Defines the parameter values of the store procedure and SQL script Defines the autoedit name that stores the OUT and Return parameters result in stored procedure submission Defines the variables of the SQL Script Defines the content of the SQL Script Defines the data type of the stored procedure, such as string or integer Defines the stored procedure column type as IN or OUT Shows the log in the sysout Shows the output in the sysout Defines the output format as either text, XML, CSV, or HTML

Variable Query text Data Type Parameter Type Append log to sysout Append output to sysout Select output format Package Source Package Name SSIS Configuration File Names SSIS Parameter Names SSIS Parameter Values

Defines the location of the SSIS Package in SQL Server, File System, or SSIS Package Store
Defines the name of the SSIS Package

Defines the names of the configuration files that are added to the SSIS package.
Defines the name of each SSIS property path

Defines the values of each SSIS property path

48

CONTROL-M for Databases Administrator Guide

Account

Account
Defines the CONTROL-M for Databases account. Usage Length Case Sensitive Variable Name Mandatory 1 - 30 characters Yes - only capital letters %%DB-ACCOUNT

Execution Type
Defines the database job as a Stored Procedure, SQL Script, SSIS, or Open Query. Usage Length Case Sensitive Variable Name Possible Values Mandatory N/A No %%DB-EXEC_TYPE Stored Procedure, SQL Script, SSIS, Open Query

Query
Defines the database job as an Open Query job. Usage Length Case Sensitive Variable Name Mandatory
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-QTXT-Nnnn-SUBQTXT

Schema
Filters stored procedures results according to schema names.

Chapter 5

CONTROL-M for Databases parameters

49

Package

Usage Length Case Sensitive Variable Name

Optional
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-STP_SCHEM

Package
Filters stored procedures results according to package names. Usage Length Case Sensitive Variable Name Optional
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-STP_PACKAGE

Name
Defines the name of the Stored Procedure or SQL Script. Usage Length Case Sensitive Variable Name Mandatory
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-STP_NAME %%DB-SCRPT_NAME

Parameter Name
Defines the names of the stored procedure parameters.

50

CONTROL-M for Databases Administrator Guide

Value

Usage Length Case Sensitive Variable Name

Optional
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-STP-PARAMS-Pnnn-PRM_NAME

Value
Defines the parameter values of the store procedure and SQL script. Usage Length Case Sensitive Variable Name Optional
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-STP-PARAMS-Pnnn-PRM_VALUE %%DB-SCRPT-PARMS-Pnnn-VALUE

Auto-Edit Variable
Defines the autoedit name that stores the OUT and Return parameters result in stored procedure submission. Usage Length Case Sensitive Variable Name Optional
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No DB-STP_PARAMS-Pnnn-PRM_SETVAR

Variable
Defines the variables of the SQL Script. Usage Length Optional
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

Chapter 5

CONTROL-M for Databases parameters

51

Query text

Case Sensitive Variable Name

No %%DB-SCRPT-PARMS-Pnnn-VARIABLE

Query text
Defines the content of the SQL Script. Usage Length Case Sensitive Variable Name Mandatory
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-QTXT-Nnnn-SUBQTXT

Data Type
Defines the data type of the stored procedure, such as string or integer. Usage Length Case Sensitive Variable Name Optional
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-STP-PARAMS-Pnnn-PRM_TYPE

Parameter Type
Defines the stored procedure column type as IN or OUT. Usage Length Case Sensitive Variable Name Optional
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-STP_PARAMS-Pnnn-PRM_DIRECTION

52

CONTROL-M for Databases Administrator Guide

Append log to sysout

Append log to sysout


Shows the log in the sysout. Usage Length Case Sensitive Variable Name Default Optional N/A No %%DB-APPEND_LOG Yes

Append output to sysout


Shows the output in the sysout. Usage Length Case Sensitive Variable Name Default Optional N/A No %%DB-APPEND_OUTPUT Yes

Select output format


Defines the output format as either text, XML, CSV, or HTML. Usage Length Case Sensitive Variable Name Possible Values Default Mandatory N/A No %%DB-OUTPUT_FORMAT Text, XML, CSV, HTML Text

Package Source
Defines the location of the SSIS Package in SQL Server, File System, or SSIS Package Store.
Chapter 5 CONTROL-M for Databases parameters 53

Package Name

Usage Length Case Sensitive Variable Name

Mandatory N/A No %%DB-SSIS_PACKAGE_SOURCE

Package Name
Defines the name of the SSIS Package. Usage Length Case Sensitive Variable Name Mandatory
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-SSIS_PACKAGE_NAME

SSIS Configuration File Names


Defines the names of the configuration files that are added to the SSIS package.
Usage Length Case Sensitive Variable Name Optional
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-SSIS_CONFIGFILES-Nxxx-NAME

SSIS Parameter Names


Defines the name of each SSIS property path. Usage Length Case Sensitive Variable Name Mandatory
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-SSIS_SETVALPARAMS-Nxxx-NAME

54

CONTROL-M for Databases Administrator Guide

SSIS Parameter Values

SSIS Parameter Values


Defines the values of each SSIS property path.
Usage Length Case Sensitive Variable Name Mandatory
I I

Version 6.3.01: 1 - 214 characters Version 6.4.01: 1- 4096 characters

No %%DB-SSIS_SETVALPARAMS-Nxxx-VALUE

Chapter 5

CONTROL-M for Databases parameters

55

SSIS Parameter Values

56

CONTROL-M for Databases Administrator Guide

Appendix

Startup and shutdown


The following procedures describe how to stop, start, and view the CONTROL-M for Databases process:
I

Stopping the CONTROL-M for Databases service on page 57: Describes how to stop the CONTROL-M for Database process, which enables you to reinstall, upgrade, change port numbers, or run system maintenance on the CONTROL-M for Databases service Starting the CONTROL-M for Databases service on page 58: Describes how to start the CONTROL-M for Database process, which enables you to restart the CONTROL-M for Databases process if it failed to restart automatically after it was shut down Viewing the status of the CONTROL-M for Databases service on page 59: Describes how to view the status of the CONTROL-M for Database process, which enables you to know if the process is still up and running or failed due to an internal problem

To disable the Preview feature in the Query Designer, see Disabling the Preview feature on page 59.

Stopping the CONTROL-M for Databases service


This procedure describes how to stop the CONTROL-M for Database process, which enables you to reinstall, upgrade, change port numbers, or run system maintenance on the CONTROL-M for Databases process.

Appendix A Startup and shutdown

57

Starting the CONTROL-M for Databases service

NOTE
If you want to change the default port number of 38080, in the XML parameter file, change the port number as needed.

Before You Begin


Ensure that all CONTROL-M for Databases jobs are not running.

To stop the CONTROL-M for Databases process: 1 Navigate to one of the following directories:
I I

Windows: <Agent_Home_Dir>\CM\DB\exe\ UNIX: <Agent_Home_Dir>/ctm/cm/DB/exe/

2 From a command line, type:


ctmdbcontainer stop

Starting the CONTROL-M for Databases service


This procedure describes how to start the CONTROL-M for Database process, which enables you to restart the CONTROL-M for Databases process if it failed to restart automatically after it was shut down.

To start the CONTROL-M for Databases process: 1 Navigate to one of the following directories:
I I

Windows: <Agent_Home_Dir>\CM\DB\exe\ UNIX: <Agent_Home_Dir>/ctm/cm/DB/exe/

2 From a command line, type:


ctmdbcontainer start

58

CONTROL-M for Databases Administrator Guide

Viewing the status of the CONTROL-M for Databases service

Viewing the status of the CONTROL-M for Databases service


This procedure describes how to view the status of the CONTROL-M for Database process, which enables you to know if the process is still up and running or failed due to an internal problem.

To view the CONTROL-M for Databases process: 1 Navigate to one of the following directories:
I I

Windows: <Agent_Home_Dir>\CM\DB\exe\ UNIX: <Agent_Home_Dir>/ctm/cm/DB/exe/

2 From a command line, type:


ctmdbcontainer status

Disabling the Preview feature


This procedure describes how to disable the Preview feature in the Query Designer, which enables you to prevent users from accessing sensitive data in the database.

To disable the Preview feature: 1 From the computer where CONTROL-M for Databases is installed, stop the
container, as described in Stopping the CONTROL-M for Databases service on page 57.

2 Access the following configuration file:


I

Windows: <Agent_Home_Dir>\CM\DB\data\CTMDB_container_conf.xml UNIX: <Agent_Home_Dir>/ctm/cm/DB/data/CTMDB_container_conf.xml

3 From the line, <EnablePreview>true</EnablePreview>, replace true with false.


The Preview feature is disabled in the Query Designer.

Appendix A Startup and shutdown

59

Disabling the Preview feature

60

CONTROL-M for Databases Administrator Guide

Notes

*100934* *100934* *100934* *100934*


*100934*

Вам также может понравиться