SQL Server Automated Administration



Similar documents
Automating Administration with SQL Agent

3 Setting up Databases on a Microsoft SQL 7.0 Server

Erado Archiving & Setup Instruction Microsoft Exchange 2007 Push Journaling

Lepide Software. LepideAuditor for File Server [CONFIGURATION GUIDE] This guide informs How to configure settings for first time usage of the software

SonicWALL CDP 5.0 Microsoft Exchange User Mailbox Backup and Restore

NeoMail Guide. Neotel (Pty) Ltd

How to monitor AD security with MOM

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

Setting Up ALERE with Client/Server Data

Tech Note 551 Configuring SQLMail or Database Mail for the Historian Event

Installation Guide. Version 1.5. May 2015 Edition ICS Learning Group

IsItUp Quick Start Manual

Escalation Server Documentation For Tele-Support HelpDesk Rev 5/29/2001

Chapter Replication in SQL Server

Technical Paper. Defining an ODBC Library in SAS 9.2 Management Console Using Microsoft Windows NT Authentication

Migrating helpdesk to a new server

Erado Archiving & Setup Instruction Microsoft Exchange 2010 Push Journaling

Video Administration Backup and Restore Procedures

Configuration Task 3: (Optional) As part of configuration, you can deploy rules. For more information, see "Deploy Inbox Rules" below.

Plesk Control Panel Adding accounts

Introduction. Before you begin. Installing efax from our CD-ROM. Installing efax after downloading from the internet

Policy Based Encryption Gateway. Administration Guide

DiskBoss. File & Disk Manager. Version 2.0. Dec Flexense Ltd. info@flexense.com. File Integrity Monitor

MS Outlook AddIn version 3.6

Amicus Link Guide: Outlook/Exchange

WhatsUp Gold v11 Features Overview

Quick Start Guide. Your New Account

DOMAIN CENTRAL HOSTING

Configuring WMI Performance Monitors

Owner of the content within this article is Written by Marc Grote

Windows NT Server Operating System Security Features Carol A. Siegel Payoff

CHARTER BUSINESS custom hosting faqs 2010 INTERNET. Q. How do I access my ? Q. How do I change or reset a password for an account?

Policy Based Encryption Gateway. Administration Guide

RSA Security Analytics

TeamViewer 9 Manual Management Console

Class Objectives. Introduction. Intermediate Outlook Features. Setting up Outlook

System Area Management Software Tool Tip: Integrating into NetIQ AppManager

Microsoft SQL Server Staging

Toll Free: International:

How to create Event Filters directly from the Event Viewer

Cloud Services. Cloud Control Panel. Admin Guide

How to Use Remote Access Using Internet Explorer

BPMonline CRM + Service Desk Agent Desktop User Guide

WhatsUp Gold v11 Features Overview

Active Directory Management. User Interface Guide

For details for obtaining this later version; see the Known issues & Limitations, section at the end of this document.

Dell KACE K1000 System Management Appliance Version 5.4. Service Desk Administrator Guide

How To Use Exhange On Outlook On A Pc Or Macintosh Outlook 2007 On Your Pc Or Ipad (For Windows Xp) On Your Ipad Or Ipa (For Your Windows Xp). (For A Macintosh) On A

Kaseya Server Instal ation User Guide June 6, 2008

Monitoring SQL Server with Microsoft Operations Manager 2005

Outlook Profile Setup Guide Exchange 2010 Quick Start and Detailed Instructions

Deploying Microsoft Operations Manager with the BIG-IP system and icontrol

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

QUANTIFY INSTALLATION GUIDE

Top 10 Groupwise Tips

Device Log Export ENGLISH

SpectraPro. SLQ Server databases

Configuring and Monitoring Event Logs

Creating a User Profile for Outlook 2013

Username: Password: your password. Domain Name: EXCH026. Server Name: EAST.EXCH026.serverdata.net

Unisys INFOIMAGE FOLDER ON WINDOWS NT. Connector for Microsoft Exchange. Getting Started Guide

How to Schedule Report Execution and Mailing

Instructions: Configuring Outlook 2003 with Exchange 2010 on the FIUMail

Mail Attender Version

Exploring Organizational Security and Auditing

Setting up Your Acusis Address. Microsoft Outlook

Using Avaya Aura Messaging

Joining. Domain. Windows XP Pro

Using etoken for Securing s Using Outlook and Outlook Express

Installing GFI Network Server Monitor

Symantec Enterprise Vault

Fixes for CrossTec ResQDesk

User s Manual. Management Software for ATS

SaaS Encryption Enablement for Customers, Domains and Users Quick Start Guide

NETWRIX EVENT LOG MANAGER

Troubleshooting Failover in Cisco Unity 8.x

Project Server 2003 Install on SBS 2003 Courtesy of Chris Jones All rights reserved by the Author

- Spam Spam Firewall How Does the Spam Firewall Work? Getting Started username Create New Password

SCOoffice Mail Connector For Microsoft Outlook. Installation Guide Outlook 2002

CHARTER BUSINESS CUSTOM HOSTING MIGRATION INSTRUCTIONS

XMailer Reference Guide

Exercise Safe Commands and Audit Trail

Smart Call Home Quick Start Configuration Guide

Use the below instructions to configure your wireless settings to connect to the secure wireless network using Microsoft Windows Vista/7.

NEC Express5800 Series NEC ESMPRO AlertManager User's Guide

Working with SQL Server Agent Jobs

Microsoft Outlook. Transition from the ECS Exchange Server to the University Exchange Server. ECS Computing Services August 21, 2012 Version 3.

TSM Studio Server User Guide

Lepide Active Directory Self Service. Installation Guide. Lepide Active Directory Self Service Tool. Lepide Software Private Limited Page 1

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

Exchange Outlook Profile/POP/IMAP/SMTP Setup Guide

Backup/Restore Microsoft SQL Server 7.0 / 2000 / 2005 / 2008

NetWrix Account Lockout Examiner Version 4.0 Administrator Guide

Propalms TSE Quickstart Guide

DBMoto 6.5 Setup Guide for SQL Server Transactional Replications

Sage 200 Web Time & Expenses Guide

GFI Product Manual. Manual

Wireless Installation Checklist for Novell GroupWise Environments

Transcription:

SQL Server Automated Administration To automate administration: Establish the administrative responsibilities or server events that occur regularly and can be administered programmatically. Define a set of jobs and alerts. Run the SQL Server Agent service.

SQL Server Automated Administration Training Division New Delhi

SQL Server Agent Service SQL Server Agent supports features allowing the scheduling of periodic activities on Microsoft SQL Server, or the notification to system administrators of problems that have occurred with the server. The SQL Server Agent components that implement this capability are: Jobs Defined objects consisting of a one or more steps to be performed. The steps are Transact-SQL statements that can be executed. Jobs can be scheduled, for example, to execute at specific times or recurring intervals.

Alerts Operators Actions to be taken when specific events occur, such as a specific error, errors of certain severities, or a database reaching a defined limit of free space available. The alert can be defined to take such actions as sending an e-mail, paging an operator, or running a job to address the problem. People identified through their network account or e- mail ID who can address problems with the server. They can be the targets of alerts, either through e-mail, a pager, or a net send network command.

SQL Jobs

Job Name Every job must have a name. Job names must be unique only if they originate from the same server. A job name can be no more than 128 characters. Job Category Job categories allow you to organize your jobs for easy filtering and grouping.

Job Owner The job owner is the individual who creates a job or for whom the job is created. By default, SQL Server Agent populates the owner information with the SQL Server login ID of the job creator. Only members of the sysadmin role can give ownership of a job to another user or can alter the attributes of a job owned by another user.

Job Description A job can be run by other users on both the local and remote computers running SQL Server. By writing a description at the time a job is created, the job owner can ensure that other users will understand quickly the purpose of the job. A job description must not exceed 512 characters.

Implementing Jobs Administrative tasks can be automated using SQL Server Agent jobs. A job can be defined one time but can be run many times. A job can be manually or scheduled to run in response to schedules and alerts.

Jobs can be written to run on the local server or on multiple servers. To run jobs on multiple servers, you must set up at least one master server and one or more target servers. Anyone can create a job, but a job can be edited only by its owner or members of the sysadmin role.

Alerts

Are errors and messages, or events that are generated by SQL Server and entered into the Microsoft Windows NT application log. SQL Server Agent reads the application log and compares events to alerts that you have defined. When SQL Server Agent finds a match, it fires an alert.

Setting up a SQL Server database alert 1. On the View menu, click Alert. 2. On the Edit menu, click Add to Alert... 3. In the Object list, click a SQL Server object, and then click a counter, on which the alert will be based, from the Counter box. 4. Under Alert If, click Over or Under, and then enter a threshold value. The alert will be generated when the value for the counter is over or under the threshold value (depending on whether Over or Under was selected). 5. Click First Time or Every Time to determine how often the alert is generated. The default is Every Time.

SQL Mail

Allows SQL Server to send and receive e-mail by establishing a client connection with a mail server. SQL Server 7.0 uses two services to handle mail. SQL Mail. SQL Server Agent Mail. MS SQL Server processes mail for all of the mail stored procedures. SQL Server Agent uses its own mail capabilities that are configured and operated separately from SQL Mail.

SQL Mail establishes a simple MAPI connection with a mail host. SQL Agent Mail establishes either a simple or extended MAPI connection. Both SQL Mail and SQL Agent Mail can connect with MS Exchange Server, Windows NT Mail, or a POP3 server. SQL Mail stored procedures can manipulate data, process queries received by e-mail and return the result set by creating a reply e-mail. SQL Agent Mail can be configured to send an e-mail when an alert is triggered or when a scheduled task either succeeds or fails.

MAPI (Messaging Application Program Interface) is a Microsoft Windows program interface that enables 1. You to send e-mail from within a Windows application and attach the document you are working on to the e-mail note. 2. MAPI-compatible applications typically include a Send Mail or Send in the File pulldown menu of the application. This sends a request to a MAPI server. 3. MAPI consists of a standard set of C language functions that are stored in a program library known as a dynamic link library (DLL).

Developers who are using Microsoft's Active Server Page (ASP) technology access the MAPI library by using Microsoft's Collaboration Data Objects (CDO). The CDO library comes with Microsoft's Internet Information Server (IIS).

SQL Server and Mail Integration Microsoft SQL Server provides a set of extended stored procedures that allow SQL Server to operate as a workgroup post office for a MAPI-enabled e-mail system. The computer running SQL Server must be set up as an e- mail client. SQL Server Enterprise Manager is used to assign an e- mail account and password to the SQL Server installation. The mail component of SQL Server can then be enabled to be started automatically when the SQL Server Agent service is started. Alternatively, the mail component can be started and stopped at will using either SQL Server Enterprise Manager, or the xp_startmail, xp_stopmail, and xp_sendmail stored procedures.

When the mail component of SQL Server is running, it can be used to: Send e-mail from Transact-SQL batches, scripts, stored procedures, and triggers using xp_send_mail. The e-mail can be: Message strings. The result set of a query. A Transact-SQL statement or batch to execute. A page for an electronic pager.

E-mail can be read using: sp_processmail A combination of xp_findnextmessage xp_readmail, xp_deletemail.

The messages sent to SQL Server typically contain a Transact-SQL statement or batch to be executed. The statement is executed and the result set is returned as a reply e-mail with an optional CC: list. SQL Server events and alerts can be combined with SQL Mail functionality to build a system in which a server running SQL Server can e-mail or page the relevant administrators automatically if serious conditions arise.

Configuring a SQL Mail Profile When configured, mail profiles are specific to the Microsoft Windows NT user domain account that is activated when a user ogs on to Windows NT successfully. SQL Mail must have a mail profile created in the same user domain account or context that is used to start SQL Server. When a mail stored procedure is executed, SQL Mail looks for the defined mail profile in the domain account that triggered it. If you plan to use mail stored procedures you must: Have a mail server that is simple MAPI-compliant. Configure a mail profile for MSSQLServer to use to connect to your mail server.

How to configure a mail profile (Windows NT) To configure a mail profile 1. Logon to the Microsoft Windows NT server specifying the name and password used to start SQL Server services for that server. 2. Create and configure or copy an existing mail profile by clicking on the Mail icon in Control Panel. Select the appropriate mail service to interact with your mail host. Choose a name for the profile that will help the recipient identify the messages.

3. On the server running Microsoft SQL Server, start the mail client using the newly created mail profile. 4. Send a message addressed to the same profile name to ensure the mail client, mail profile, and e-mail provider are working properly. If your e-mail message does not appear, you may need to force mail synchronization by going to the Tools menu, and then clicking Deliver Now. 5. Exit the mail client program.

To set up SQL Mail How to set up SQL Mail (Enterprise Manager) 1. Expand a server group; then expand a server. 2. Click Support Services, right-click SQL Mail, and then click Properties. 3. In Profile name, select the mail profile that you configured for SQL Mail. 4. Click Test to check the systems ability to start and stop mail client services with the profile entered. You should receive a message that SQL Mail has started successfully and stopped a mail session with this profile.

Configuring a SQL Agent Mail Profile If you plan to send notifications to operators by e-mail or pager, you must: Have a mail server that is simple or extended MAPIcompliant. Configure a mail profile for SQL Server Agent to use to connect to your mail server. Have a mail server that is able to communicate with your pagers.

How to set the mail profile for SQL Server Agent (Enterprise Manager) To set the mail profile for SQL Server Agent 1. Right-click SQL Server Agent; then click Properties. 2. In the SQL Server Agent Properties dialog box, on the General tab, under Mail session, click a profile in the Mail profile box. If no profiles are listed, enter the name of the profile to use.

How to set up SQLAgentMail (Enterprise Manager) 1. Expand a server group; then expand a server. 2. Expand Management, right-click SQL Server Agent, and then click Properties. 3. If you have configured a mail profile using a different domain account than the one used to Microsoft SQL Server, click This Account, and then enter the Windows NT account name and password used to create the mail profile for SQLAgentMail. 4. In Mail profile, select the mail profile you created for SQLAgentMail. 5. Click Test to check the systems ability to start and stop mail client services with the profile entered. You should receive a message that SQL Mail has started successfully and stopped a mail session with this profile.

Sharing a Profile with SQL Mail SQL Mail and SQLAgentMail sessions may be configured to use the same Windows NT domain user account. When using the same domain account, SQL Mail and SQLAgentMail can share the same mail profile using a common mailbox. Microsoft SQL Server uses two separate mail sessions: The MSSQLServer service uses a mail session that is referred to as SQL Mail. SQL Server uses this mail session when your database applications execute the xp_sendmail extended stored procedure to send a message or query result set to a recipient. The SQLAgentMail uses a mail session that is exclusive to SQL Server Agent activities