Microsoft® SQL Server™ 2005 (April CTP) Enterprise Data Management for the DBA Barnaby Jeans IT Pro Advisor Microsoft Canada http://blogs.technet.com/Barnaby_Jeans
Prerequisite Knowledge Knowledge of Microsoft SQL Server 2000 or Microsoft SQL Server 7.0 Level 200
What We Will Cover Manageability enhancements Security enhancements Availability enhancements Scalability features Interoperability capabilities
Introduction SQL Server 2005 Data Platform
Enterprise Data Management Developer Productivity Introduction Empowering Productivity High availability for enterprise applications Security enhancements Focus on manageability; self optimization Enterprise Data Management Integration with Visual Studio® and .NET Native XML technology Interoperability: open standards, Web services Developer Productivity Comprehensive ETL solution Real-time decision making: reporting, data mining Scalability and availability enhancements Business Intelligence Secure, reliable, and productive database platform for line-of-business and analytical applications
Manageability Tools New: SQL Server Management Studio New rich GUI Integrated authoring, management Supports all SQL Server components Replaces Enterprise Manager, Query Analyzer Can manage multiple servers
demonstration Management Studio Registering Servers Using Object Explorer Executing queries Using Solution Explorer
Manageability SQLCMD Command-line tool for executing T-SQL statements and scripts Replaces osql Uses OLE DB (not ODBC or DB-Library) Has a dedicated administrator connection
Manageability SQLiMail/Database Mail Uses SMTP, not Extended MAPI Profiles Secure – Profiles enable specification of users with access to SQLiMail profile Integrated management within SQL Server Failover – can point to multiple SMTP servers from one profile for ensured mail delivery Service Broker used to deliver messages to avoid blocking a stored procedure Execute sendimail_sp
Manageability Tuning Tools XML Show Plan Publicly available Schema Programmatic access Portability Database Tuning Advisor Time bound tuning What-if analysis Scalability
demonstration Tuning Tools XML Showplan Database Tuning Advisor
Manageability Diagnostic Tools SQL Profiler Integrated with Performance Monitor Deadlock graph Integrated Event Logs
demonstration Profiler and Event Logs SQL Server Profiler Graphical deadlocks Diagnosis using integrated event logs
Security Feature Enhancements Authorization Enhancements User schema separation Module execution context Catalog security Granular permission control Encryption enhancements Auditing DDL triggers Events
Security Architecture Integrated Windows Authentication Password Complexity Granular Permissions
demonstration Auditing Auditing using Profiler DDL Triggers
Security Solution: User-Schema Separation Table View Stored Proc Function User 2 Owned by Owned By Database Object Contained in Owned by Schema User Drop user does NOT require application change!
Security Execution Context Execute Perms checked for User3 Select Perms checked for User3 SQL Server 2000 User2.Proc1 User1.T1 User 3 User1.Proc1 User1.T1 Execute Perms checked for User3 NO Perms checked for User3 SQL Server 2005 User 3 User2.Proc1 User1.T1 ‘Execute AS ‘X’ ’ Execute Perms checked for User3 Select Perms checked for ‘X’. Not for user3
Addressing Barriers to Availability Database Server Failure Failover Clustering Database Mirroring Database Maintenance & Operations Online Index Operations Fast Recovery Fine-Grained Online Repairs Data Access Concurrency Limitations Snapshot Isolation User, Application Errors Database snapshots
Database Mirroring Achieving high availability while managing costs Database Failover Very fast failover…less than 3 seconds Automatic or manual failover Automatic, transparent client redirect Database Snapshots for Reporting Works with standard hardware and storage Mirror Principal Witness Log Application SQL Server 2 4 5 1 Data 3 3-6
Online Index Operations Online index maintenance Create, Rebuild, Reorganize, Drop, Add or drop constraint Fully parallel Online/offline are both supported
Other Availability Features On-Line Page and File restore Database remains online - Only data being restored is unavailable Dedicated Admin Connection Access to Server when regular connections fail Fast Recovery Database is available when undo begins Redo Undo Available
Database Snapshots Snapshot of a database at a point in time Created instantly Read only Does not require a complete copy of the data Shares unchanged pages of the database Requires extra storage only for changed pages Uses a “copy-on-write” mechanism Recover from User, Application or DBA error Rewind database to Database Snapshot
demonstration Database Snapshots Create a database snapshot
Availability Table Partitioning SQL Server 2000 allowed partition views SQL Server 2005 allows partitioned tables and indexes Increases performance on multiprocessor machines Eases management of data – data can be grouped logically Data movement easier
Availability Setting Up Partitioning Three steps Create the partition function Create the partition scheme Create the partitioned table
demonstration Table Partitioning Create a partitioned table
Availability Replication Changes Stand-alone Replication Monitor Merge performance and scalability improved 2-4x DDL on published objects supported seamlessly while replicating New peer-to-peer replication wizard
Availability Web Synchronization Merge replication Subscriber IIS Publisher/Distributor -InternetUrl https://myserver.mydomain.com Replisapi.dll Firewall
Snapshot Isolation Increased data availability for read applications Allows non-blocking consistent reads in an OLTP environment Writers don’t block readers Readers don’t block writers
64-bit Database Platform High-performance computing Optimized for Windows Server 2003 Support for AMD Opteron & Intel Itanium & Intel EM64T Great performance Large memory addressability (up to 32 TB) Nearly unlimited virtual memory (up to 8 TB) I/O savings due to larger memory buffer pools T-SQL code-compatibility with SQL Server 2000 8 node clustering support Same on-disk format as 32-bit for easy migration 64bit support for relational engine and BI Compelling alternative to expensive Unix solutions Scalability Manageability Cost Savings The highly scalable database platform for memory intensive, performance-critical business applications
Deep CLR Integration CLR goes through SQL OS for: SQL Engine Memory Threads/fibers Synchronization SQL-CLR host co-ordinates Assembly Loading Security management App domains Escalation policy for exceptions SQL Engine CLR Hosting Layer SQL OS Windows
The Developer Experience VB,C#,C++ Build Assembly: “TaxLib.dll” VS .NET Project SQL Data Definition: create assembly … create function … create procedure … create trigger … create type … Runtime hosted by SQL (in-proc) SQL Server SQL Queries: select sum(tax(sal,state)) from Emp where county = ‘King’
Should I use T-SQL or CLR If the procedure is simply a wrapper for accessing the base table by encapsulating basic INSERT/UPDATE/DELETE/SELECT operations Y If the procedure involves primarily forward-only, read-only row navigation from a result set and some processing involving each row If the procedure involves both significant data access and computation and logic
demonstration CLR Support Create and Deploy a CLR stored procedure
XML - Usage Scenarios XML Datatype, Schema, Indexes – Storage and management of semi-structured data and hierarchical data XQuery and DML Extracting stored XML Node level update (instead of full XML) Customer usage, benefit : New scenarios (e.g. Document Management)
XML Support Flexible Storage, Query and DML SQL XQuery OpenXML XML Data Type FName LName Addr Phone Fax XML
SQL Web Services http://server1/aspnet/default.aspx Kernel Mode Native SOAP access Standards based access to SQL Server No client dependency Improved Interoperability New “ENDPOINT AS HTTP” object Configure connection info Configure authentication Expose Functions & SPs Expose TSQL Batches Kernel Mode Listener http://server1/sql/pubs?wsdl
demonstration XML Support Web Services Generate XML from a Query Publish Stored Procedure as Web Service
Session Summary New integrated management tools Secure by design, by deployment, and by default Expanded and enhanced availability options
blogs.technet.com/Barnaby_Jeans For More Information Visit TechNet at www.microsoft.com/technet For additional information on books, courses, and other community resources that support this session, visit blogs.technet.com/Barnaby_Jeans