1. Module 1
Introduction to SQL
Server® 2008 R2 and its
Toolset
2. Module Overview
• Introduction to the SQL Server Platform
• Working with SQL Server Tools
• Configuring SQL Server Services
3. Lesson 1: Introduction to the SQL Server Platform
• SQL Server Architecture
• SQL Server Components
• SQL Server Instances
• SQL Server Editions
• SQL Server Versions
4. SQL Server Architecture
• Complete set of enterprise-ready technologies and tools
More than a simple relational database management system
Manage organizational data
Derive value from information within the data
High performance
High availability
Secure
Scalable
• Low total cost of ownership
• Highly integrated platform
Productive management and development tooling
5. SQL Server Components
• Not just a database engine
• Relational and Business Intelligence Components
SQL Server Components
Database Engine Analysis Services
Integration Services Reporting Services
Master Data Services StreamInsight
Data Mining Full-Text Search
PowerPivot Replication
6. SQL Server Instances
• Many SQL Server components are instance-aware
Database Engine
Analysis Services / Data Mining
Reporting Services
• Instances allows for isolation of
Administration and Security Configuration
Performance, Service Level Agreements
Versions, Collations
• Can assist with upgrade scenarios
• Two instance types
Default instance
Named instances
7. SQL Server Editions
Premium Editions
Parallel Data Warehouse Datacenter
Core Editions
Enterprise Standard
Other Editions
Express Compact
Developer Workgroup
Web SQL Azure
9. Lesson 2: Working with SQL Server Tools
• Connecting from Clients and Applications
• Software Layers for Connections
• SQL Server Management Studio
• Demonstration 2A: SQL Server Management Studio
• Business Intelligence Development Studio
• Demonstration 2B: Business Intelligence Development
Studio
• Books Online
• Demonstration 2C: Books Online
10. Connecting from Clients and Applications
• Client applications and tools connect via protocols to end-points
Tabular Data Stream (TDS) protocol
SQL Native Access Client (SNAC)
Transported by TCP/IP, Named Pipes, or Shared Memory
• Users (or the applications) must be authenticated by SQL
Server
Windows logins
Windows groups
SQL Server logins
• Connection is made to a server and a database
Can be the name of the server or a named instance
11. Software Layers for Connections
CLIENT SERVER
Endpoints
OLE DB ODBC
Relational Engine
TDS
SQL OS
SNAC
Network Libraries Storage Engine
12. SQL Server Management Studio
• Integrated environment for working with SQL Server
Querying data
Configuring servers
Managing servers
Administering databases
• Graphical tools for working with many SQL Server
components
• Connect to Database Engine, Analysis Services, Reporting
Services, Integration Services, SQL Server Compact
• Project system with rich script editors
Scripts to automate common tasks and deployment
13. Demonstration 2A: SQL Server Management Studio
• In this demonstration you will see how to work with SQL
Server Management Studio
14. Business Intelligence Development Studio
• Integrated environment for developing BI objects
• Based on Visual Studio 2008 with project templates
Analysis Services project
Integration Services project
Reporting Services project
15. Demonstration 2B: Business Intelligence
Development Studio
• In this demonstration you will see how to work with SQL
Server Business Intelligence Development Studio
16. Books Online
• Primary reference for SQL Server
• Can be installed offline and online
• Constantly updated
• Most commands include examples
• Pages available for earlier versions
17. Demonstration 2C: Books Online
• In this demonstration you will see how to work with SQL
Server Business Books Online
18. Lesson 3: Configuring SQL Server Services
• SQL Server Configuration Manager
• SQL Server Services
• Network Ports and Listeners
• Creating Server Aliases
• Other SQL Server Tools
• Demonstration 3A: SQL Server Profiler
19. SQL Server Configuration Manager
• Manages services associated with SQL Server
• Manages network protocols and ports exposed by SQL
Server
• Manages network protocols and ports used by client
applications on the server when connecting to the same or
other servers
20. SQL Server Services
• Many SQL Server components provide operating system
services
• Instance-aware components provide a service per instance
• Services have identities within Windows
Avoid excessive privileges
• Services can be configured to auto-start
21. Network Ports and Listeners
• Each protocol has
configurable properties
• Server and client
configurations available
22. Creating Server Aliases
• Aliases can be used as an abstraction for a client
Server Name
Protocol
Port or network configuration
• Multiple aliases can point to the same server
23. Other SQL Server Tools
• SQL Server Profiler
• Database Engine Tuning Advisor
• Master Data Services Configuration Manager
• Reporting Services Configuration Manager
• SQL Server Error and Usage Reporting
• PowerShell Provider
• SQL Server Management Objects (SMO)
24. Demonstration 3A: SQL Server Profiler
• In this demonstration, you will see how SQL Server Profiler
can capture traces of statements executed
25. Lab 1: Introduction to SQL Server and its Toolset
• Exercise 1: Verify SQL Server Component Installation
• Exercise 2: Alter Service Accounts for New Instance
• Exercise 3: Enable Named Pipes Protocol for Both
Instances
• Exercise 4: Create Aliases for AdventureWorks and
Proseware
• Challenge Exercise 5: Ensure SQL Browser is Disabled and
Configure a Fixed TCP/IP Port (Only if time permits)
Estimated time:
30 minutes
Virtual machine 623XB-MIA-SQL1
User name AdventureWorksAdministrator
Password Pa$$w0rd
26. Lab Scenario
Adventureworks is a global manufacturer, wholesaler and
retailer of cycle products. The owners of the company have
decided to start a new direct marketing arm of the
company. It has been created as a new company named
Proseware, Inc. Even though it has been set up as a
separate company, it will receive some IT-related services
from the existing Adventureworks company and will be
provided with a subset of the corporate Adventureworks
data. The existing Adventureworks company SQL Server
platform has been moved to a new server that is capable of
supporting both the existing workload and the workload
from the new company. In this lab, we are ensuring that the
additional instance of SQL Server has been configured
appropriately and making a number of additional required
configuration changes.
27. Lab Review
• Why does the Reporting Services encryption key need to
be backed up?
• How can SQL Server be configured to use a different IP
port?
It is sometimes desirable to install more than a single instance of a SQL Server component on a single server.Stress that not all components of SQL Server are instance aware. A particular exception (at present) is Integration Services. Note however that it has been announced that in the next version of SQL Server, Integration Services will become instance aware.Multiple instances can be used when different administrative structures need to be in place for multiple databases or when performance of particular databases needs to be isolated.Named instances can also assist with upgrades as multiple versions of SQL Server can be installed side by side on a single server.Question: Why might you need to separate databases by service level agreement?Answer: Different database applications might need to meet different service level agreements, particularly in relation to recovery time objectives (RTO) and recovery point objectives (RPO).Mention that a single "default" instance can be installed and many "named" instances. (Current limit is 50 on most editions)ReferencesWorking with Multiple Versions and Instances of SQL Server: http://go.microsoft.com/fwlink/?LinkID=209237Considerations for Side-by-Side Instances of SQL Server 2008 R2 and SQL Server 2008: http://go.microsoft.com/fwlink/?LinkID=209238
SQL Server is available in a wide variety of editions. Briefly describe each edition:Parallel Data Warehouse: Uses massively parallel processing (MPP) to execute queries against vast amounts of data quicklyDatacenter: Highest levels of scalability for mission-critical applicationsEnterprise: Highest levels of reliability for demanding workloadsStandard: Reliable, complete data management and Business Intelligence (BI) platformExpress: Free edition for lightweight web and small server based applicationsCompact: Free edition for standalone and occasionally connected mobile applicationsDeveloper: Build, test, and demonstrate all SQL Server functionalityWorkgroup: Run branch applications with secure remote synchronization and management capabilitiesWeb: Secure, cost effective, and scalable platform for public web sites and applicationsSQL Azure: Build and extend SQL Server applications to a cloud based platformQuestion: What would be a good business case example for using a cloud-based service?Answer: Startup companies. (Purchase too many servers and go broke. Purchase too little and go broke).ReferencesMicrosoft SQL Server 2008 R2 Editions: http://go.microsoft.com/fwlink/?LinkID=209239
Students will often ask how long SQL Server has been available. Stress that SQL Server is a platform with a rich history of innovation achieved while maintaining strong levels of stability.Versions 1.0 and 1.1 were OS/2 based, later versions were based on Windows NT and its successors such as Windows Server 2000, Windows Server 2003, Windows Server 2008 and Windows Server 2008 R2.Mention that even though SQL Server has been available for many years, it is rapidly evolving new capabilities and features.Question: Which versions of SQL Server have you worked with?Answer: Answers will vary by student.
Discuss that client applications use a software layer (typically SNAC) to communicate with SQL Server using the TDS protocol. The TDS protocol is carried over either the TCP/IP or Named Pipes protocols for local and remote users or over a Shared Memory protocol (only for users on the same system as the server instance being connected to). There are default configurations for these layers of software when SQL Server is first installed but we will look at how to change these configurations in the next lesson.Briefly mention that there are two ways that users can be authenticated. SQL Server can use their Windows credentials (either individual or as a member of a group) or the user can supply a username and password that is stored in SQL Server. (This is called a SQL Server login).As well as specifying the server to connect to, users typically specify the database that they initially wish to connect to. A default database can be specified for each login though.Mention that Via is also a currently supported protocol but has been deprecated.ReferencesConnecting to the SQL Server Database Engine: http://go.microsoft.com/fwlink/?LinkID=209240
For this slide, walk through the layers of code involved.In a client application, a library such as OLEDB (acronym not longer meaningful) or Open Database Connectivity (ODBC) will be used to start data access.The SQL Native Access Layer (SNAC) translates queries into the Tabular Data Stream (TDS) protocol layered above a network library. (Several network libraries are supported).At the server, an endpoint is exposed for connections and is used to pass commands and data to/from the database engine.The database engine has three core parts: the relational engine that executes queries, the storage engine that deals with how the data is stored, and the SQL OS (operating system) that abstracts much of the underlying hardware and operating system.
Describe how SQL Server Management Studio is based on the Visual Studio 2008 shell. If students are familiar with that version of Visual Studio, much of the interaction within SSMS will already be familiar. If they are not, it is an easy to work with tool that is easy to learn.Stress that SSMS can connect to various SQL Server components, not just the database engine.Some students will prefer graphical admin tools; some will prefer script windows. Mention that SSMS supports both methods of interaction and that when working with scripts, the editors provide a great deal of assistance to the user with options such as online Intellisense.ReferencesFeatures and Tools Overview: http://go.microsoft.com/fwlink/?LinkID=209241
Do not dwell on BIDS at this point, however stress that the full power of Visual Studio is available for creating BI projects and that BIDS has been created by adding project templates to Visual Studio.Mention that Visual Studio does not need to be installed before SQL Server. If an existing installation of VS is present, SQL Server installation will add project templates to it. If no existing VS installation is present, SQL Server installation will first install the "partner" edition of VS (which is basically just the almost empty shell of VS) and then add the required project templates.Note that SQL Server 2008 R2 uses VS 2008 not VS 2010. If VS 2010 is already installed rather than VS 2008, then the partner edition of VS 2008 will be installed side-by-side with VS 2010.ReferencesFeatures and Tools Overview: http://go.microsoft.com/fwlink/?LinkID=209241
Books Online should be regarded as the primary technical reference for SQL Server.Note that for versions up to SQL Server 2008 R2, it can be installed both online and offline. Stress that if it is installed offline, it needs to be updated regularly as it is constantly updated. A common mistake is to install it with the product and then never update it. Updates do not occur when service packs or cumulative updates are applied.Mention that for most T-SQL commands, the examples will often be more useful than the syntax. When you look at the reference page for a statement, however, the syntax is shown at the top and the examples are usually at the bottom.Stress that it is important to refer to the page for the appropriate version of SQL Server. At the top of most pages, it will show the version that it applies to and provide a link to any other versions of the page that are available.ReferencesSQL Server Books Online: http://go.microsoft.com/fwlink/?LinkID=209242Downloading and Updating Books Online: http://go.microsoft.com/fwlink/?LinkID=209840
SQL Server configuration manager has three key rolesmanaging services – this includes identity and manual or auto startmanaging the server's protocols – this relates to the protocols and ports exposed by the instance of SQL Server (stress that by default, no external ports are exposed and only shared memory is configured)managing the client protocols – this is an area that might confuse students. This area is used for configuring how the server connects when it acts as a client. That can mean when connecting to its own server or when connecting to other server instances.Show how both 32-bit and 64-bit options are available for both the network and client configurations.Question: Why would a server system need to have a client configuration node?Answer: Because client applications (including tools and utilities) need to connect to the server and to other servers.Stress that the client configuration only defines the client configuration on that machine and not the clients connecting to it. Many students will be confused by that.ReferencesSQL Server Configuration Manager: http://go.microsoft.com/fwlink/?LinkID=209243
SQL Server Configuration Manager has configurations for the protocols that are exposed by the server and those that are used for making connections.Stress that both 32-bit and 64-bit configurations are available on 64-bit systems and both typically need to be configured.For TCP/IP, each IP address is separately configurable.ReferencesSQL Server Configuration Manager: http://go.microsoft.com/fwlink/?LinkID=209243
Describe how aliases can be used to provide an easy form of connection for clients.In the example shown on the slide, the alias "Marketing" has been set up for the local server ".", named pipes protocol "np“, and named pipe address "\\\\.\\pipe\\MSSQL$PARTNER\\sql\\query". All the client then needs to know is the name of the alias.Note again that both 32-bit and 64-bit configurations for aliases exist. An alias is basically a registry entry and can be pushed out to client systems (like other registry entries) via group policy in Windows.Note that you can use SqlServerAlias class in root\\Microsoft\\SqlServer\\ComputerManagement and PowerShell to manage aliases. ReferencesSQL Server Configuration Manager: http://go.microsoft.com/fwlink/?LinkID=209243
Briefly describe the purpose of each of these tools.Do not dwell on any of them for too long at this point.Mention that Reporting Services Configuration Manager will be used in the lab and that SQL Server Profiler will be shown in the next demonstration.