Module 5: Performing Administrative Tasks. Overview Configuration Tasks Routine SQL Server Administrative Tasks Automating Routine Maintenance Tasks Creating.

Slides:



Advertisements
Similar presentations
This course is designed for system managers/administrators to better understand the SAAZ Desktop and Server Management components Students will learn.
Advertisements

Networking Essentials Lab 3 & 4 Review. If you have configured an event log retention setting to Do Not Overwrite Events (Clear Log Manually), what happens.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Complete Event Log Viewing, Monitoring and Management.
Maintaining and Automating SQL Server
SQL Server Agent Keith Binford. SQL Server Agent SQL Server Agent is a Windows service that can execute and schedule tasks and jobs.
Module 20 Troubleshooting Common SQL Server 2008 R2 Administrative Issues.
SQL Server 2005 Implementation and Maintenance Chapter 10: Maintaining and Automating SQL Server.
1 1. SQL SERVER OVERVIEW zWhat Is SQL Server? zInterfaces To Use SQL Server zSQL Server Services zTypes Of Databases zSQL Server Security.
Module 7: Restoring Databases. Overview SQL Server Recovery Process Preparing to Restore a Database Restoring Backups Restoring Databases from Different.
Using the Windows Event Viewer and Task Scheduler Chapter 5.
Week 2 - Installation SQL SERVER2000 ENTERPRISE EDITION INSTALLATION.
Implementing High Availability
1 Chapter Overview Transferring and Transforming Data Introducing Microsoft Data Transformation Services (DTS) Transferring and Transforming Data with.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
Chapter 2 Administrating DB Engine. Database Engine  The Database Engine is the core service for storing, processing, and securing data.  It provides.
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
Module 13 Automating SQL Server 2008 R2 Management.
Module 2: Using Transact-SQL Querying Tools. Overview SQL Query Analyzer Using the Object Browser Tool in SQL Query Analyzer Using Templates in SQL Query.
Overview What is SQL Server? Creating databases Administration Security Backup.
Network and Active Directory Performance Monitoring and Troubleshooting NETW4008 Lecture 8.
Using Group Policy to Manage User Environments. Overview Introduction to Managing User Environments Introduction to Administrative Templates Assigning.
Chapter 4 SQL. SQL server Microsoft SQL Server is a client/server database management system. Microsoft SQL Server is a client/server database management.
September 18, 2002 Introduction to Windows 2000 Server Components Ryan Larson David Greer.
Database Security and Auditing: Protecting Data Integrity and Accessibility Chapter 3 Administration of Users.
Introduction to SQL Server 2000 Security Dave Watts CTO, Fig Leaf Software
Module 3: Managing Database Files. Overview Introduction to Data Structures Creating Databases Managing Databases Placing Database Files and Logs Optimizing.
Maintaining a Mirrored Database Tips and Tricks by Paul G. Hiles.
Module 7: Fundamentals of Administering Windows Server 2008.
Eurotrace Hands-On The Eurotrace File System. 2 The Eurotrace file system Under MS ACCESS EUROTRACE generates several different files when you create.
Informix IDS Administration with the New Server Studio 4.0 By Lester Knutsen My experience with the beta of Server Studio and the new Informix database.
Module 10: Monitoring ISA Server Overview Monitoring Overview Configuring Alerts Configuring Session Monitoring Configuring Logging Configuring.
The VPO Operator. [vpo_operator] 2 The VPO Operator Section Overview The role of the VPO operator Starting and stopping the Motif GUI The VPO Operator.
Module 4: Managing Security. Overview Implementing an Authentication Mode Assigning Login Accounts to Users and Roles Assigning Permissions to Users and.
Learningcomputer.com SQL Server 2008 – Administration, Maintenance and Job Automation.
IT 456 Seminar 5 Dr Jeffrey A Robinson. Overview of Course Week 1 – Introduction Week 2 – Installation of SQL and management Tools Week 3 - Creating and.
Module 14 Configuring Security for SQL Server Agent.
Module 1: Exploring Replication. Overview Understanding SQL Server Replication Setting Up Replication Understanding Agents in Replication Securing Replication.
Module 16: Performing Ongoing Database Maintenance
Module 5: Upgrading to SQL Server 7.0. Overview Planning an Upgrade Preparing to Upgrade Verifying the Upgrade Setting a Compatibility Level.
Module 7: Resolving NetBIOS Names by Using Windows Internet Name Service (WINS)
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
1 Chapter Overview Performing Configuration Tasks Setting Up Additional Features Performing Maintenance Tasks.
Module 15 Monitoring SQL Server 2008 R2 with Alerts and Notifications.
1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
SQL Server 2005 Implementation and Maintenance Chapter 6: Security and SQL Server 2005.
Maintenance Practices. Goal  Automate the necessary DBA chores to put organizations on the path of having healthier, consistent and more trustworthy.
Module 6: Administering Reporting Services. Overview Server Administration Performance and Reliability Monitoring Database Administration Security Administration.
1 Chapter Overview Monitoring Access to Shared Folders Creating and Sharing Local and Remote Folders Monitoring Network Users Using Offline Folders and.
Microsoft ® Official Course Module 6 Managing Software Distribution and Deployment by Using Packages and Programs.
Creating Simple and Parallel Data Loads With DTS.
1 Chapter Overview Using Standby Servers Using Failover Clustering.
Introduction to SQL Server  Working with MS SQL Server and SQL Server Management Studio.
Administering Windows Server Question Answer.
1 Major Printer Administration Tasks Managing printers Managing documents Troubleshooting printers Performing tasks requiring the Manage Printers permission.
SQL Server Agent All the Knobs You Need to Know Taiob M Ali.
WELCOME! SQL Server Security. Scott Gleason This is my 9 th Jacksonville SQL Saturday Over ten years DBA experience Director of Database Operations
SQL Database Management
Module 1: SQL Server Overview
Managing, Storing, and Executing DTS Packages
SQL Server Agent All the Knobs You Need to Know
Troubleshooting Tools
Deploying and Configuring SSIS Packages
Automating SQL Server Management
Limiting SQL Server Exposure
Limiting SQL Server Exposure
Overview Multimedia: The Role of WINS in the Network Infrastructure
Ch 10. Maintaining and Automating SQL Server
Presentation transcript:

Module 5: Performing Administrative Tasks

Overview Configuration Tasks Routine SQL Server Administrative Tasks Automating Routine Maintenance Tasks Creating Alerts Troubleshooting SQL Server Automation Automating Multiserver Jobs

 Configuration Tasks Configuring SQL Server Agent Configuring SQLAgentMail and SQL Mail Configuring Linked Servers Setting Up Data Source Names Configuring SQL Server XML Support in IIS Configuring SQL Server to Share Memory Resources with Other Server Applications

Configuring SQL Server Agent SQL Server Agent Must Be Running at All Times Configure SQL Server Agent to auto start Configure SQL Server and SQL Server Agent services to restart automatically if these services stop unexpectedly The SQL Server Agent Logon Account Must Be Mapped to sysadmin Role Map this account to the Administrators local group Use a Windows domain user account logon account Use Windows Authentication Mode for SQL Server Agent

Configuring SQLAgentMail and SQL Mail SQL Server SQL Mail (SQL Server Service) SQL Mail (SQL Server Service) Executes the xp_sendmail extended stored procedure SQLAgentMail (SQL Server Agent Service) SQLAgentMail (SQL Server Agent Service) Sends job and alert notifications

Configuring Linked Servers SQL Server SQL Server OLE DB Provider File system File system OLE DB Provider SQL Server SQL Server

Setting Up Data Source Names A Data Source Name Defines ODBC driver to use Connection information (including name and location of data source, login account, and password) Driver-specific options for the connection

Configuring SQL Server XML Support in IIS ISAPI Filter Internet Information Services Uses ISAPI Filter (SQLXML.DLL) and the OLEDB Provider HTTP Request SQL Server SQL Server IIS OLE DB XML

Configuring SQL Server to Share Memory Resources with Other Server Applications Configuring the Memory Options min server memory max server memory Determining Maximum Amount of Memory Using Windows 2000 System Monitor to Observe Effects

Lab A: Configuring SQL Server

Routine SQL Server Administrative Tasks Performing Regularly Scheduled Tasks Back up databases Import and export data Recognizing and Responding to Potential Problems Monitor database and log space Monitor performance

 Automating Routine Maintenance Tasks Automating SQL Server Administration Creating Jobs Verifying Permissions Defining Job Steps Determining Action Flow Logic for Each Job Step Scheduling Jobs Creating Operators to Notify Reviewing and Configuring Job History

Multimedia Presentation: Automating SQL Server Administration

Creating Jobs Ensure That the Job Is Enabled Specify the Job Owner Determine Where the Job Will Execute Create a Job Category

Verifying Permissions Executing Transact-SQL Jobs Execute in the context of the job owner or a specific user Executing Operating System Commands or ActiveX Script Jobs Members of the sysadmin role use the SQL Server Agent login account Job owners that are not members of the sysadmin role use a defined domain user account called a proxy account

Defining Job Steps Using Transact-SQL Statements Using Operating System Commands Using ActiveX Scripts Using Replication

Determining Action Flow Logic for Each Job Step Job 3... Job 2 Back Up Northwind Database Transaction Log Job 1 Northwind Data Transfer Job 1 Northwind Data Transfer Write to Windows Application Log Notify Operator No Yes No Notify Operator Yes Fail?Fail? Job Step 3: Custom Application Type : Active Scripting; Retry attempts : 0 Job Step 3: Custom Application Type : Active Scripting; Retry attempts : 0 Fail?Fail? Job Step 2: Transfer Data Type : CmdExec; Retry attempts : 2 Job Step 2: Transfer Data Type : CmdExec; Retry attempts : 2 Fail?Fail? Job Step 1: Back Up Database Type : Transact-SQL; Retry attempts : 1 Job Step 1: Back Up Database Type : Transact-SQL; Retry attempts : 1

Scheduling Jobs Job 2: Back Up Northwind Database Transaction Log Schedule: M-F Shift 1 Every 2 Hours From: 8:00 A.M. To: 5:00 P.M. Every 2 Hours From: 8:00 A.M. To: 5:00 P.M. Sun Mon Tues Wed Thur Fri Sat Schedule: Weekend Every 8 Hours From: 12:00 A.M. To: 11:59 P.M. Every 8 Hours From: 12:00 A.M. To: 11:59 P.M. Sun Mon Tues Wed Thur Fri Sat Schedule: M-F Shift 2 Every 4 Hours From: 5:01 P.M. To: 7:59 A.M. Every 4 Hours From: 5:01 P.M. To: 7:59 A.M. Sun Mon Tues Wed Thur Fri Sat Schedule: CPU Idle CPU Idle Sun Mon Tues Wed Thur Fri Sat

Creating Operators to Notify Pager Schedule 12:01 - 8:00 A.M.Meng Phua 8:01 - 6:00 P.M.Nwind Admins 6: :00 P.M.Jose Lugo Pager Schedule 12:01 - 8:00 A.M.Meng Phua 8:01 - 6:00 P.M.Nwind Admins 6: :00 P.M.Jose Lugo Notify Operator Operator Name Meng Phua Nwind Admins Jose Lugo Net send Pager Job failed Job: Northwind Data Transfer Job Step 1:Back Up Transaction Log Job Step 3: Back Up Database Job: Northwind Data Transfer Job Step 1:Back Up Transaction Log Job Step 3: Back Up Database Job Step 2: Transfer Data

Reviewing and Configuring Job History Reviewing Individual Job History Job step result—success or failure Execution duration Errors and messages Configuring the Job History Size Retain information about each job History overwritten when maximum size is reached

Lab B: Creating Jobs and Operators

 Creating Alerts Using Alerts to Respond to Potential Problems Writing Events to the Application Log Creating Alerts to Respond to SQL Server Errors Creating Alerts on a User-defined Error Responding to Performance Condition Alerts Assigning a Fail-Safe Operator

Using Alerts to Respond to Potential Problems User Database Message From:SQL Server To:Account Manager Subject:Error Number Customer 732 was deleted by Eva Corets From:SQL Server To:Account Manager Subject:Error Number Customer 732 was deleted by Eva Corets msdb Database Customers Table CustomerID LastName Harui van Dam Niikkonen van Dam... Raise Error with Log Raise Error with Log Customer deleted by Eva Corets sysalerts Table id name sysnotifications Table alert_id operator_id sysoperators Table id name 12 Account Manager...

Writing Events to the Application Log SQL Server Errors Severity Levels Between 19 and 25 sp_addmessage or sp_altermessage System Stored Procedures RAISERROR WITH LOG Statement xp_logevent Extended Stored Procedure

Creating Alerts to Respond to SQL Server Errors Defining Alerts on SQL Server Error Numbers Must be written to the Windows application log System-supplied or user-defined Defining Alerts on Error Severity Levels Severity levels 19 through 25 are automatically logged Configure event forwarding

Creating Alerts on a User-defined Error Create the Error Message Error number must be greater than Parameter placeholders can be used Raise the Error from Database Application Use the RAISERROR statement Declare variables for parameter placeholders Define an Alert on the Error Message

Responding to Performance Condition Alerts Alert 3 All Databases: Severity Level 18 Alert 3 All Databases: Severity Level 18 Alert 2 Northwind Database: Transfer Data Error Alert 2 Northwind Database: Transfer Data Error Alert 1: Northwind Database: Log 75% Full Alert 1: Northwind Database: Log 75% Full Execute Job: Operators to Notify: Operator Name Meng Phua Nwind Admins Jose Lugo Net send Job 2: Back Up Northwind Transaction Log Pager Pager Schedule 8:01 - 6:00 P.M.Nwind Admins 6: :00 P.M.Jose Lugo Pager Schedule 8:01 - 6:00 P.M.Nwind Admins 6: :00 P.M.Jose Lugo 12:01 - 8:00 A.M.Meng Phua Threshold Reached at 1:28 A.M.

Assigning a Fail-Safe Operator Fail-Safe Operator Pager Schedule 12:01 - 8:00 A.M.Meng Phua 8:01 - 6:00 P.M.Nwind Admins 6: :00 P.M.Jose Lugo Pager Schedule 12:01 - 8:00 A.M.Meng Phua 8:01 - 6:00 P.M.Nwind Admins 6: :00 P.M.Jose Lugo Operator Notification Operators Meng Phua Nwind Admins Jose Lugo Net send Pager Alert: Error Backup Device Failed

 Troubleshooting SQL Server Automation Verify That SQL Server Agent Is Started Verify That the Job, Schedule, Alert, or Operator Is Enabled Ensure That the Proxy Account Is Enabled Review the Error Logs Review the History Verify That the Mail Client Is Working Properly

Troubleshooting Alerts Factors That Cause an Alert Processing Backlog Windows application log is full CPU use is unusually high Number of alert responses is high Resolving Alert Processing Backlog Disable the alert temporarily Increase delay between responses Correct global resource problem Clear the Windows application log

Lab C: Creating Alerts

 Automating Multiserver Jobs Defining a Master Server Creates MSXOperator on master server and all target servers Represents a primary department or business unit Defining Target Servers Are assigned to one master server Reside in the same domain as the master server

Defining Multiserver Jobs Target Server Target Server Target Server Master Server defines jobs Target server downloads jobs from master server 22 Target server reports job outcome status to master server

Use a Domain User Account That Is a Member of the Windows Local Group Administrators Send Alerts to Group Aliases Rather Than to Individuals Define Operators to Respond to Fatal Errors Assign a Fail-Safe Operator Use Multiserver Jobs to Automate Jobs Across Multiple Servers Recommended Practices

Review Configuration Tasks Routine SQL Server Administrative Tasks Automating Routine Maintenance Tasks Creating Alerts Troubleshooting SQL Server Automation Automating Multiserver Jobs