Sunteți pe pagina 1din 34

Managing and

Monitoring SQL Server


2005
København d. 22. november 2005
Thomas Skytte Damø
Senior Technology Specialist
tskytte@microsoft.com
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?
How much work to leverage the
technology?
Upgrade Minimal Work to Design and
Immediate Leverage Architect
 SQL Server  DDL Triggers  VSTS 2005
Management Auditing and Prevention Code Analysis and
Modeling
Studio  SQL Server Agent
Unified Error Viewer/ New Automation/Alerting
 Event Notifications
Reports/ Monitoring/
Server Dashboard
 Microsoft
Auditing and Reaction
Operations
 Performance Events
Manager (MOM)
Monitor SQL Server Management
Integration Pack
 SQL Server  Database
Profiler Maintenance
 Database Engine Plans
Tuning Advisor  Database Mail
 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
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
 Views built on top of internal
structures
 Ideal for tracking performance
Server Level Component Level
dm_exec_* dm_repl_*
Execution of user code and Replication
associated connections dm_broker_*
dm_os_* SQL Service Broker
Memory, locking & dm_fts_*
scheduling
Full Text Search
dm_tran_*
dm_qn_*
Transactions & isolation
Query Notifications
dm_io_*
dm_clr_*
I/O on network and disks
Common Language
dm_db_* Runtime
Databases and database
DM_ Object Interface
SQL Server Relational
Engine

SPs, Views,
User DB
Tables, etc.
Monitoring
or
Diagnostic
Application
Resource DB DMVs
(visible as and
“sys” schema) DMFs
New and exposed
Some Operational Aggregate in SQL Server
existed, yet Memory Statistical 2005
not exposed Structures Data
How DMVs Improve
Access
SQL Server 2000: DBCC
SHOWCONTIG
 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
activities
 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
SQL Server Surface Area Configuration
Configuration for Services
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
 CREATE PROCEDURE  ALTER PROCEDURE
 DROP PROCEDURE
 Event Notifications and WMI Events –
target all of the above, plus:
 Specific Trace Events:
DATA_FILE_AUTO_GROW
 Trace Groups: TRC_STORED_PROCEDURES
 SP_RECOMPILE  SP_CACHEMISS
DDL Triggers

Thomas Skytte Damø


Senior Technology Specialist
Microsoft Danmark
Monitoring and
Troubleshooting
 SQL Server Profiler
 System Monitor Integration
 Microsoft Operations Manager
Monitoring
A Unified Approach
 Supports multiple
logs
 SQL Server
Database Engine
Information
 SQL Server Agent
Information
 Windows Event
Viewer Application
Log
 Database Mail Logs
 Across all logs,
allows:
 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
Partitioning
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
format
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
From Proactive to Reactive
Alerts can be triggered by:
 SQL Server errors
 Performance monitor
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
Plans
Based on SQL Server
Integration Services
Flexible Wizard based
Interface
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
architecture
Leverages SQL Server
Service Broker for queuing
Multiple SMTP accounts
Logging
SQLCMD
Command-line automation and
scripting
 Replaces OSQL
 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 microsoft.com
SQL Server 2005
Upgrade Handbook
SQL Server 2005
Editions
http://www.microsoft.com/sql/2005/productinfo/sql2005feature
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
Indexes with Included Highly-available Upgrade replication
Columns Online Index Operations Merge replication perf and scalability
Multiple Active Result Sets Online Restore New monitor and improved UI
Persisted Computed Columns Management Tools Analysis Services and Data Mining
Try/Catch in T-SQL statements MDX & XML/A Query Editor  Analysis Management Objects
Common Table Expressions Maintenance Plan Designer Windows Integrated Backup and
Server Events Source Control Support Restore
Snapshot Isolation Level Web Service/XML for Analysis
Profiler access to non-sa
Partitioning Integration Services and DM
SQLCMD Command Line Tool
Synonyms Integration
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
CLR-based Types, Functions, & Triggers Profiler Enhancements Integration Services
SQL Server .NET Data Provider  New high performance architecture
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
Database Snapshots Security Slowly changing dimension wizard
Enhanced Multi-instance Support Catalog and meta-data security Improved flow control
XML Password policy enforcement Integration with other BI products
New XML data type Fine Grain Administration Rights Reporting Services
XML Indexes Separation of Users and Schema Report Builder
XQUERY Support Surface Area Configuration Analysis Services Query Designer
XML Schema (XSD) support Notification Services Enhanced Expression Editor
FOR XML PATH Embed NS in existing application Multi-valued Parameters
XML Data Manipulation Language User-defined match logic Date Picker
Hvad siger kunderne om
de nye management
tools?
 Politiets DNA database
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.

S-ar putea să vă placă și