Managing and Monitoring SQL Server 2005

København d. 22. november 2005
Thomas Skytte Damø Senior Technology Specialist

You Can Be More Productive 

Managing and Administering  Maintaining Security/Operational Policies  Monitoring and Troubleshooting  Performance Tuning  Automating The Work  By Just Upgrading

Take Advantage When?
Immediate Leverage

How much work to leverage the technology? Minimal Work to Design and Upgrade
SQL Server Management Studio
  

DDL Triggers
Auditing and Prevention

VSTS 2005

Unified Error Viewer/ Reports/ Monitoring/ Server Dashboard

SQL Server Agent
New Automation/Alerting

Code Analysis and Modeling

Event Notifications
Auditing and Reaction Events

Performance Monitor SQL Server Management Integration Pack  SQL Server  Database Profiler Maintenance Plans  Database Engine  Database Mail Tuning Advisor  SQLCMD  Improving Manageability from Design to Installation to New  System Features/Extensions Information  Centralized Monitoring to allow a cohesive picture of what’s going
Catalog Views and DMVs

Microsoft Operations Manager (MOM)

Managing and Administering
 SQL Server Management Studio  Dynamic Management Views

Management Studio
Integrated management and

development environment Based on Visual Studio .NET Integrates Functionality of:
 Enterprise Manager  Query Analyzer  Analysis Manager

Used to manage:  Relational databases  Analysis Services  Reporting Services  SQL Server Mobile databases Includes scripting tools for:  Transact-SQL/SQLCMD  XMLA/MDX/DMX Provides graphical reports

A Tour of SQL Server Management Studio

Thomas Skytte Damø Senior Technology Specialist Microsoft Danmark

Dynamic Management  Views built on top of internal Views
Execution of user code and associated connections

structures  Ideal for tracking performance Server Level Component Level

Memory, locking & scheduling

SQL Service Broker

Full Text Search

Transactions & isolation

Query Notifications

I/O on network and disks

Common Language Runtime

Databases and database

DM_ Object Interface
SQL Server Relational Engine
User DB SPs, Views, Tables, etc.

(visible as “sys” schema)

Resource DB

DMVs and DMFs Aggregate Statistical Data

Monitoring or Diagnostic Application

Some existed, yet not exposed

Operational Memory Structures

New and exposed in SQL Server 2005

How DMVs Improve Access 
 Not tabular by default  Difficult to programmatically analyze
 Pre-create temp table, complete definition with data

types  Must use dynamic string execution to execute results into temp table

 SQL Server 2005:

sys.dm_db_index_physical_stats(para ms)
 Table-valued function returns tabular set  EASY to programmatically analyze

How DMVs Improve Management
 Index-related DMVs
 sys.dm_db_index_physical_stats
 Size and fragmentation information for tables

and indexes

 sys.dm_db_index_operational_stats
 Internals information for table and index


 sys.dm_db_index_usage_stats
 Index statistics and usage counts information

for individual indexes

 sys.dm_db_index_partition_stats

Maintaining Security and Operational Policies
 SQL Server Surface Area

Configuration  Auditing and Change Control

Protect Your Server
Configuration for Services

SQL Server Surface Area Configuration
and Connections
 Service Settings  Remote Connections  SQL Server Agent  Reporting Services  Integration Services  SQL Server Browser

Configuration for Features  sp_configure settings  Catalog Table queries  Database Mail  xp_cmdshell  CLR Integration

SQL Server Surface Area Configuration

Thomas Skytte Damø Senior Technology Specialist Microsoft Danmark

Auditing and Change Control
Controlling and Monitoring Change
 DDL Triggers – targeting
 Specific Commands: DROP_TABLE  Groups: DDL_PROCEDURE_EVENTS

 Event Notifications and WMI Events –

target all of the above, plus:
 Specific Trace Events:


DDL Triggers

Thomas Skytte Damø Senior Technology Specialist Microsoft Danmark

Monitoring and Troubleshooting
 SQL Server Profiler  System Monitor Integration  Microsoft Operations Manager

 Supports multiple

A Unified Approach

 SQL Server

Database Engine Information Information

 SQL Server Agent  Windows Event

Viewer Application Log

 Database Mail Logs

 Across all logs,


 Searching

SQL Server Profiler
Analyze the SQL Server

Database Engine and Analysis Services
Significantly easier to setup

(Events, Data Columns and Filter dialogs combined)
Special Events: Service

Broker, Notification Services, etc…
Special Event types:

Showplan XML and Deadlock Graph – can be saved to files
Supports pause and modify Can Profile SQL Server 2000

and 2005

System Monitor Integration
Performance Counter Logs
 Create a Profiler Trace  Create a Performance 

Monitor Log Open Trace (complete load), Use File – Import Performance Data, Select Objects/Counters… Works solely based on time – make sure the two clients (if different) are time correlated Can select in either data set and indicators correlate Works with SQL Server 2000 and SQL Server

A Tour of SQL Server Profiler

Thomas Skytte Damø Senior Technology Specialist Microsoft Danmark

Microsoft Operations Manager
Monitoring the Enterprise
 Use SQL Server Management Pack to

Lower Operational Costs and Increase Availability  Operate from a central console
 Manage large SQL Server

deployments  Detect problems proactively
 Understand problem details  Fix the problems by launching

tasks  Trend history of performance counters  Generate Reports
 Plan for capacity

 Microsoft Operations Manager to ship

Performance Tuning
 Database Engine Tuning Advisor

Database Engine Tuning Advisor

recommendations Time-bound tuning Indexes with Included columns XML Input/Output Drop ONLY mode Parameterized command line execution Import previously saved Session Definition (XML format) Workload options
 Can be a *.trc, *.sql or *.xml


Database Tuning Advisor

Thomas Skytte Damø Senior Technology Specialist Microsoft Danmark

Automation and Upgrade
 SQL Server Agent  Database Maintenance Plans  Database Mail  SQLCMD  Upgrade Advisor

SQL Server Agent
Alerts can be triggered by:
 SQL Server errors  Performance monitor

From Proactive to Reactive

thresholds  WMI events

SQL Agent can use Database

Mail Proxy Accounts

 Each proxy account is

associated with a SQL Server Credential  Proxy account can be granted to database user, database role, and fixed server role  Proxy account can be

Database Maintenance Planson SQL Server Based
Integration Services
Flexible Wizard based

Options to create cross

database plans
Backup all users

databases will pick up newly added databases – even after the plan is created

Database Mail
Uses SMTP – No Microsoft

Outlook dependency!
Mail calls made outside SQL

Server process
Cluster support 64-bit support SMTP account failover No SQLCLR dependency Asynchronous and queued

Leverages SQL Server

Service Broker for queuing
Multiple SMTP accounts Logging


Command-line automation and scripting OSQL  Replaces
 Supports Connections

to multiple servers (master scripts)  Allows Parameter substitution

 Variables defined in

script  Variables passed in  Environment variables

 Better Control on

Error  Initialization Scripts

Upgrade Advisor
Get Ready!
Checks schema for

best practices and compatibility Upgrade Advisor on SQL Server 2005 Upgrade Handbook SQL Server 2005 Editions

Why Upgrade?

Database Engine Database Maintenance Replication Service Broker Backup and Restore Enhancements Seamless DDL replication HTTP Access Checksum Integrity Checks Merge Web Sync Database Tuning Advisor Dedicated Administrator Connection Oracle Publication Enhanced Read ahead & scan Dynamic Configuration AWE Peer to Peer Transactional replication Indexes Highly-available Upgrade with Included Merge replication perf and scalability Columns Online Index Operations Multiple Active Result Sets New monitor and improved UI Online Restore Persisted Computed Columns Analysis Services and Data Mining Management Tools Try/Catch in T-SQL statements Analysis Management Objects MDX & XML/A Query Editor Common Table Expressions Windows Integrated Backup and Maintenance Plan Designer Restore Server Events Source Control Support Web Service/XML for Analysis Snapshot Isolation Level Profiler access to non-sa Integration Services and DM Partitioning SQLCMD Command Line Tool Integration Synonyms Database Mail Eight new Data Mining algorithms Dynamic Management Views Performance Tuning Auto Packaging and Deployment .NET Framework Profiling Analysis Services Migration Wizard Common Language Runtime Integration Exportable Showplan & Deadlocks Integration Services CLR-based Types, Functions, & Triggers Profiler Enhancements New high performance architecture SQL Server .NET Data Provider New Trace Events Visual design and debugging Data Types Full-text Search environment CLR-based Data Types Backup/Restore includes FT Extensible with custom code and VARCHAR(MAX), VARBINARY(MAX) catalogs scripts XML Datatype Multi-instance service XML task and data source Database Failure and Redundancy SQL Client .NET Data Provider SAP connectivity Fail-over Clustering (up to 8 node) Server Cursor Support Integrated data cleansing & text Database Mirroring Multiple Active Result Sets mining Slowly changing dimension wizard Database Snapshots Security Improved flow control Enhanced Multi-instance Support Catalog and meta-data security Integration with other BI products Password policy enforcement XML New XML data type Fine Grain Administration Rights Reporting Services Report Builder XML Indexes Separation of Users and Schema Analysis Services Query Designer XQUERY Support Surface Area Configuration Enhanced Expression Editor XML Schema (XSD) support Notification Services Multi-valued Parameters FOR XML PATH Embed NS in existing application Date Picker XML Data Manipulation Language User-defined match logic

 Politiets DNA database

Hvad siger kunderne om de nye management tools?

Politiets DNA database
Politiets DNA database

udvikles og administreres af COM-IT Applications A/S Implementerede SQL Server 2005 på Beta2, kører ren 64 bit platform (Windows 2003 & SQL 2005 64 bit edition) COM-ITs udviklere har haft flg. fordele ved anvendelsen af de nye management tools:
 Eet integreret produkt  Direkte CLR integration  Endnu bedre styring af

sikkerhed i SQL Server 2005

© 2005 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Sign up to vote on this title
UsefulNot useful