Change Management for SQL Server

1,362 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,362
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Change Management for SQL Server

  1. 1. SQL Server 2005 Express Jeremy Kadlec Edgewood Solutions www.edgewoodsolutions.com [email_address] 410.591.4683
  2. 2. Agenda <ul><li>Introductions </li></ul><ul><li>Session Goals </li></ul><ul><li>Installation Path and Licensing </li></ul><ul><li>Management Studio Primer </li></ul><ul><li>Development </li></ul><ul><li>Administration </li></ul><ul><li>Additional Resources </li></ul><ul><li>Q & A </li></ul>
  3. 3. Jeremy Kadlec <ul><li>Edgewood Solutions (www.edgewoodsolutions.com) </li></ul><ul><ul><li>Customer focused SQL Server solutions </li></ul></ul><ul><ul><li>Planning, Audits, Integration, Training, Products </li></ul></ul><ul><li>Performance Tuning, Administration, Development, Upgrades, High Availability, Disaster Recovery, Database Auditing </li></ul><ul><li>Principal Database Engineer </li></ul><ul><ul><li>[email_address] </li></ul></ul><ul><ul><li>410.591.4683 </li></ul></ul><ul><li>Author of numerous SQL Server resources </li></ul><ul><ul><li>www.edgewoodsolutions.com/resources/articles.asp </li></ul></ul><ul><ul><li>SearchSQLServer.com – Ask the Experts </li></ul></ul><ul><ul><li>The Rational Guide to IT Project Management </li></ul></ul><ul><li>NOVA SQL Co-Leader – www.novasql.com </li></ul><ul><li>SQL Server 2005 Adoption Rate Report </li></ul><ul><ul><li>www.edgewoodsolutions.com/EdgewoodLabs/ </li></ul></ul>
  4. 4. Session Goals <ul><li>Answer the following questions: </li></ul><ul><ul><li>What is SQL Server 2005 Express and how is it any different than the other versions of SQL 2005? </li></ul></ul><ul><ul><li>Where do I get my copy? </li></ul></ul><ul><ul><li>What is the general installation process? </li></ul></ul><ul><ul><li>How do I create a database, then the tables and code to support my application? </li></ul></ul><ul><ul><li>What are some of the basic administration tasks that I should be aware of? </li></ul></ul><ul><ul><li>Where can I find more information on SQL Server 2005 Express edition? </li></ul></ul>
  5. 5. SS2K5 Express Introduction <ul><li>Scaled down and easy to use version of SQL 2005 </li></ul><ul><ul><li>CPU’s = 1 </li></ul></ul><ul><ul><li>Memory = 1 GB </li></ul></ul><ul><ul><li>Database size = 4 GB </li></ul></ul><ul><ul><li>Users = unlimited </li></ul></ul><ul><ul><li>Cost = FREE </li></ul></ul><ul><li>Replacement to SQL Server 2000 MSDE </li></ul><ul><li>Redistributed version of SQL Server for client applications </li></ul><ul><li>Intended for ISVs, ISPs, ASPs, web developers and hobbyists </li></ul><ul><li>Environments = Production, test and development </li></ul>
  6. 6. Express Edition Licensing <ul><li>Register for SQL Server Express Edition Redistribution Rights </li></ul><ul><ul><li>http://www.microsoft.com/sql/editions/ express/redistregister.mspx </li></ul></ul>
  7. 7. SS2K5 Express Installation <ul><li>Prerequisites and installation order </li></ul><ul><li>Download locations </li></ul><ul><li>Verifying installation </li></ul><ul><li>Post installation tasks </li></ul>
  8. 8. Prerequisites <ul><li>Windows Installer 3.1 (~2.5 MB) </li></ul><ul><ul><li>http://www.microsoft.com/downloads/details.aspx?FamilyID=889482fc-5f56-4a38-b838-de776fd4138c&displaylang=en </li></ul></ul><ul><li>.NET Framework 2.0 (~ 22 MB) </li></ul><ul><ul><li>http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en </li></ul></ul><ul><li>Microsoft Core XML Services (MSXML) 6.0 (~3.5 MB) </li></ul><ul><ul><li>http://www.microsoft.com/downloads/details.aspx?familyid=993c0bcf-3bcf-4009-be21-27e85e1857b1&displaylang=en </li></ul></ul>
  9. 9. Express Edition Downloads <ul><li>Microsoft SQL Server 2005 Express Edition (~55 MB) </li></ul><ul><ul><li>http://www.microsoft.com/downloads/details.aspx?familyid=220549b5-0b07-4448-8848-dcc397514b41&displaylang=en </li></ul></ul><ul><li>Microsoft SQL Server Management Studio Express - Community Technology Preview (CTP) November 2005 (~30 MB) </li></ul><ul><ul><li>http://www.microsoft.com/downloads/details.aspx?familyid=82afbd59-57a4-455e-a2d6-1d4c98d40f6e&displaylang=en </li></ul></ul>
  10. 10. Verify Installation <ul><li>Default Installation Directory </li></ul><ul><ul><li>C:Program FilesMicrosoft SQL ServerSQLExpress </li></ul></ul><ul><ul><li>~140 MB </li></ul></ul><ul><li>Windows Service </li></ul><ul><ul><li>SQL Server (SQLExpress) </li></ul></ul><ul><ul><li>SQL Server Browser </li></ul></ul><ul><li>Windows Event Log </li></ul>
  11. 11. Post Installation Task 1 <ul><li>Configuration Manager </li></ul><ul><ul><li>Services </li></ul></ul><ul><ul><li>Network Protocols </li></ul></ul><ul><ul><li>Client Protocols </li></ul></ul><ul><ul><li>Aliases </li></ul></ul><ul><ul><ul><li>Great for server consolidation projects without changing front end application connection strings </li></ul></ul></ul>
  12. 12. Post Installation Task 2 <ul><li>Surface Area Configuration </li></ul><ul><ul><li>Services and Connections </li></ul></ul><ul><ul><ul><li>Service management </li></ul></ul></ul><ul><ul><ul><li>Remote Connections </li></ul></ul></ul><ul><ul><li>Features </li></ul></ul><ul><ul><ul><li>CLR Integration </li></ul></ul></ul><ul><ul><ul><li>xp_cmdshell </li></ul></ul></ul>
  13. 13. SQL Server 2005 Express Tour <ul><li>Primary interface to SS2K5 Express </li></ul><ul><ul><li>Object Explorer </li></ul></ul><ul><ul><li>Template Explorer </li></ul></ul><ul><ul><li>Summary Window </li></ul></ul><ul><ul><li>View Toolbars </li></ul></ul><ul><li>Combination of Enterprise Manager and QA in SQL 2000 </li></ul><ul><li>Similar functionality as the Management Studio for other SQL 2005 versions </li></ul>
  14. 14. Database Creation <ul><li>Right click on the ‘Database’ folder, select ‘New Database’ and complete ‘New Database’ Wizard </li></ul><ul><li>CREATE DATABASE T-SQL statement </li></ul>
  15. 15. Table Creation <ul><li>Table creation interface with Column and Table Properties </li></ul><ul><ul><li>Table Designer toolbar </li></ul></ul><ul><ul><li>Save Change Script </li></ul></ul><ul><li>Template Explorer – CREATE TABLE T-SQL template </li></ul>
  16. 16. Database Design <ul><li>Create and drop tables, indexes, primary keys, etc. in the diagram or database </li></ul><ul><ul><li>NOTE – Making actual coding changes, not mock up </li></ul></ul><ul><li>Database Design Toolbar </li></ul>
  17. 17. Views <ul><li>View = virtual table to query based on an underlying SELECT statement </li></ul><ul><li>View Designer Toolbar </li></ul><ul><li>View Template Explorer </li></ul>
  18. 18. Synonyms <ul><li>Synonym = reference to a virtual object that can be on another server or schema </li></ul><ul><li>SQL Server imposes late binding so test based on name appropriately </li></ul><ul><li>CREATE SYNONYM T-SQL statement </li></ul>
  19. 19. Programming <ul><li>T-SQL and CLR support </li></ul><ul><ul><li>CLR off by default = Enable CLR via Surface Area Configuration </li></ul></ul><ul><li>Objects – Stored Procedures, Functions, Triggers (DML and DDL) </li></ul><ul><ul><li>Foundation for SQL Server development </li></ul></ul>
  20. 20. T-SQL Enhancements <ul><li>Error Handling </li></ul><ul><ul><li>TRY and CATCH paradigm from procedural languages such as VB </li></ul></ul><ul><li>BEGIN TRY </li></ul><ul><li>T-SQL Code… </li></ul><ul><li>END TRY </li></ul><ul><li>BEGIN CATCH </li></ul><ul><li>T-SQL Code… </li></ul><ul><li>ERROR_NUMBER() </li></ul><ul><li>ERROR_SEVERITY() </li></ul><ul><li>ERROR_STATE() </li></ul><ul><li>ERROR_PROCEDURE() </li></ul><ul><li>ERROR_LINE() </li></ul><ul><li>ERROR_MESSAGE() </li></ul><ul><li>END CATCH </li></ul>
  21. 21. T-SQL or CLR <ul><li>T-SQL </li></ul><ul><ul><li>Data driven logic </li></ul></ul><ul><li>CLR </li></ul><ul><ul><li>Extend the capabilities of the native DBMS </li></ul></ul><ul><ul><li>VB.NET, ASP.NET, C#, etc. </li></ul></ul><ul><li>Word to the wise… </li></ul><ul><ul><li>Keep it simple </li></ul></ul><ul><ul><li>Standardize development practices at organization </li></ul></ul><ul><ul><li>Always consider performance implications </li></ul></ul>
  22. 22. XML <ul><li>XML Usage </li></ul><ul><ul><li>Data exchanges - B2B </li></ul></ul><ul><ul><li>Non traditional data - Visio diagrams </li></ul></ul><ul><li>XML not replace traditional database design </li></ul><ul><ul><li>XML = DDL </li></ul></ul><ul><ul><li>XQuery = T-SQL </li></ul></ul><ul><li>SELECT’s FOR XML option </li></ul><ul><ul><li>Auto, Raw, Explicit </li></ul></ul><ul><li>Native XML data type </li></ul><ul><ul><li>Columns (2 GB), variables, parameters </li></ul></ul><ul><li>XML Schema </li></ul><ul><ul><li>Schema Collections </li></ul></ul><ul><li>XML Indexes </li></ul><ul><ul><li>Primary – 1 row per node (element, attribute, text) to improve speed to the node </li></ul></ul><ul><ul><li>Secondary – Path, Value, Property </li></ul></ul><ul><li>Compliments SQLXML </li></ul><ul><ul><li>UpdateGrams - Insert, update, or delete relational data </li></ul></ul><ul><ul><li>DiffGrams - Modify relational data </li></ul></ul>
  23. 23. Security <ul><li>Login and user paradigm </li></ul><ul><li>Server, database and application roles </li></ul><ul><ul><li>Fixed and user defined </li></ul></ul><ul><li>Schema – Container for object ownership </li></ul><ul><li>Asymmetric Keys </li></ul><ul><li>Symmetric Keys </li></ul><ul><li>Certificates </li></ul>
  24. 24. Administration 101 <ul><li>Database Backups and Restores </li></ul><ul><li>SQL Server Error Logs </li></ul><ul><ul><li>Issue reviewing logs - C:Program Files Microsoft SQL ServerSQLExpress MSSQL.1 MSSQLLOG </li></ul></ul><ul><li>Activity Monitor </li></ul><ul><ul><li>Snapshot of SQL Server transactions </li></ul></ul>
  25. 25. Performance Tuning <ul><li>Dynamic Management Views (DMV) operate in near real time from internal structures at a Server and Component level </li></ul><ul><ul><li>dm_exec_* = Execution of user code and associated connections </li></ul></ul><ul><ul><li>dm_os_* = Memory, locking and scheduling </li></ul></ul><ul><ul><li>dm_tran_* = Transactions and isolation </li></ul></ul><ul><ul><li>dm_io_* = I/O on network and disks </li></ul></ul><ul><ul><li>dm_db_* = Databases and database objects </li></ul></ul><ul><ul><li>dm_repl_* = Replication </li></ul></ul><ul><ul><li>dm_broker_* = SQL Service Broker </li></ul></ul><ul><ul><li>dm_fts_* = Full Text Search </li></ul></ul><ul><ul><li>dm_qn_* = Query Notifications </li></ul></ul><ul><ul><li>dm_clr_* = Common Language Runtime </li></ul></ul>
  26. 26. How DMVs Improve Management <ul><li>Index-related DMVs </li></ul><ul><ul><li>sys.dm_db_index_physical_stats </li></ul></ul><ul><ul><ul><li>Size and fragmentation information for tables and indexes </li></ul></ul></ul><ul><ul><li>sys.dm_db_index_operational_stats </li></ul></ul><ul><ul><ul><li>Internals information for table and index activities </li></ul></ul></ul><ul><ul><li>sys.dm_db_index_usage_stats </li></ul></ul><ul><ul><ul><li>Index statistics and usage counts information for individual indexes </li></ul></ul></ul><ul><ul><li>sys.dm_db_index_partition_stats </li></ul></ul><ul><ul><ul><li>Page and row-count information for every partition </li></ul></ul></ul>
  27. 27. Alternative Dev Environment <ul><li>SQLCMD </li></ul><ul><ul><li>Command line interface for any version of SQL Server 2005 </li></ul></ul><ul><ul><li>Ability to perform any development or administrative function </li></ul></ul><ul><ul><li>Dedicated Administrator Connection (DAC) </li></ul></ul><ul><ul><li>Default location = C:Program FilesMicrosoft SQL Server90Toolsinn </li></ul></ul><ul><ul><li>More information - SQLCMD /? </li></ul></ul>
  28. 28. Patching Express <ul><li>SQL Slammer was able to cause havoc, propagating a DOS and needed patching </li></ul><ul><ul><li>Patch SQL Servers </li></ul></ul><ul><ul><li>Use a non-default port and other settings </li></ul></ul><ul><li>Expectation is patching will be equal to SQL Server Service Packs or Windows Updates </li></ul><ul><li>Stay tuned… </li></ul>
  29. 29. SS2K5 Express Web Resources <ul><li>Microsoft SQL Server 2005 Express Web Site </li></ul><ul><ul><li>http://www.microsoft.com/sql/editions/express/ default.mspx </li></ul></ul><ul><li>MSDN Web Site – SQL Server 2005 Express </li></ul><ul><ul><li>http://msdn.microsoft.com/sql/express/ </li></ul></ul><ul><li>SQL Server 2005 Express BLOG </li></ul><ul><ul><li>http://blogs.msdn.com/sqlexpress/ </li></ul></ul><ul><li>SQL Server 2005 Books Online </li></ul><ul><ul><li>http://www.microsoft.com/technet/prodtechnol/sql/ 2005/downloads/books.mspx </li></ul></ul>
  30. 30. SS2K5 Express Books <ul><li>SQL Server 2005 Express Beta Preview </li></ul><ul><ul><li>http://www.MannPublishing.com/ </li></ul></ul><ul><li>Wrox's SQL Server 2005 Express Edition Starter Kit </li></ul><ul><li>Microsoft (r) SQL Server (tm) 2005 Express Edition: Step by Step </li></ul><ul><li>Sams Teach Yourself SQL Server 2005 Express in 24 Hours </li></ul><ul><li>Microsoft SQL Server 2005 Express For Dummies® </li></ul>
  31. 31. Questions and Thank You Jeremy Kadlec Edgewood Solutions www.edgewoodsolutions.com [email_address] 410.591.4683

×