Presentation is loading. Please wait.

Presentation is loading. Please wait.

Getting the Most from SQL Server 2005 Don Vilen Program Manager SQL Server Microsoft Corporation.

Similar presentations


Presentation on theme: "Getting the Most from SQL Server 2005 Don Vilen Program Manager SQL Server Microsoft Corporation."— Presentation transcript:

1 Getting the Most from SQL Server 2005 Don Vilen Program Manager SQL Server Microsoft Corporation

2 Agenda  SQL Server Management Studio  SQL Server Configuration Manager  SQLCMD Command-line Tool  Database Mail  SQL Server Agent  Monitoring  Database Engine Tuning Advisor  SQL Server Profiler

3 Manageability Goals  Integrated Management, Rich UI  Scale down time/effort for common management tasks  Server Transparency  Everything scriptable  Leverage Visual Studio IDE  Integrate.NET development

4 Manageability – Tools  New: SQL Server Management Studio  New Rich GUI  Integrated Authoring, Management  Support all SQL Server components  New: Management Objects (SMO)  Managed code, new design patterns  Improved Scalability, Scripting  New: SQLCMD  High Performance CMD line tool  New: Database Mail  Replacement for SQLMail  SMTP Support, Cluster Support, 64-bit Support  No Outlook required

5 SQL Server Management Studio  Simplifies common management tasks  Integrated management interface  Server transparency  Reports show server status through Dynamic Management Views (DMVs)  SQL Management Object extensibility

6 Management Studio  Integrated management  Database Engine  Analysis Services  Reporting Services  Notification Services  Integration Services  SQL Server Mobile Edition …  Multiple versions of SQL Server from one interface  Rich management and authoring  Performance  Manage multiple servers, MANY objects  Operations: Former Query Analyzer

7 SQL Server Configuration Manager Change the Service Log On Accounts for each SQL Service Manage the State and Start Mode for SQL Services Configure SQL Services, Network Protocols and Network Configuration

8 Scripting  Management Studio uses SMO scripter  All actions are scriptable  Review changes before they happen  Edit and customize actions  Save commands for repeated execution  Schedule tasks for later execution  Learn by example

9 Templates Templates for common T-SQL tasks

10 SQL Command-Line Tool Type SQLCMD to enter Interactive Mode Type Exit to exit Interactive Mode “SQLCMD –S” to connect to Named Instance Run “SQLCMD –i” to run against a pre-built script file Run “SQLCMD –o” to direct output to a file

11 CONNECT LON-DC-01\MSSQLSERVER setvar db CustomerDB BACKUP DATABASE $(db) TO DISK = “$(PATH)\$(db).bak” CONNECT LON-SQL-01\MSSQLSERVER setvar db ContactsDB BACKUP DATABASE $(db) TO DISK = “$(PATH)\$(db).bak” CONNECT LON-DC-01\MSSQLSERVER setvar db CustomerDB BACKUP DATABASE $(db) TO DISK = “$(PATH)\$(db).bak” CONNECT LON-SQL-01\MSSQLSERVER setvar db ContactsDB BACKUP DATABASE $(db) TO DISK = “$(PATH)\$(db).bak” SQLCMD –Q –i C:\SCRIPTS\BACKUP.SQL –v PATH=“N:\BACKUPS” SQLCMD Scripting Functionality LON-DC-01 CustomerDB LON-SQL-01 ContactsDB N:\BACKUPS

12 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

13  Alerts can be triggered by:  SQL Server errors  Performance monitor thresholds  WMI events  SQL Agent can use database mail  New types of Job  Analysis Services  Integration Services  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 associated to subsystem SQL Server Agent

14 Maintenance Plans  Based on SQL Server Integration Services  Flexible Wizard- based interface  Options to create cross-database plans

15 Database Maintenance Plans

16 Maintenance Plan Designer  Designer for maintenance workflow  Add tasks  Define workflow using connectors  Support for concurrent tasks  Specify success and failure paths

17  Set task properties  For example, select database  View T-SQL Task Editor

18  Maintenance plans are SQL Server Agent jobs  Plan properties include schedule  Can execute immediately from SQL Server Management Studio Executing a Plan

19 Manageability - Diagnostics  Dynamic Management Views  Server Transparency  “sys.memory_clerks” – how much memory is each component consuming ?  “sys.schedulers” – Is a scheduler hung ?  SQL Trace  Query data from live traces  SQL Server Profiler  Deadlock and ShowPlan Visualization

20 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  Filtering  Exporting

21 Dynamic Management Views  Expose server state information  Reference using SQL Server 2005 namespace SELECT wait_type, wait_time_ms FROM LON-DCSQL-01.AdventureWorks.sys.dm_os_wait_stats GO SELECT wait_type, wait_time_ms FROM LON-DCSQL-01.AdventureWorks.sys.dm_os_wait_stats GO All dynamic management objects exist in the SYS Schema

22 Dynamic Management Views and Functions  Server Level  dm_exec_*  Execution of user code and associated connections  dm_os_*  Memory, locking & scheduling  dm_tran_*  Transactions & isolation  dm_io_*  Input/Output on network and disks  dm_db_*  Databases and database objects  Component Level  dm_repl_*  Replication  dm_broker_*  SQL Server Service Broker  dm_fts_*  Full Text Search  dm_qn_*  Query Notifications  dm_clr_*  Common Language Runtime

23 Manageability – Tuning  Database Engine Tuning Advisor  Time-Bound Tuning  What-If Analysis  Scalability  XML Show Plan  Publicly available Schema  Programmatic Access  Portability

24 Database Engine Tuning Advisor  SQL Server 2005 provides enhanced tuning for indexes and data partitioning  Use the database engine tuning advisor (DTA) to establish which index and partition schemes should be used  DTA analyzes workload, generates recommendations and scripts  DTA supports “what-if” modelling

25 Database Engine Tuning Advisor

26 .sql script Databases Database Tuning Advisor Table.trc file Workload and Results

27 Which Indexes Might be Missing?  Partial alternative to Database Engine Tuning Advisor  Use with caution; information is based on single statements whose first-choice index is missing  Doesn’t take into account frequency of query or updates  sys.dm_db_missing_index_groups  Information about a specific group of missing indexes, such as the group identifier and the identifiers of all missing indexes that are contained in that group  sys.dm_db_missing_index_group_stats  Summary information about missing index groups  For example, the performance improvements that could be gained by implementing a specific group of missing indexes  sys.dm_db_missing_index_details  Detailed information about a missing index  For example, it returns the name and identifier of the table where the index is missing, and the columns and column types that should make up the missing index  sys.dm_db_missing_index_columns  Information about the database table columns that are missing an index

28 SQL Server Profiler Debug statements Analyze performance Stress test it Audit database activity Capture deadlocks Capture Showplans

29 Summary  SQL Server Management Studio  SQL Server Configuration Manager  SQLCMD Command-line Tool  Database Mail  SQL Server Agent  Monitoring  Database Engine Tuning Advisor  SQL Server Profiler

30 For More Information  SQL Server Books Online  Tutorials on  SQL Server Management Studio  SQLCMD Utility  Database Engine Tuning Advisor  MSDN and TechNet webcasts

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


Download ppt "Getting the Most from SQL Server 2005 Don Vilen Program Manager SQL Server Microsoft Corporation."

Similar presentations


Ads by Google