* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download SQL Server 2005 New Features & Courses - e
Survey
Document related concepts
Entity–attribute–value model wikipedia , lookup
Concurrency control wikipedia , lookup
Tandem Computers wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Oracle Database wikipedia , lookup
Ingres (database) wikipedia , lookup
Microsoft Access wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Database model wikipedia , lookup
Team Foundation Server wikipedia , lookup
Relational model wikipedia , lookup
Clusterpoint wikipedia , lookup
Transcript
Welcome, Michigan State University! SQL Server 2005 New Features & Courses By George Squillace New Horizons of Michigan MCT, MCSE, MCDBA MCITP – Database Administration MCITP – Enterprise Messaging Instructor Credentials & Background • 15+ Years Computer Training Experience • 11+ Years Technical Training Experience • Several Industry Certifications Earned: • • • • (formerly) MCNI and MCNE (Novell NetWare) MCSE (10+ years) MCT – Microsoft Certified Trainer MCDBA – Microsoft Certified Database Administrator – SQL 2000 Server • MCTS – Microsoft Certified Technology Specialist, SQL Server 2005 • MCITP – Microsoft Certified IT Professional, SQL Server 2005, Database Administration • MCITP – Enterprise Messaging • Working with Databases for nearly twenty years 2 • 4 ½ Years of SQL Server Experience Attendee Introductions • Hopes? • Expectations? • Any experience with SQL Server 2005? • Any Immediate Plans to Upgrade? 3 Agenda • Part I – New Features for DBAs • Part II – New Features for Database Developers • Part III – Microsoft SQL 2005 Related Courses & Certification Track • A Note (or two) on Virtualization • A Note (or two) on the Next Version of SQL Server, “Katmai” (SQL Server 2008) • Resources 4 Part I – New Features for Database Administrators • Preview: • • • • Product Selection & Installation New Administration & Configuration Tools Security Changes Other New Features 5 First, SQL Server 2005 Editions • Enterprise Edition • • • Standard Edition • • • An MSDE (SQL 2000 Desktop Engine) Replacement Free, as well as other Development Tools! Limited to 1GB of Buffer Cache and 1 CPU and 4GB Database size Compact Edition • • • • 32 bit only Limited to two CPUs and 3GB of Buffer Cache No Database size limitation Visual Studio and SQL Server Express Editions • • • • 32 bit and 64 bit Also Supports Failover Clustering Workgroup Edition • • • • Every Feature, especially the Scalability and Recovery Features, like Database Snapshots, Database Mirroring, and Failover Clustering 32 bit and 64 bit Primarily for handheld computers Uses a subset of Transact-SQL Formerly called SQL Everywhere Edition Comparison link (A Microsoft resource) 6 Licensing…3 Options • Per Processor (Socket, not Core) • For very high client-to-server scenarios • Server Plus Device CALs (Client Access License) • … best choice if there are multiple users per device • Server Plus User CALs • … best choice if there are multiple devices per user 7 Product Installation – Requirements • Hardware Requirements • Pentium 600 MHz or higher • 512MB of RAM + OS Requirements • Typical Install Requires ~637MB of Disk Space, but It Depends on Component Selection • Software Requirements • • • • • • IE 6 SP1 or Higher (for Management Tools) IIS for Reporting Services TCP/IP Networking .NET Framework 2.0 (Installation will add, if necessary) Windows Installer 3.1 (Installation will add) Microsoft Data Access Components (MDAC) 2.8 SP1 or Higher 8 Product Installation - Steps • Two phase Install: • Component Update Phase • Setup (.msi) Phase • See Installation screenshots • System Configuration Checker (SCC) • Select Components (Analysis Services, Reporting Services,…) • Specify Install Type (Default or Named Instance) • Feature Selection; subsets of Components • Note 1: There are new Sample Databases, and They’re Not Included Automatically During Installation • Note 2: Get the Latest Books Online (BOL) After Installation • The BOL download is over 120MB! 9 Upgrade & Coexistence • SQL Upgrade Advisor (on the Product Compact Disc and Downloadable) • Can Directly Upgrade SQL Server 7.0 SP4 or later • Can Directly Upgrade SQL Server 2000 SP3 or later • Can Install SQL Server 2005 as a Named Instance on Earlier Versions of SQL as Supported by Hardware • Can use ALTER DATABASE (or Mgmt. Studio) to Set Database Compatibility Level to earlier than SQL Server 2005 10 Completely New Administration Tools (Each tool will be described in detail on subsequent slides) • Management Studio (Replaces Enterprise Manager and Query Analyzer) • Surface Area Configuration Tool • SQL Server Configuration Manager (Replaces SQL Server Manager) • • • • • sqlcmd (command line tool) (Replaces “osql”) Profiler Database Engine Tuning Advisor (DTA) Current Activity Monitor SQL Server Integration Services (SSIS), Designed in Business Intelligence Development Studio (BIDS) (Replaces DTS) 11 Management Studio – Part 1 • Integrated Management AND Query Tool • Separation of System and User Objects • Databases • Tables • Views • • • • Non-modal dialog boxes Virtually Every Action Scriptable Relevant Screenshot Persistent Database Connection Not Required (unlike Query Analyzer & Enterprise Manager) 12 Management Studio – Part 2 • Can Display Line Numbers in Query Window • New Keyboard Method for Comment/Uncomment Code • Query Editors for: • Transact-SQL Queries • MDX, DMX and XMLA Queries • Reports Button in Summary TAB for the following Mgmt. Studio nodes: • • • • • Server/Instance Database Service Broker (Beneath Database Node) Logins (Beneath Instance Security Node) Management • Can Connect to: • • • • Database Engine Service Analysis Services Reporting Services Integration Services 13 Management Studio – Part 3 • Can Disconnect and then Reconnect within a Window (and change Connections) • New Template Explorer (View, Template Explorer) • Can Integrate with Online Help • Various Tutorials Available • Completely Different Help Interface • Can Connect to SQL Server 2000 and MSDE Machines for Administration 14 Management Studio – Part 4, Visual Studio Overlap • Can Create 3 Types of Projects: • SQL Server Scripts Project • Analysis Services Scripts Project • SQL Server Mobile Scripts Project • Several Dockable/Hideable Panels • Integrates with Visual Source Safe • (Tools, Options, Source Control) 15 Surface Area Configuration Tool • Configure SQL Server Related Service Settings • Select an Account for a Service • Service Startup Setting • Start/Pause/Stop • Enable/Disable SQL Server Related Features • • • • • • xp_cmdshell Database Mail DAC (Dedicated Administrative Connection) CLR Integration Service Broker Ad hoc Remote Queries 16 SQL Server Configuration Manager • Configure SQL Server Services • Configure Server Network Configuration • Configure Client Network Configuration (SQL Native Client, or “SNAC”) • Replaces the Server and Client Network Library Tools 17 sqlcmd • Use of Variables for Runtime Execution of Scripts • DAC (sqlcmd –A) • osql is still there, but will likely be “deprecated” • Many Available Parameters • Consider Converting your osql scripts, but osql is still available 18 Profiler (Profiler90.exe) • New Interface • Integration of System Monitor and Profiler • Screenshot Reference • • • • Can Trace Integration Services Events Can Trace Analysis Services Events Can Save Trace Results as XML Saving of Traced Showplan as XML (which can later be loaded in Query Editor without the underlying database) • This event is new to SQL Server 2005. It generates the query plan in XML and displays it as text in the TextData column. It also displays the query plan in graphical format in the profiler trace window 19 Database Engine Tuning Advisor (DTA) (v. SQL 2000 Index Tuning Wizard) • • • • • • GUI and Command Line Tools Evaluate or Tune Modes Now sysadmin & db_owner can run Can Tune Multiple Databases per Session Can Limit Tuning Time (1 Hour by Default) “Food” Sources include: • • • • Query File (.sql) Profiler Trace File (.trc) XML workload file (.xml) Profiler Trace Table 20 Current Activity Monitor • New User Interface • Can Configure Automatic Refresh • Many Criteria Available for Filtering Activity • • • • Host Application User Database • Every Column is Sortable 21 Database Mail (new) v. SQL Mail (legacy) • No Longer Requires Outlook/MAPI Client on the SQL Server • Supports any SMTP Server for Mail Transmission • Can Specify >1 SMTP Server for Failover • Cluster Aware • HTML Formatted Message Transmission Supported • New Mail-related system-stored procedures 22 (xp_SendMail isn’t required) Maintenance Plan Wizard changes • Looks Different, But Primarily Same Maintenance Items Are Configurable • The Wizard Permits Changing Task Order • More Granular Configuration of Tasks • Maintenance Plans Result Provide an Editable “Design Surface” Similar to SSIS • Maintenance Plan Wizard Available Tasks Screenshot 23 SSIS • Absolute DTS Replacement • Hosted in Visual Studio/Business Intelligence Design Studio (BIDS) • An SSIS Project Can Contain Multiple Packages and Connection Objects within the Project Can Be Shared Across Packages • Can Programmatically Create Packages • Has Container Objects For Looping & Organizing Tasks • Doesn’t Require a Live Database Connection • Can Still Execute DTS Packages Within SSIS • Package Migration Wizard Available • Downloadable DTS Package Editor Available for SSIS 24 Metadata Retrieval Changes • Actual System Tables Are Hidden and Non-Directly-Updateable…Safer • System Catalogs (including Dynamic Management Views) Are Exposed for Metadata Retrieval in SQL 2005 • System Catalogs Are Found in the sys Schema Under Views, System Views • There are way over 200 System Catalogs, and they have straight-forward names! 25 Many Security Changes – Part 1 • Use of the Schema Object • Security Scopes & Inheritance • Instance/Server Scope • Database Scope • Schema Scope • Use of the CREDENTIAL Object • Granularity of SQL Agent Configuration Through Proxies • Use of Windows Password Policies for SQL Server Accounts • Various Uses of Encryption <see next slide> 26 Many Security Changes – Part 2, Various Uses of Encryption • Code Signing • If Code is Modified It Will Invalidate the Signature (Digital Thumbprint, of sorts) • A Certificate or Assymetric Key Can Be Used for Code Signing • ADD SIGNATURE TO MFG.USP_CREATENEWORDER BY CERTIFICATE MFGCERT1 • Column Value Encryption Functions • EncryptByKey • EncryptByAsymKey • EncryptByCert • Impersonation Context • Code uses the EXECUTE AS…CERTIFICATE clause to Extend Cross Database Trust • Inter-Server Authentication • For Cross-Instance Service Broker and Database Mirroring Authentication of ENDPOINTs • Client-to-Server Communication • Impose SSL Communication 27 Recovery & High Availability (HA) Features – Part 1 • Database Snapshots • Usage: Recover from “DB-Ah-Ohs” • Copy-On-Write Technology • Enterprise Edition Only • Greater Database Page Write-Protection & Per Database Page Restore • Available in All Editions • Recovery from a damaged Master DB is different; no more RebuildM command • HA Diagram reference 28 Recovery & High Availability (HA) Features – Part 2 • Log Shipping Configured Differently, as a Property of the Database • Slightly Fewer Overall Configuration Steps • Screenshots reference 29 Recovery & High Availability (HA) Features – Part 3 • Database Mirroring – New • Requires the Configuration of ENDPOINTs • High Availability Mode • • • • Within 10 Second (Automatic) Failover Automatic Client Redirect, Conditionally Requires a Witness Server Synchronously Applied Transactions • High Protection Mode • Manual Failover • No Witness Required • Synchronously Applied Transactions • High Performance Mode • Manual Failover • No Witness Required • Asynchronously Applied Transactions 30 Peer-to-Peer Transactional Replication (new) • No Distinction Between Publisher & Subscriber • Designed for Apps that Might Read or Modify Data at Any of the Databases Involved in Replication • Each Node Publishes & Subscribes to the Same Schema & Data • Enabled in the Publication Properties 31 Dialog Part II – New Features for Database Developers • Preview: • • • • T-SQL Enhancements Execution Contexts Service Broker & Notification Services Integration with the Common Language Runtime (CLR) 32 T-SQL Enhancements (Many) – Part 1 • Enhancements in the Following Areas: • • • • Database T-SQL Enhancements Index T-SQL Enhancements Full-Text T-SQL Enhancements Table T-SQL Enhancements • FROM…PIVOT/UNPIVOT • FROM…TABLESAMPLE • Table & Index Partitioning T-SQL Enhancements • T-SQL Enhancements for CLR Integration • Security T-SQL Enhancements • See BOL for the Full List of T-SQL Enhancements33 Metadata Retrieval – Part 2 • System Catalogs • “sys” prefix • Over 200 system catalogs • Very straightforward names, i.e., • Sys.databases • Sys.tables • Sys.indexes • Dynamic Management Views • Represent Dynamic Activity and Conditions • “sys.dm_” prefix 34 T-SQL Enhancements (Many) – Part 3 • Structured Exception Handling • Try…Catch… • Example… • Create PROCEDURE dbo.AddData @a int, @b int • AS • • • • • A Sort of Recursive Query, Sometimes Compared to a Derived Table Defined Using a WITH Statement, Not in the FROM Clause MARS (Multiple Active Result Sets) • • • • BEGIN TRY • BEGIN TRAN • INSERT dbo.TableNoKey VALUES (@a, @b) • INSERT dbo.TableWithKey VALUES (@a, @b) • COMMIT TRAN END TRY BEGIN CATCH • ROLLBACK TRAN • SELECT ERROR_NUMBER() ErrorNumber, ERROR_MESSAGE() [Message] END CATCH CTEs (Common Table Expressions) • • • WITH FirstTBLExpr AS (Select Year(OrderDate) AS OrderYear, CustomerID FROM dbo.Orders ), SecondTBL AS (Select OrderYear, Count(Distinct CustomerID) AS NumCusts FROM FirstTBLExpr GROUP BY OrderYear ) Select OrderYear, NumCusts From SecondTBL Where NumCusts > 70; Reduces the Number of ADO Connections Made within an Application Available to the SQL Native Client (In the Connection String) Not Enabled by Default Note: Use of Semicolon at the end of Statements Recommended, Required by Some Statements, Like CTEs 35 New Datatypes • Max Specifier • • • • • • Varchar(max) NVarchar(max) Varbinary(max) Can Be Used as Variables AFTER Triggers Supported Some String Function Support • XML Datatype (Referred to elsewhere) 36 EXECUTE AS for Stored Procedures • EXECUTE AS Caller (This is the Default) • EXECUTE AS Self (The Creator or Alterer of the Sproc) • EXECUTE AS Owner (Uses the Identity of the Owner, which might be the same as the Creator or Alterer) • EXECUTE AS UserX (Execute as a specifically named User) • Create Procedure usp_Proc1 With Execute As ProcExecutionUserX AS… • Can also be integrated with Certificates 37 Partitioned Tables & Indexes • Separates Table Data Across Partitions • An Alternate to Creating Separate Tables Across Partitions • Partitioned Indexes Can Be “Aligned” to the Related Table • Requires the Creation of a… • PARTITION FUNCTION {dictates how to divide the table}, and a • PARTITION SCHEME {which maps the table boundaries to filegroups} • Reference Diagram (Then select the Files & Filegroup Diagram from the “Go to Page” List Box) 38 New Index Features • CREATE INDEX… • WITH INCLUDE • Specifies Nonkey Columns to be Added to the Leaf Level of the Nonclustered Index; Provides for Covering Indexes • WITH ONLINE = ON (Default is OFF) • Enables Underlying Tables & Associated Indexes to be Queried During the Index Operation • WITH ALLOW_ROW_LOCKS = ON (Default) • WITH ALLOW_PAGE_LOCKS= ON (Default) • Creation of Indexes on XML Datatype Columns (Mentioned elsewhere) 39 Integration with Visual Studio’s CLR (Common Language Runtime) • Supported Objects: • Classes: • • • Methods: • • • • • • Stored Procedures Triggers User-Defined Functions Can leverage Visual Studio Programming Skills with SQL Server Available for coding .DLLs (only in-process code, no .EXEs permitted) Use the “.NET Language of your choice”, including: • • • • Aggregates User-Defined Types Visual Basic .NET Visual C# .NET Enables Managed Code Integration, such as with Visual Source Safe Security Boundaries for Assemblies Managed by Assembly Trust Levels • Safe (Default), Assemblies Cannot Touch the File System, Registry, Environment Variables, or the Network • • External Access, Can Access Some External Resources • Unsafe, Unrestricted Access, Can Call Unmanaged Code Supported by the CREATE ASSEMBLY and other DDL Statements 40 Service Broker – Part 1 • “A Service Broker is a Stored Procedure or Application {Using the CLR} Built Using the Service Broker Framework that Monitors a Queue for Incoming Messages.” • An Alternate Development Platform • Enables Asynchronous SQL Server-to-SQL Server/Instance Communication (Messaging) • i.e., Asynchronous Triggers • Nickname “Database Queues Done Right” • Supported Features • Database Integration • Transaction Support • Storage • Security • • • Message Ordering and Message Locking Loose Application Coupling; Distributed Workload Many More Benefits 41 Service Broker – Part 2 • Relevant DDL Objects: • • • • • • • SERVICE ENDPOINT QUEUE MESSAGE CONTRACT ROUTE CERTIFICATE • BEGIN DIALOG CONVERSATION…FROM SERVICE…TO SERVICE…ON CONTRACT…MESSAGE TYPE… 42 Notification Services • Extends Alerting Capabilities • Includes a Pre-Defined Message Type & Contract • Requires Creation of a Queue, Service, & a Route • Can Respond to: • DDL Event • DML Event on a Database Object • Trace Event • CREATE EVENT NOTIFICATION… • Typically…Use a Stored Procedures to Process a Message Placed in a Queue Sent by the Event 43 Notification XML…everywhere • Another FOR XML clause • RAW, AUTO, EXPLICIT (these existed in SQL 2000 Server) • PATH (new, simpler than using EXPLICIT) • Shredding XML with OPENXML • XML data type • • • • XML column Indexing XQuery-based Data Retrieval XQuery-based Data Modification Typed XML (conformity to an XML Schema), CREATE XML SCHEMA COLLECTION… 44 DDL Triggers • Server/Instance Scope • Database Scope • Only FOR/AFTER Triggers, No INSTEAD OF Support • Transaction Rollback Supported • The EVENTDATA() Function Supports Capturing the XML-Formatted Data that the Trigger Captures • Many Clever Uses of this Feature • Reference: SQL Statement Categories Diagram 45 Native XML Web Services Support • No Need to Install MDAC (Windows only) on the Client Nor SQLXML on the Middle Tier (On the IIS Server) • • • • • No Need for IIS on the SQL Server or Elsewhere Cross-Operating System Support Web Platform-to-Web Platform Support Supports SOAP Requires the Use of an HTTP ENDPOINT • Authenticated • Optionally Encrypted 46 Programmatic Management Changes • SQL Management Objects (SMO) v. SQLDMO • Enables Integration with: • Windows Forms Applications • ASP.NET Web Applications • Also a New Programmatic Replication Management Standard 47 The Above Was Not an Exhaustive List of Changes & Additions! Part III – Microsoft SQL 2005 Related Courses • • • • SQL Server Core Courses SQL Server Workshops & Other Admin Courses SQL Server Design Courses SQL Server Business Intelligence Implementation Courses • SQL Server Business Intelligence Design Courses • New Microsoft Certification Program 49 SQL Server Core Courses • Course 2778 T-SQL Querying • 3 Days • Available soon • Course 2780B • • • • Core Database Administration Course Installation, File Management, Disaster Recovery Monitoring, Data Transfer, Automation, High Availability Intro 5 Days • Course 2779B • • • • Core Database Programming Course Database Creation, Tables & Data Types, Constraints, Indexes Functions, Triggers, Views, Stored Procedures, Service Broker 5 Days 50 SQL Server Workshops • Workshop format v. Course format • Workshops provide a great deal of student-independence • Little Instructor Involvement • Implementation v. Design Course format • Implementation Courses focus on hands-on activities and a procedural • Design Courses are about decision making and are conceptual • 2784 Tuning & Optimizing Queries using SQL Server 2005 • 3 Days • 2790 Troubleshooting & Optimizing Database Servers Using SQL Server 2005 • 2 Days 51 SQL Server Design Courses • 2781A, Designing SQL Server 2005 Server-Side Solutions • 3 Day Course • 2782A, Designing SQL Server 2005 Databases • 2 Day Course • 2783B, Designing the Data Tier for SQL Server 2005 • 1 Day Clinic • 2786B Designing a Microsoft SQL Server 2005 Infrastructure • 2 Day Course • 2787A Designing Security for Microsoft SQL Server 2005 • 2 Day Course • 2788 Designing High Availability Database Solutions Using Microsoft SQL Server 2005 • 3 Day Course 52 SQL Server Business Intelligence Implementation Courses • 2791A Implementing and Maintaining Microsoft® SQL Server 2005 Analysis Services • 3 Days • 2792A Implementing and Maintaining Microsoft® SQL Server 2005 Integration Services • 3 Days • 2793A Implementing and Maintaining Microsoft® SQL Server 2005 Reporting Services • 3 Days 53 SQL Server Business Intelligence Design Courses • 2794A Designing a Business Intelligence Solution for the Enterprise Using Microsoft® SQL Server 2005 • 1 Day • 2795A Designing an ETL Solution Architecture Using Microsoft® SQL Server 2005 Integration Services • 2 Days • 2796A Designing an Analysis Solution Architecture Using Microsoft® SQL Server 2005 Analysis Services • 3 Days • 2797A Designing a Reporting Solution Architecture Using Microsoft SQL Server 2005 Reporting Services • 2 Days 54 New Microsoft Certification Program • First: Microsoft Certified Technology Specialist (MCTS) • Then, specialize: Microsoft Certified Information Technology Professional (MCITP) • Database Administration • Database Development • Business Intelligence Development (See the Microsoft Learning & Certification reference later in this presentation) 55 A Note (or two) on Virtualization • General Description of Virtualization • Reference Diagram (.vmc settings reference) • Virtually all (hehe) of all Microsoft Tech Courses Use Virtualization • Because you can “evaporate” all changes and go back to a baseline virtualization is extremely useful • Available free Virtualization Products • Virtual PC 2007 • Virtual Server 2005 R2 • VMWare Server • Virtualization Web References • Using Differencing Disks in Virtual PC • Setting up a 2-Node Windows Cluster Using Virtual Server 2005 R2 • Setting Up Clustering in SQL Server 2005 56 A Note (or two) on the next SQL Server version, Katmai • TechEd SQL Server 2008 Webcast (Last Link on the Page) • Policy-Based Management as opposed to Scripts-Based Management • Transparent Encryption • Separation of Date and Time data types • Greater Visual Studio Integration • LINQ (Lanuage-Integrated Query), Querying the Database in a Developer’s own language without the need to know SQL • “Store Any Type of Data” • Lots of Business Intelligence Enhancements 57 Action Items: • Upgrade to SQL Server 2005 • The Product Will Be 2 Years Old in November 2005 • Katmai Will Be Out (Supposedly) Next Year • Take Training Courses to Properly Equip You for the Job • Strongly Consider Implementation of one of the High Availability Features • Increase Knowledge of Encryption Technology • Increase Competency with Virtualization 58 Resources • Starting Point: George’s SQL Reference Homepage • George’s Computer & Database Library Books bookmarked on my Website • SQL Server Magazine • Detroit Area SQL Server Users Group (DASSUG) • Meets at Microsoft’s Southfield office monthly • West Michigan SQL Server User’s Group had its inaugural meeting in August 2005. Email me if you have interest. • Microsoft’s SQL Home Page • Microsoft TechNet • SQL Server TechNet Newsgroups • Microsoft Learning & Certification homepage 59 Thank You, Questions, & Wrap UP