Ch 10. Maintaining and Automating SQL Server

Slides:



Advertisements
Similar presentations
Little Used, but Powerful Features with GP Cathy Fregelette, CPA, PMP Practice Manager BroadPoint Technologies September 20, 2012.
Advertisements

BePunctual Employee Time & Attendance (T&A) System User Guide.
CareCentrix Direct Training.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Module 5: Performing Administrative Tasks. Overview Configuration Tasks Routine SQL Server Administrative Tasks Automating Routine Maintenance Tasks Creating.
Maintaining and Automating SQL Server
CNT 4603: Managing/Maintaining Server 2008 – Part 3 Page 1 Dr. Mark Llewellyn © CNT 4603: System Administration Spring 2014 Managing And Maintaining Windows.
Advanced Workgroup System. Printer Admin Utility Monitors printers over IP networks Views Sharp and non-Sharp SNMP Devices Provided Standard with Sharp.
FlareCo Ltd ALTER DATABASE AdventureWorks SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS Slide 1.
DataBase Administration Scheduling jobs Backing up and restoring Performing basic defragmentation and index rebuilding Using alerts Archiving.
SQL Server 2005 Implementation and Maintenance Chapter 10: Maintaining and Automating SQL Server.
ENVELOC GENERAL CONFIGURATION DEMO Contact Information Billing Information Backup Time Days to Backup Backup Selections Files to Exclude Wireback (Archive)
Hands-On Microsoft Windows Server 2003 Administration Chapter 10 Monitoring and Troubleshooting Windows Server 2003.
Chapter 12 - Backup and Disaster Recovery1 Ch. 12 – Backups and Disaster Recovery MIS 431 – Created Spring 2006.
Chapter 11 - Monitoring Server Performance1 Ch. 11 – Monitoring Server Performance MIS 431 – created Spring 2006.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 12: Managing and Implementing Backups and Disaster Recovery.
8/9/2015 1:47 AM SurveyCentralOverview.ppt CSC ©Copyright 2012 Online Survey Application: CSC Survey Central System Overview November 26, 2012 Supported.
AGENDA Tools used in SQL Server 2000 Graphical BOL Enterprise Manager Service Manager CLI Query Analyzer OSQL BCP.
Transaction log grows unexpectedly
Setting up in Outlook Express. Select “Tools” from the toolbar menu.
Slide 1 of 9 Presenting 24x7 Scheduler The art of computer automation Press PageDown key or click to advance.
Ch 9 Managing Active Directory User Accounts. Objectives Create Organizational Unit Creating User Accounts in Active Directory Disabling, Enabling, and.
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
Configuring Task Scheduler Lesson 9. Skills Matrix Technology SkillObjective Domain SkillDomain # Understanding Task Scheduler Configure and manage the.
Today’s Agenda Chapter 12 Admin Tasks Chapter 13 Automating Admin Tasks.
Module 13 Automating SQL Server 2008 R2 Management.
Module 15: Monitoring. Overview Formulate requirements and identify resources to monitor in a database environment Types of monitoring that can be carried.
1 Introducing Windows Backup There are different methods for starting Windows 2000 Backup. Requirements for running Windows 2000 Backup All users can back.
Chapter 4 SQL. SQL server Microsoft SQL Server is a client/server database management system. Microsoft SQL Server is a client/server database management.
Advanced User Guide to Outlook and all its features.
Back to content Final Presentation Mr. Phay Sok Thea, class “2B”, group 3, Networking Topic: Mail Client “Outlook Express” *At the end of the presentation.
1 Guide to Novell NetWare 6.0 Network Administration Chapter 11.
BZUPAGES.COM. PRESENTED TO: SIR AHMED KARIM PRESENTED BY: MUHAMMAD FAISAL RAO Malik Shabaz Asif BIT Department Of Information Technology Institute.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 12: Managing and Implementing Backups and Disaster Recovery.
It is one of the techniques to create a stand by server. Introduced in SQL 2000,enhanced in It is a High Availability as well as Disaster recovery.
Once you have contacted me to set up a new account, your computer needs to be configured to dial into.DevlinEx and use our servers for things like .
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.
TEAM Basic TotalElectrostatic ManagementAwareness&
Selecting, Formatting, and Printing a finished Report…….
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.
Guide to MCSE , Enhanced 1 Activity 12-1: Backing Up Files and Folders Using the Backup Utility Objective: To explore the use of Windows Server 2003.
Module 16: Performing Ongoing Database Maintenance
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
Module 15 Monitoring SQL Server 2008 R2 with Alerts and Notifications.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Access 2002 Using Access Tools.
1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.
4. SQL Backup tasks Objectives –Secure the databases and the database server Contents –Understanding Backup Terms, –Backing Up Databases, Files, Filegroups,
Managing File Resource Using File Server Resource Manager Chapter 9 Advance Computer Network Lecture Sorn Pisey
Maintenance Practices. Goal  Automate the necessary DBA chores to put organizations on the path of having healthier, consistent and more trustworthy.
Ch 12. Replication. Replication Place copies of data to a different location Use: Reduce locking conflict when multiple sites want to work on same set.
© Copyright 2014 TONE SOFTWARE CORPORATION. Confidential and Proprietary. All rights reserved. ® Administrator Training – Release Alarms Administration.
1 Chapter Overview Using Standby Servers Using Failover Clustering.
1 Ch 11. Backup your data. 2 Backup Device An object contain location of backup device Location can be a file or a tape device.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Software Version: DSS ver up85 Presentation updated: September 2011 Step-by-Step Guide to Asynchronous Data (File) Replication (File Based) within.
SSIS ETL Data Resource Management. Create an ETL package using a wizard database server to database server The business goal of this ETL package is to.
SQL Database Management
Project Management: Messages
Explore the Integration Services Catalog
Is 221: Database Administration
How to Fi
CS3015 Beacon Module 4 Messenger & Setting Preferences
Designing Database Solutions for SQL Server
Deploying and Configuring SSIS Packages
Automating SQL Server Management
Performing Database Recovery
Sql Saturday Philadelphia
How to install and manage exchange server 2010 OP Saklani.
Presentation transcript:

Ch 10. Maintaining and Automating SQL Server Requires SQL SP1

Check Database Check database To check and repair database DBCC CHECKDB To check and repair database Set to single user mode first: ALTER DATABASE AdventureWorks SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CHECKDB (‘AdventureWorks’, REPAIR_REBUILD) Set back to mult-user mode ALTER DATABASE AdventureWorks SET MULTI_USER WITH ROLLBACK IMMEDIATE

Shrink Database When data is deleted, space is not released until you shrink database To shrink database: Right click on a database Select tasks->shrink->database Check Reorganize files… Click ok

Automation Automation uses SQL Server Agent to run and schedule Works on T-SQL codes, scripting languages, operating system command, replication tasks Contain Alerts , operators, and jobs

Automation - Operator An operator is someone who is to be contacted in case of problems occur in SQL Server Can be contacted via email, pager, Net Send ( a pop up notification on screen) Multiple operators can be created, each respond to different problems / events

Automation- operator Example of a Net Send

Automation - Operator Create an operator Expand on SQL Server Agent, Right click on operator, select New Operator In the Name box, enter Administrator In the Net Send address box, enter your computer name Leave Pager on duty schedule empty, which will allow the operator to be contacted anytime Click OK to finish.

Automation - Operator Fail-Safe Operator – a default operator to receive notifications when no other operator is available Right click on SQL Server Agent->Properties On Alert system page, check Enable fail-safe Operator, select Administrator as the operator, Notify using Net Send Click OK to finish, Administrator is now also the fail-safe operator

Automation - Job A job is a series of tasks to be performed Assign operators to a job to receive notifications/messages

Automation - Job Create a job and assign to operator Expand SQL Server Agent Right click on Jobs and select New Job In Name box, enter TestJob In Steps page, click the new button to create a new step

Automation - Job In Step name box, type Create database Type following codes: CREATE DATABASE AutomationTest ON PRIMARY ( NAME=AutomationTest_dat, FIlENAME=‘c:\AutomationTest.mdf’, SIZE=10MB, MAXSIZE=15, FIlEGROWTH=10%)

Automation - Job Click Parse button to verify codes Click Advanced page, On Success Action = Go to next step On Failure Action = Quit Job and report failure Click OK to create the job

Automation - Job Job Scheduling On Schedule page, click New button In the name box, type Create Database Select One time from schedule type, check Enabled Set one time occurrence-> Time to 5 min after current time Click OK to continue

Automation - Job Assign an operator to a job On notification page, check Net Send, and select Administrator as operator Select When the job completes. Administrator will receive a Net Send message when the job is complete Click OK to continue.

Automation - Alert A notification to user of specific event Notification can be in form of email, pager, Net Send

Automation - Alert To create an alert Expand SQL Server Agent Right click Alerts, select New Alert In the name box, type Number Alert Select <all databases> which will cause alert to be applied to all databases Check Error Number

Automation - Alert Enter 14599 into error number text box On Response page, check Notify Operators Check Administrator->Net Send In options page, under include alert error text in , check net send Open new query, type Raiserror(14599,10,1) WITH LOG to simulate alert.

Automation – Custom Error Use Master Sp_addmessage @msgnum=50001, @severity=10,@msgtext=N’ this is a custom error. ’ , @with_log=‘TRUE’

Automation – Performance Alert Alerts an operator when a performance event is met Frequently used to detect performance problem in its early stages

Automation – Performance Alert Expand SQL Server Agent Right click Alerts, select New Alert In the name box, type Performance Alert Select <all databases> which will cause alert to be applied to all databases In type list, select SQL Server Performance Condition Alert

Automation – Performance Alert In Counter box, select Percent Log Used In Instance box, select AdventureWorks Select Alert If Counter to Falls Below In Value Box, type 100 Select Response page, Notify Administrator by Net Send Click OK

Automation – Performance Alert A alert message will pop up on screen notify Administrator Log File used is less than 100% Right-click on Performance Alert->disable to stop pop-ups

Maintenance Plan Wizard A wizard automatically create jobs for you to maintain your SQL database A good way to group maintenance jobs into one package

Maintenance Plan Wizard Expand Server->Management, Right click Maintenance Plans, and select Maintenance Plan Wizard In Select Plan Properties dialog box: In Name text box, enter Maintenance Plan Test Select Single Schedule for entire plan or no schedule Click Change to bring up job schedule properties Change Schedule type to One Time Add 10 minutes to time Click ok, then click next In Select Maintenance Tasks dialog box, check following tasks and press next: Shrink database Backup database (full) Backup database (differential) Backup database (Transaction Log) Maintenance Clean Up Tasks

Maintenance Plan Wizard In Task Order page, use default order and click next In Define Shrink Database Tasks, select all databases and click next In each Define Backup Database, select all databases and click next In Define Maintenance Cleanup Tasks, use default and click next Use default in Select Report option, click next Verify and complete the wizard by click Finish Check jobs that are created for you automatically

Copy Database Wizard A wizard to help you copy a database to another location Option to allow you to copy database online

Copy Database Wizard Right click on a database, select Tasks->copy Database to start the wizard Select your server Select destination server, for this exercise, copy to the same server Select Use SQL Management Object method ( slower)

Copy Database Wizard Select databases to copy Configure destination database Use default name for package Schedule SSIS job, use Run Immediately Click finish