CA Workload Automation Agent For Microsoft SQL Server

2y ago
106 Views
2 Downloads
746.92 KB
47 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Matteo Vollmer
Transcription

CA Workload AutomationAgent for Microsoft SQL ServerCLI User Guider11.3.1

This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred toas the “Documentation”) is for your informational purposes only and is subject to change or withdrawal by CA at any time.This Documentation may not be copied, transferred, reproduced, disclosed, modified or duplicated, in whole or in part, withoutthe prior written consent of CA. This Documentation is confidential and proprietary information of CA and may not be disclosedby you or used for any purpose other than as may be permitted in (i) a separate agreement between you and CA governingyour use of the CA software to which the Documentation relates; or (ii) a separate confidentiality agreement between you andCA.Notwithstanding the foregoing, if you are a licensed user of the software product(s) addressed in the Documentation, you mayprint or otherwise make available a reasonable number of copies of the Documentation for internal use by you and youremployees in connection with that software, provided that all CA copyright notices and legends are affixed to each reproducedcopy.The right to print or otherwise make available copies of the Documentation is limited to the period during which the applicablelicense for such software remains in full force and effect. Should the license terminate for any reason, it is your responsibility tocertify in writing to CA that all copies and partial copies of the Documentation have been returned to CA or destroyed.TO THE EXTENT PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS DOCUMENTATION “AS IS” WITHOUT WARRANTY OF ANYKIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULARPURPOSE, OR NONINFRINGEMENT. IN NO EVENT WILL CA BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE,DIRECT OR INDIRECT, FROM THE USE OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, LOSTINVESTMENT, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS EXPRESSLY ADVISED IN ADVANCE OF THEPOSSIBILITY OF SUCH LOSS OR DAMAGE.The use of any software product referenced in the Documentation is governed by the applicable license agreement and suchlicense agreement is not modified in any way by the terms of this notice.The manufacturer of this Documentation is CA.Provided with “Restricted Rights.” Use, duplication or disclosure by the United States Government is subject to the restrictionsset forth in FAR Sections 12.212, 52.227-14, and 52.227-19(c)(1) - (2) and DFARS Section 252.227-7014(b)(3), as applicable, ortheir successors.Copyright 2013 CA. All rights reserved. All trademarks, trade names, service marks, and logos referenced herein belong totheir respective companies.

CA Technologies Product ReferencesThis document references the following CA Technologies products: CA Process Automation CA Workload Automation AE CA Workload Automation Agent for Application Services (CA WA Agent forApplication Services) CA Workload Automation Agent for Databases (CA WA Agent for Databases) CA Workload Automation Agent for i5/OS (CA WA Agent for i5/OS) CA Workload Automation Agent for Linux (CA WA Agent for Linux) CA Workload Automation Agent for Micro Focus (CA WA Agent for Micro Focus) CA Workload Automation Agent for Microsoft SQL Server (CA WA Agent forMicrosoft SQL Server) CA Workload Automation Agent for Oracle E-Business Suite (CA WA Agent forOracle E-Business Suite) CA Workload Automation Agent for PeopleSoft (CA WA Agent for PeopleSoft) CA Workload Automation Agent for Remote Execution (CA WA Agent for RemoteExecution) CA Workload Automation Agent for SAP (CA WA Agent for SAP) CA Workload Automation Agent for UNIX (CA WA Agent for UNIX) CA Workload Automation Agent for Web Services (CA WA Agent for Web Services) CA Workload Automation Agent for Windows (CA WA Agent for Windows) CA Workload Automation CA 7 Edition CA Workload Automation DE CA Workload Automation Desktop Client (CA WA Desktop Client) CA Workload Automation ESP Edition CA Workload Control Center

Contact CA TechnologiesContact CA SupportFor your convenience, CA Technologies provides one site where you can access theinformation that you need for your Home Office, Small Business, and Enterprise CATechnologies products. At http://ca.com/support, you can access the followingresources: Online and telephone contact information for technical assistance and customerservices Information about user communities and forums Product and documentation downloads CA Support policies and guidelines Other helpful resources appropriate for your productProviding Feedback About Product DocumentationIf you have comments or questions about CA Technologies product documentation, youcan send a message to techpubs@ca.com.To provide feedback about CA Technologies product documentation, complete ourshort customer survey which is available on the CA Support website athttp://ca.com/docs.

ContentsChapter 1: Overview7About This Guide . 7Using the Command Line Interface . 8Memory Limitations . 8Chapter 2: Integrating with SQL Server Agent9Microsoft SQL Server Command Line Interface . 9Invoking the Microsoft SQL Server CLI . 10mssql call Script—Integrate with SQL Server Agent. 10Example: List Jobs Defined in SQL Server Agent . 20Example: Display the Details of a Job . 20Example: Display Details of All Job Steps . 20Example: Display Details of a Job Step . 21Example: List Target Servers that a Job Can Run on . 21Example: Run a Predefined Job . 22Example: Retrieve the Status of a Job . 22Example: Display the Execution Log of a Job . 23Example: Display the Job Step Log . 23Example: Cancel a Running Job . 23Available Fields in Spool File Output by Operation . 24Chapter 3: Running the CLI Using Your Scheduling Manager33Integration with CA Workload Automation DE . 33Example: Identify SQL Server Agent Job Using a Windows Job . 34Example: Run SQL Server Agent Job Using a Windows Job . 35Example: Identify the Reason a SQL Server Agent Job Failed Using a Windows Job . 36Integration with CA Workload Automation AE . 37Example: Identify SQL Server Agent Job Using a Command Job . 37Example: Run SQL Server Agent Job Using a Command Job . 39Example: Identify the Reason a SQL Server Agent Job Failed Using a Command Job. 40Integration with CA Workload Automation ESP Edition . 41Example: Identify SQL Server Agent Job Using a Windows Job . 42Example: Run SQL Server Agent Job Using a Windows Job . 43Example: Identify the Reason a SQL Server Agent Job Failed Using a Windows Job . 44Integration with CA Workload Automation CA 7 Edition . 45Example: Identify SQL Server Agent Job Using a Windows Job . 45Contents 5

Example: Run SQL Server Agent Job Using a Windows Job . 46Example: Identify the Reason a SQL Server Agent Job Failed Using a Windows Job . 476 CLI User Guide

Chapter 1: OverviewThis section provides an overview of the Command Line Interface (CLI).This section contains the following topics:About This Guide (see page 7)Using the Command Line Interface (see page 8)Memory Limitations (see page 8)About This GuideThis guide describes how to use the Command Line Interface (CLI) to integrate with SQLServer Agent, a component of Microsoft SQL Server. The guide is intended forscheduling developers and testers.The CLI lets you invoke agent workload that your scheduling manager does not currentlysupport. For example, if your scheduling manager does not support SQL Server Agentjobs, you can use the CLI to run this workload as Windows (command) jobs. In a futurerelease of your scheduling manager, a SQL Server Agent job type will be added tosupport this workload. At that time, you can upgrade your scheduling manager to takeadvantage of the new job type or continue to use the CLI.Note: For information about running agent workload using the supported job types, seethe documentation for your scheduling manager.Chapter 1: Overview 7

Using the Command Line InterfaceUsing the Command Line InterfaceThe CLI is a standalone utility that is shipped with the agent as a batch script. To use theCLI, you define a Windows (command) job in your scheduling manager. In the jobdefinition, you specify the name of the batch script and pass the necessary arguments.The CLI writes all of the output data to standard output (stdout). When run as aWindows (command) job, the agent captures the output into the job's spool file.For example, to run a SQL Server Agent job, you pass the target database, job name orjob ID, and the database or Windows domain authentication information. When the jobis submitted, the batch script runs on the agent and executes a stored procedure to runthe SQL Server Agent job. The response is stored in the job's spool file.The following diagram shows how to use the CLI to run a SQL Server Agent job:Memory LimitationsWhen using the CLI, the number of jobs that you can submit and monitorsimultaneously is limited to the available free memory. For every CLI job, the agentlaunches a separate JVM, which results in extra overhead when compared to adedicated job type supported on a scheduling manager. Generally, each CLI jobconsumes and occupies about 40 MB of memory until it finishes execution. For example,if a CLI job runs for 2 hours and is tracked to completion, the job occupies 40 MB ofmemory for the full 2 hours.When the number of concurrent jobs that is submitted through the CLI consumes all thephysical memory on the agent computer, the operating system is forced to swapmemory to the hard drive. As a result, the latency between the time the job issubmitted to the agent and the time the job starts to run increases. For example, thelatency can increase from 1 second to more than 1 minute.8 CLI User Guide

Chapter 2: Integrating with SQL ServerAgentCA WA Agent for Microsoft SQL Server supports integration with SQL Server Agent, acomponent of Microsoft SQL Server. SQL Server Agent is a Windows service thatexecutes scheduled jobs to automate administrative tasks. Using the agent, you cansubmit and monitor the status of predefined SQL Server Agent jobs includingTransact-SQL scripts, SQL Server Integration Services (SSIS) packages, or Replicationtasks. You can also retrieve a list of jobs on a given SQL Server Agent, cancel a runningjob, read the job log to diagnose errors, or get the spool output for a given job or jobstep.This section contains the following topics:Microsoft SQL Server Command Line Interface (see page 9)Invoking the Microsoft SQL Server CLI (see page 10)mssql call Script—Integrate with SQL Server Agent (see page 10)Available Fields in Spool File Output by Operation (see page 24)Microsoft SQL Server Command Line InterfaceThe Microsoft SQL Server CLI is a standalone utility that is shipped with the agent. Youcan use the CLI to run SQL Server Agent jobs that your scheduling manager does notcurrently support.The Microsoft SQL Server CLI is a batch script that you can schedule to run using yourscheduling manager, similar to other batch scripts. For example, you can define aWindows (command) job to run a predefined SQL Server Agent job using the CLI.Chapter 2: Integrating with SQL Server Agent 9

Invoking the Microsoft SQL Server CLIInvoking the Microsoft SQL Server CLIThe Microsoft SQL Server CLI (mssql call.bat) is located in the following directory:install dir\wrappersinstall dirSpecifies the agent installation directory.To invoke the CLI, specify the following command:wrappers\mssql call.bat --argument .--argumentSpecifies a CLI argument. Prefix each argument with two dashes (--).Notes: By default, install dir is the working directory. Do not change the working directorywhen invoking the Microsoft SQL Server CLI. You cannot invoke the Microsoft SQL Server CLI on the command line.Example: Display the Online HelpThe following example displays the online help:wrappers\mssql call.bat --helpmssql call Script—Integrate with SQL Server AgentThe mssql call.bat script provides integration with the SQL Server Agent service.The script has the following format:wrappers\mssql call.bat --operation operation [--TargetDB target database][--UserName user name] [--Password password] [--Domain domain name][--Trace Y N] --keyword value .--operation operationSpecifies the operation. Options are as follows:GetJobListLists jobs defined in SQL Server Agent that match specified filtering criteria.Note: By default, the rows displayed in the spool file are sorted by job ID,followed by name. The agent administrator can configure a properties file tochange the sort order. For more information about configuring the propertiesfiles, see the Implementation Guide.10 CLI User Guide

mssql call Script—Integrate with SQL Server AgentGetJobDetailDisplays the details of a job defined in SQL Server Agent.GetJobStepDisplays job step details of a job defined in SQL Server Agent.GetJobTargetServerLists target servers that a SQL Server Agent job can run on.RunJobRuns a predefined SQL Server Agent job. The job can be defined usingMicrosoft SQL Server Management Studio.Note: Due to a Microsoft SQL Server restriction, the agent cannot run multipleSQL Server Agent jobs with the same name simultaneously. If a SQL ServerAgent job is running, you cannot rerun the job until its previous executionfinishes.GetJobStatusRetrieves the status of a job defined in SQL Server Agent.GetJobHistoryDisplays the execution log of a job defined in SQL Server Agent.GetStepLogDisplays the job step log of a job defined in SQL Server Agent.Notes:To retrieve the job step log, the Log to table option button must beselected in the Job Step Properties dialog of Microsoft SQL ServerManagement Studio. If the Log to table option button is not selected, thejob step log will not be available.Chapter 2: Integrating with SQL Server Agent 11

mssql call Script—Integrate with SQL Server Agent To retrieve the job step log for previous job executions, the Append outputto existing entry in table option button must also be selected in the samedialog. If the Append output to existing entry in table option button is notselected, only the most recent job step log will be available. When the Append output to existing entry in table option button isselected, the log generated from every execution of the job step will beappended. As a result, it can cause a large amount of log data to be kept inthe database.CancelJobCancels a running SQL Server Agent job.b--TargetDB target database(Optional) Specifies the target server database. The agent retrieves the JDBCconnection information from the corresponding property file(target database.properties) stored in the install dir\config\sql directory.Notes: If this argument is not specified, the agent uses the default value specified inthe mssql.default.TargetDB parameter in the agentparm.txt file. If the target server database is not specified in either the job definition or themssql.default.TargetDB parameter, the agent reports an error.--UserName user name(Optional) Specifies the user that the agent uses to create a JDBC connection to thedatabase. The user can be a Windows domain user for Windows domainauthentication or a SQL Server user for SQL Server authentication.Note: If you specify the UserName argument, also specify the Password argumentand, optionally, the Domain argument for Windows domain authentication.--Password password(Optional) Specifies the password for the user name.Important! To avoid specifying passwords in job definitions, omit the UserName,Password, and Domain arguments and use the default user settings specified in thetarget database.properties file. We recommend that you secure and restrict accessto any job definitions that contain encrypted passwords.Note: The password must be encrypted. To encrypt a password, use the Passwordutility that is provided with the agent. For more information about the Passwordutility, see the CA Workload Automation Agent for UNIX, Linux, or WindowsImplementation Guide.12 CLI User Guide

mssql call Script—Integrate with SQL Server Agent--Domain domain name(Optional) Specifies the Windows domain name for Windows authentication.Notes: If the UserName, Password, and Domain arguments are specified, the agentassumes that the UserName argument contains the Windows domain user. Inthis case, Windows domain authentication is used. If the UserName and Password arguments are specified without the Domainargument, the agent assumes that the UserName argument contains the SQLServer user. In this case, SQL Server authentication is used. If none of the UserName, Password, and Domain arguments are specified, theagent uses the default user settings specified in the target database.propertiesfile.--Trace Y N(Optional) Indicates whether the agent writes debug information into the spool file.YWrites debug information into the spool file.NDoes not write debug information into t

The Microsoft SQL Server CLI is a standalone utility that is shipped with the agent. You can use the CLI to run SQL Server Agent jobs that your scheduling manager does not currently support. The Microsoft SQL Server CLI is a batch script that you can schedule to run using

Related Documents:

CA Workload Automation Agent for Windows (CA WA Agent for Windows) CA Workload Automation Agent for z/OS (CA WA Agent for z/OS) CA Workload Automation CA 7 Edition (formerly named CA Workload Automation SE) CA Workload Automation ESP Edition (formerly named CA Workload Automation EE) CA Workload Control Center (CA WCC) Contact CA Technologies

CA Technologies Product References This document references the following CA Technologies products: CA Process Automation CA Workload Automation AE CA Workload Automation Agent for Application Services (CA WA Agent for Application Services) CA Workload Automation Agent for Databases (CA WA Agent for Databases) CA Workload Automation Agent for i5/OS (CA WA Agent for i5/OS)

distributed platforms, CA Workload Automation CA 7 Edition, and CA Workload Automation ESP Edition for mainframe environments. CA Workload Automation iDash provides predictive analytics, forecasting, and reporting. Following the acquisition of Automic, CA established an Automation line of business. Going forward, the choice of workload .

Management (Unicenter AutoSys JM)) . Workload Automation Agent for i5/OS (CA WA Agent for i5/OS) CA Workload Automation Agent for Linux (CA WA Agent for Linux) .

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

CA WA Desktop Client is a graphical interface for defining, monitoring, and controlling enterprise workload. The interface lets you quickly drag-and-drop your way through workload definitions, manage calendars, and monitor and control batch workload, regardless of the operating system. A CA Workload Automation DE system can have

10 tips och tricks för att lyckas med ert sap-projekt 20 SAPSANYTT 2/2015 De flesta projektledare känner säkert till Cobb’s paradox. Martin Cobb verkade som CIO för sekretariatet för Treasury Board of Canada 1995 då han ställde frågan

service i Norge och Finland drivs inom ramen för ett enskilt företag (NRK. 1 och Yleisradio), fin ns det i Sverige tre: Ett för tv (Sveriges Television , SVT ), ett för radio (Sveriges Radio , SR ) och ett för utbildnings program (Sveriges Utbildningsradio, UR, vilket till följd av sin begränsade storlek inte återfinns bland de 25 största