You are on page 1of 181

O F F I C I A L

M I C R O S O F T

L E A R N I N G

P R O D U C T

6231A
Maintaining a Microsoft SQL Server 2008 Database Companion Content

Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. The names of manufacturers, products, or URLs are provided for informational purposes only and Microsoft makes no representations and warranties, either expressed, implied, or statutory, regarding these manufacturers or the use of the products with any Microsoft technologies. The inclusion of a manufacturer or product does not imply endorsement of Microsoft of the manufacturer or product. Links may be provided to third party sites. Such sites are not under the control of Microsoft and Microsoft is not responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites. Microsoft is not responsible for webcasting or any other form of transmission received from any linked site. Microsoft is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement of Microsoft of the site or the products contained therein. 2008 Microsoft Corporation. All rights reserved. Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies. All other marks are property of their respective owners.

Product Number: 6231A Released: 11/2008

Installing and Configuring SQL Server 2008

1-1

Module 1
Installing and Configuring SQL Server 2008
Contents:
Lesson 1: Preparing to Install SQL Server 2008 Lesson 2: Installing SQL Server 2008 Lesson 3: Configuring a SQL Server 2008 Installation Module Reviews and Takeaways Lab Review Questions and Answers 2 6 8 12 14

1-2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Preparing to Install SQL Server 2008


Contents:
Question and Answers Detailed Demo Steps 3 5

Installing and Configuring SQL Server 2008

1-3

Question and Answers


What are the Editions of SQL Server 2008?
Question: Which editions of SQL Server would you most likely deploy in your organization? Question: Why would you choose those editions? Answer: Enterprise edition would satisfy the needs of large corporate SQL deployments. Other editions would be appropriate in difference scenarios.

What are the Hardware requirements?


Question: What hardware platform would you design for an enterprise-class SQL Server? Answer: A fast, multi-core CPU, with lots of RAM (at least 2 Gigs, 8 Gigs or more for an enterprise server), and a redundant disk array. Question: Which components do you think would be most critical for performance? Answer: Amount of RAM, number of CPUs, and highly optimized disk storage arrays (in that order) are the most critical items for performance.

Exploring the Instances of SQL Server


Question: How would you deploy multiple instances in your organization? Answer: You could configure different departments to have an instance of SQL Server over which they have independent control. Question: What benefits would that offer? Answer: It could avoid the unnecessary expense and administrative overhead of deploying multiple physical servers.

Comparing Licensing of SQL Server 2008


Question: Which licensing model would work best for your organization? Answer: Server plus device CAL licensing is best for customers who have relatively low CAL-to-server ratios. The user CAL model will be most cost effective if there are multiple devices per user. The Processor license licensing model is most appropriate for applications that are accessible through the Internet and for internal applications with a high client-to-server ratio. Question: Why would you choose that licensing model? Answer: The chosen licensing models should offer the lowest cost and most efficient deployment options.

1-4

Maintaining a Microsoft SQL Server 2008 Database

Examining the Collation Considerations


Question: Would you deploy any collations besides Western European Latin1? Answer: Multinational organizations would benefit from multiple or non-Western collation.

Examining the Upgrade Considerations


Question: What upgrade plan would work best for your organization? Answer: In-Place upgrade may be easier and less expensive. Side-by-side upgrade offers more control over upgrade process and can reduce downtime. Question: Why would you choose that upgrade plan? Answer: Choose in-place if financial concerns are higher. Choose side-by-side if downtime concerns are significant and IT staffing can support a more detailed upgrade process. Question: Would you use a side-by-side deployment? Answer: Side-by-side upgrade offers more granular control over the upgrade process, it can be used to perform test migration, it offers a relatively straightforward rollback strategy, and it can leverage failover/switchover to reduce downtime.

Verifying Pre-Installation Information


Question: What are some of the things that the System Configuration Checker will check for and warn or block installation if it is not correct? Answer: The WMI service must be available. The SCC warns, but will not block Setup if the minimum or recommended RAM check is not met. The SCC will warn the user but will not block Setup if the minimum or recommended processor speed check is not met. SQL Server Setup cannot run if files required by Setup are locked by other services, processes, or applications.

Installing and Configuring SQL Server 2008

1-5

Detailed Demo Steps


Demonstration: Verifying Pre-Installation Information
View the hardware and software requirements
Click Start, then click My Computer and double-click the E: drive. Navigate to the E:\Evaluation\ folder. If the SQL Server 2008 setup Start page is not displayed automatically, double-click E:\Evaluation\setup.exe. Click Review hardware and software requirements. Review and discuss the requirements document that is displayed in Internet Explorer. Close Internet Explorer and click Exit to close the SQL Server setup Start page.

Use the Upgrade Advisor


Click Start | All Programs | Microsoft SQL Server 2008 | SQL Server Upgrade Advisor. The Microsoft SQL Server Upgrade Advisor opens. Click Launch Upgrade Advisor Analysis Wizard. On the Microsoft SQL Server 2008 Upgrade Advisor Analysis Wizard click Next. On the SQL Server Components page, select SQL Server, Analysis Services, Reporting Services, Data Transformation Services, Integration Services.

Use the System Configuration Checker


Navigate to the D:\Srvers\ folder, and launch setup.exe. On the License Terms page, accept the licensing agreement, and then click Next. On the Installation Prerequisites page, click Install. The Task page opens. On the SQL Server 2008 Installation Center page, click the New Installation link. The Install SQL Server 2008 wizard appears. Click Show details. Point out the various rules that were checked and that the server VM passed all checks.

1-6

Maintaining a Microsoft SQL Server 2008 Database

Lesson 2

Installing SQL Server 2008


Contents:
Question and Answers 7

Installing and Configuring SQL Server 2008

1-7

Question and Answers


What are the Options for Installing Components?
Question: Which components would you leave off in an enterprise deployment in your organization? Answer: The Analysis, Reporting, and Management tools may be left off some enterprise SQL Server deployments if they are not being used.

1-8

Maintaining a Microsoft SQL Server 2008 Database

Lesson 3

Configuring a SQL Server 2008 Installation


Contents:
Question and Answers Detailed Demo Steps 9 10

Installing and Configuring SQL Server 2008

1-9

Question and Answers


Using SQL Server Configuration Manager
Question: Are you aware of any other tools that can be used by the administrator to manage SQL Server? Answer: The command prompt tool, sqlcmd.exe, and PowerShell can both be used to manage SQL Server.

Using PowerShell with SQL Server 2008


Question: In what ways do you think you might use the Encode-SqlName and Decode-SqlName cmdlets? Answer: Some of the characters used in bracketed or quoted identifiers cannot be escaped using the PowerShell ` escape character, and can cause problems when using the SQL Server PowerShell provider. The Encode-SqlName cmdlet takes as input a SQL Server identifier, and reformats all characters not supported by the PowerShell language with a representation that will work in PowerShell. The Decode-SqlName cmdlet takes as input an encoded SQL Server identifier and returns the original identifier.

1-10

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Using SQL Server Configuration Manager
Configure Server Startup Options
On the Start menu, point to All Programs, point to Microsoft SQL Server 2008, point to Configuration Tools, and then click SQL Server Configuration Manager. In SQL Server Configuration Manager, in the navigation pane, click SQL Server Services. In the details pane, right-click SQL Server (MSSQLSERVER), and then click Properties. The SQL Server (MSSQLSERVER) Properties dialog box appears. Click the Advanced tab. Click the Startup Parameters list to display the startup parameters. Discuss the current startup parameters and explain some addition options for startup parameters. Click Cancel.

Pause and Resume an Instance of SQL Server


In the details pane, right-click SQL Server (MSSQLSERVER), and then click Pause. A pair of vertical blue bars on the icon next to the server name and on the toolbar indicates that the server has been paused. To resume the server, right-click SQL Server (MSSQLSERVER), and then click Resume. A green arrow on the icon next to the server name and on the toolbar indicates that the server started successfully.

Set an Instance of SQL Server to Start Automatically


In SQL Server Configuration Manager, expand Services, and then click SQL Server. In the details pane, right-click the name of the instance you want to start automatically, and then click Properties. In the SQL Server (MSSQLSERVER) Properties dialog box, set Start Mode to Automatic. Click OK, and then close SQL Server Configuration Manager.

Demonstration: Using PowerShell with SQL Server 2008


Use the sqlps utility
Click Start | Run. The Run dialog box appears. Type sqlps and then click OK. The Microsoft SQL Server PowerShell window opens. The sqlps utility starts the PowerShell environment (PowerShell.exe) with the SQL Server PowerShell snap-ins loaded and registered.

Use the Invoke-Sqlcmd cmdlet


Type get-help Invoke-Sqlcmd -Full and then press ENTER. Type Invoke-Sqlcmd -Query "SELECT GETDATE() AS TimeOfQuery;" -ServerInstance "MyComputer\MyInstance" and then press ENTER.

Installing and Configuring SQL Server 2008

1-11

Type Invoke-Sqlcmd -QueryFromFile "C:\MyFolder\TestSQLCmd.sql" | Out-File -filePath "C:\MyFolder\TestSQLCmd.rpt" and then press ENTER.

Use the SQL Server cmdlets


Encode-SqlName Decode-SqlName Convert-UrnToPath

1-12

Maintaining a Microsoft SQL Server 2008 Database

Module Reviews and Takeaways


Review questions
1. SQL Server Developer Edition is licensed for development work only, but is functionally identical to which edition of SQL Server? The Developer Edition contains the same functionality as Enterprise Edition, but is restricted, by the license, to testing and development only. Windows Essential Business Server Premium Edition comes with a license for which edition of SQL Server? Windows Essential Business Server Premium Edition comes with a license for SQL Server 2008 Standard Edition. What is the minimum amount of RAM recommended by Microsoft for the Standard, Enterprise, and Developer editions of SQL Server? Microsoft recommends that you have at least 1 gigabyte (GB) of memory. What are the three primary methods for licensing SQL Server in an enterprise? Processor license, Server plus device CALs, Server plus user CALs. In-place upgrades to SQL Server 2008 are available from which earlier version(s) of SQL Server? SQL Server 2000 Service Pack 3 (SP3) or later, SQL Server 2005 SP1 or later. Side-by-side operation of SQL Server 2008 is available with which earlier version(s) of SQL Server? SQL Server 2005. Which software tool assists with in-place migrations to SQL Server 2008, by checking the current SQL configuration? Microsoft SQL Server 2008 Upgrade Advisor analyzes installed SQL Server 2000 or SQL Server 2005 components, and then generates a report that identifies issues that you should address before or after upgrading to SQL Server 2008. What are some of the primarily uses of the SQL Server Management Studio? Management of servers, relational databases, Analysis Services databases, Reporting Services, SQL Server Integration Services, SQL Mobile databases, and Project-based script management. What are the four SQL-specific PowerShell cmdlets and their functions? Decode-SqlName: Takes an encoded SQL Server identifier and returns the original identifier, Encode-SqlName: Takes a SQL Server identifier, and reformats all characters not supported by PowerShell with a representation that will work in PowerShell, Invoke-Sqlcmd: Runs scripts that contain statements from Transact-SQL and XQuery and commands supported by the sqlcmd utility, and Convert-UrnToPath: Converts SMO URN strings to PowerShell paths.

2.

3.

4. 5. 6. 7.

8.

9.

Real-world Issues and Scenarios


1. An organization has one SQL server, running on a server with two processors and supporting 100 users. What Licensing option would be most cost effective for this organization?

Common Issues related to SQL Server performance


Identify the causes for the following common issues related to SQL Server performance and fill in the troubleshooting tips. For answers, refer to relevant lessons in the module.

Installing and Configuring SQL Server 2008

1-13

Issue Performance of SQL Server is slower than expected.

Troubleshooting tip Increase the RAM and number of drives.

Best Practices related to installing SQL Server 2008.


Whenever possible, do not install SQL Server on a domain controller. Place computers that host a database in a physically protected location, ideally a locked computer room with monitored flood detection and fire detection or suppression systems. Divide the network into security zones separated by firewalls. Block all traffic, and then selectively admit only what is required.

1-14

Maintaining a Microsoft SQL Server 2008 Database

Lab Review Questions and Answers


Question: Which software tool assists installing SQL Server 2008, by checking the current server software and applications? Answer: The System Configuration Checker checks for conditions that prevent a successful SQL Server installation and will verify the computer where the installation is running. Question: What are the basic applications and services required for a new SQL Server 2008 installation? Answer: Windows Installer 3.1 (WindowsInstaller-KB893803-v2-x86.exe), .NET Framework 3.5 (dotnetfx35.exe), SQL Server Native Client (sqlncli.msi), Windows Management Instrumentation service, and Windows PowerShell. Question: What are the primarily uses of the SQL Server Configuration Manager? Answer: Managing SQL Server Services, Changing the Accounts Used by the Services, Manage Server and Client Network Protocols, Configure Server Startup Options, and Manage Instances of SQL Server. Question: In general, what would you consider to be the most important feature to install? Answer: The Database Engine Services.

Managing Databases and Files

2-1

Module 2
Managing Databases and Files
Contents:
Lesson 1: Planning Databases Lesson 2: Creating Database Lesson 3 Using Policy-Based Management Module Reviews and Takeaways Lab Review Questions and Answers 2 5 8 11 12

2-2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Planning Databases
Contents:
Question and Answers Detailed Demo Steps 3 4

Managing Databases and Files

2-3

Question and Answers


What are the Types of Files?
Question: In what scenarios would secondary files be useful? Answer: If a database exceeds the maximum size for a single Windows file, you can use secondary data files so the database can continue to grow.

How the Transaction Log Works


Question: Have you faced any recovery scenarios in the past where transaction logs were successfully used for file recovery?

Considerations for File Placement


Question: How would you plan drives and file placement for your organization? Answer: Place the tempdb database on a fast disk drive subsystem. Create the transaction log on a physically separate disk or RAID array. If you have a set of tables that is used together frequently, you should consider putting these tables on separate filegroups on separate physical drives.

What are Partitions?


Question: Would data partitioning be helpful to your organization's SQL deployment? Answer: Partitioning allows you to organize your organizations database tables on specific data usage patterns using predefined data ranges.

Considerations for Capacity Planning


Question: When would you set databases to expand automatically? When you preset a maximum size for the database and restrict filegrowth? Answer: You might set a database to expand automatically if you have a large disk array or NAS device. You might preset a maximum size for a database and restrict filegrowth when you have a limited amount of disk storage.

Using Files and Filegroups


Question: How would deploying filegroups be useful to your organization? Answer: Using files and filegroups improves database performance, because it lets a database be created across multiple disks, multiple disk controllers, or RAID systems. Additionally, files and filegroups enable data placement, because a table can be created in a specific filegroup. This improves performance, because all I/O for a specific table can be directed at a specific disk.

2-4

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Using Files and Filegroups
Add a Filegroup to a Database
Click Start, and then click SQL Server Management Studio. The Connect to Server dialog box appears. Click Connect. In the Object Explorer pane, expand Databases, and then click AdventureWorks2008. Right-click AdventureWorks2008, and then click Properties. The Database Properties dialog box appears. In the Select a page pane, click Filegroups. Click Add. In the Name field, type SecondaryFilegroup.

Set the Filegroup to Read-only


Select the Read-Only check box. Click OK.

Check the status of the Filegroups


In the Object Explorer pane, click AdventureWorks2008. Right-click AdventureWorks2008, and then click Properties. The Database Properties dialog box appears. In the Select a page pane, click Filegroups. Examine the current filegroups. Click Cancel.

Managing Databases and Files

2-5

Lesson 2

Creating Databases
Contents:
Question and Answers Detailed Demo Steps 6 7

2-6

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Considerations for Creating Databases
Question: What type of planning would you use for your organization?

Creating Databases
Question: In what situations would you define unique collations for different databases? Answer: If your organizations databases were used globally and required unique collations for different regions.

Important Database Options


Question: Do you know of any other database-level options not listed here? Answer: ANSI_NULL_DEFAULT, ANSI_NULLS, ANSI_WARNINGS, AUTO_CREATE_STATISTICS, AUTO_UPDATE_STATISTICS, CONCAT_NULL_YIELDS_NULL, CURSOR_CLOSE_ON_COMMIT, RESTRICTED_USER, CURSOR_DEFAULT_LOCAL, MERGE PUBLISH, OFFLINE, PUBLISHED, QUOTED_IDENTIFIER, RECURSIVE_TRIGGERS, RECOVERY BULK_LOGGED, SINGLE_USER, SUBSCRIBED, TORN_PAGE_DETECTION.

Resizing Database Files


Question: When would it be best to set databases to grow automatically, and when would it be better to set a fixed size? Answer: You might set a database to expand automatically if you have a large disk array or NAS device. You might preset a maximum size for a database and restrict filegrowth when you have a limited amount of disk storage.

Shrinking a Database
Question: In what situations might it become useful to manually shrink a database file? Answer: A shrink operation is most effective after an operation that creates lots of unused space, such as a truncate table or a drop table operation.

Creating a Database and Schema


Question: What is a schema? Answer: A schema is a collection of database objects that are owned by a single user and form a single namespace. Question: What are the properties of the schema created in this demo? Answer: The schema in this demo is called SchemaDemo, and contains the table DemoTable.

Managing Databases and Files

2-7

Detailed Demo Steps


Demonstration: Creating a Database and Schema
Create a new database
Click Start, and then click SQL Server Management Studio. The Connect to Server dialog box appears. Click Connect. In the Object Explorer pane, expand Databases, and then click AdventureWorks2008. Right-click AdventureWorks2008, and then click New Database. The New Database window opens. In the Database name field, type AdventureWorksDemo, and then click OK.

Create a new schema


In the Object Explorer pane, expand AdventureWorksDemo | Security | Schemas. Right-click Schemas, and then click New Schemas. In the New Schemas window, in the Schemas name field, type SchemaDemo, and then click OK.

Add a schema
In the Object Explorer pane, expand AdventureWorksDemo, and then click Tables. Right-click Tables, and then click New Table. In the Properties pane, in the name field, type DemoTable. In the Schema list, click SchemaDemo. In the Column Name field, type FirstColumn. On the toolbar, click Save DemoTable.

Check the database table status


In the Object Explorer pane, expand Tables, and then click db_owner.DemoTable. Right-click db_owner.DemoTable, and then click Properties. The Table Properties - DemoTable window opens. Examine the properties of the DemoTable table.

2-8

Maintaining a Microsoft SQL Server 2008 Database

Lesson 3

Using Policy-Based Management


Contents:
Question and Answers Detailed Demo Steps 9 10

Managing Databases and Files

2-9

Question and Answers


Configuration Servers
Question: What types of enterprises would benefit from deploying configuration servers for their SQL Server installation? Answer: Larger enterprises with many SQL Servers.

Introducing Policy-Based Management


Question: How would policy-based management be beneficial to your organization? Answer: By using Policy-based Management you can ensure that standard configuration settings are applied and maintained on each of the targeted servers and databases.

Implementing Policy-Based Management


Question: What aspects of policy-based management do you think would be useful to your organization?

Implementing a Policy
Question: How can policies help improve the management of your organization's SQL Server enterprise? Answer: Policy-based management helps manage instances of SQL Server by providing tools for performance monitoring, troubleshooting, and tuning.

2-10

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Implementing a Policy
Define the New Custom Policy
Click Start, and then click SQL Server Management Studio. The Connect to Server dialog box appears. Click Connect. In the Object Explorer pane, navigate to NY-SQL-01 | Management | Policy Management | Facets | Table. Right-click Table and then click New Condition. The Create New Condition window opens. In the Name field, type Table Condition. In the Expression box, in the Field list, click @HasIndex. Make sure that the Operator list is set to =. In the Value list, click True. Click OK. In the Object Explorer pane, right-click Policies, and then click New Policy. The Create New Policy window opens. In the Name field, type Table Policy. Select the Enabled check box. In the Check condition list, click Table Condition. In the Against targets box, in the Every Database list, click New condition. The Create New Condition window opens. In the Name field, type AdventureWorks2008. In the Expression box, in the Field list, click @Name. Make sure that the Operator list is set to =. In the Value field, type 'AdventureWorks2008'. Click OK. In the Execution Mode list, click On Change - Prevent. In the Server restrictions list, make sure the option is set to None. Click OK.

Managing Databases and Files

2-11

Module Reviews and Takeaways


Review questions
1. What are the primarily uses of Secondary Data Files? Secondary files can be used to spread data across multiple disks by putting each file on a different disk drive. Additionally, if a database exceeds the maximum size for a single Windows file, you can use secondary data files so the database can continue to grow. What is the main difference between the tempdb system database and a user database? The main difference is that data in tempdb does not persist after SQL Server shuts down. What is the most important consideration for disk planning? The most important considerations are the number of disks or spindles available to a particular drive and the speed of the drives involved. What are Configuration Servers? Configuration servers store a list of instances of SQL Server organized into one or more configuration server groups. Actions that are taken by using a configuration server group will act on all servers in the server group.

2. 3.

4.

Common Issues related to managing databases and files


Identify the causes for the following common issues related to managing databases and files and fill in the troubleshooting tips. For answers, refer to relevant lessons in the module. Issue Performance of SQL Server is slower than expected. Troubleshooting tip Put secondary files and tempdb on separate filegroups and drive subsystems.

Best Practices related to SQL Server security.


If you have a set of tables that is used together frequently, you should consider putting these tables on separate filegroups on separate physical drives, to balance I/O between them. In a larger, more heavily used system, this could be a significant difference. If disk I/O is a problem, and you cannot add more spindles to the set of disks, consider putting non-clustered indexes in a separate filegroup on a separate disk, in order to split I/O between filegroups. Group your tables based on usage, in order to generate as many simultaneous reads to different filegroups (and disks) as possible. Grouping tables into filegroups based on a maintenance need for convenient backup plans will not generate as much performance as separating the tables and indexes by usage.

2-12

Maintaining a Microsoft SQL Server 2008 Database

Lab Review Questions and Answers


Question: What are the three benefits of Read-only filegroups? Answer: Read-only filegroups provide you the following three benefits: Can be compressed, during recovery you don't need to apply logs to recover a read-only file group, and protection of data from accidental modifications. Question: What are the advantages of Policy-based Management? Answer: With policies, you can ensure that standard configuration settings are applied and maintained on each of the targeted servers and databases.

DISASTER RECOVERY

3-1

Module 3
DISASTER RECOVERY
Contents:
Lesson 1: Planning a database backup strategy Lesson 2: Backing Up User Databases Lesson 3: Restoring User Databases Lesson 4: Performing Online Restore Operations Lesson 5: Recovering Data from Database Snapshots Module Reviews and Takeaways Lab Review Questions and Answers 2 4 7 10 13 16 17

3-2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Planning a database backup strategy


Contents:
Question and Answers 3

DISASTER RECOVERY

3-3

Question and Answers


Overview of Microsoft SQL Server Backup Types
Question: What disaster recovery contingencies does your organization use?

What Are Recovery Models?


Question: What recovery model best fits your organization's needs?

What is a Database and Transaction Log Backup Strategy?


Question: When is it best to use the database and transaction log backup strategy? Answer: Taking regular transaction log backups is necessary. In addition to letting you restore the backed-up transactions, a log backup truncates the log to remove the backed up log records from the log file. If you do not back up the log frequently enough, the log files can fill up.

3-4

Maintaining a Microsoft SQL Server 2008 Database

Lesson 2

Backing Up User Databases


Contents:
Question and Answers Detailed Demo Steps 5 6

DISASTER RECOVERY

3-5

Question and Answers


Backing Up a Database
Question: When is it best to use the full recovery model? Answer: If you need re-create a whole database in one step by restoring the database from a full database backup to any location.

3-6

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Backing Up a Database
Backing up a database with backup compression
Start the NY-SQL-01 Virtual Machine and logon as Student. Open SQL Server Management Studio. Connect to the default server instance using Windows Authentication. Expand the databases node. Right-click the AdventureWorks2008 database, and then click TASKS | BACKUP. Under the General tab: o o Ensure the correct database name appears in the database dropdown. Ensure Backup type is set to FULL.

Click the Options tab . Under Reliability: o o Select Verify backup when finished. Select Perform checksum before writing to media.

Under Compression, in the Compression Option list, click Compress Backup. Click OK.

DISASTER RECOVERY

3-7

Lesson 3

Restoring User Databases


Contents:
Question and Answers Detailed Demo Steps 8 9

3-8

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Restoring a Database
Question: When would you restore and not use the Most Recent Possible Point in Time? Answer: For example, if a transaction changed some data incorrectly, you might want to restore the database to a recovery point just before the incorrect data entry.

DISASTER RECOVERY

3-9

Detailed Demo Steps


Demonstration: Restoring a Database
Restore a Backup
Use the NY-SQL-01 Virtual Machine and logon as Student. Open SQL Server Management Studio and connect using Windows Authentication. Expand the database node. Right-click the AdventureWorks2008 Database, and then click Tasks | Restore | Database. On the General Tab: Under Destination for Restore, o o Ensure AdventureWorks2008 is selected as the destination database. Ensure Point in Time is set to Most Recent Possible.

Under Source for Restore, o o Ensure From Database is selected. Ensure AdventureWorks2008 is the source database.

Select the Restore checkbox on the most recently created backup set. Click the Options tab. Click the OK to restore the backup.

3-10

Maintaining a Microsoft SQL Server 2008 Database

Lesson 4

Performing Online Restore Operations


Contents:
Question and Answers Detailed Demo Steps 11 12

DISASTER RECOVERY

3-11

Question and Answers


Restoring a Damaged Page Online
Question: How was the Page clause used when restoring the damaged page? Answer: The PAGE clause of the RESTORE DATABASE statement is used to list the page Ids of all pages to be restored.

3-12

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Restoring a Damaged Page Online
Identify the Damaged PageID
Use the NY-SQL-01 Virtual Machine and logon as Student. Open SQL Server Management Studio and connect using Windows Authentication. Open the E:\Mod03\Democode\Demonstration Code Snippets.sql file. Expand the Databases node. Expand the System Databases node. Expand the Tables node. Expand the System Tables node. Right-click dbo.suspect_pages and then click SELECT TOP 1000 Rows. Write down the file_id and page_id of suspect page(s) in the database.

Restore the Damaged Page


In Demonstration Code Snippets.sql, under the -- Restore the Damaged Page comment, replace 1 with your file_id and 600 with your page_id. Under the -- Restore the Damaged Page comment, select the code and execute it.

Restore the Transaction Logs


In Demonstration Code Snippets.sql, under the -- Restore the Transaction Logs comment, execute the code for all logs except the last, replacing AW_TLBackUp1 with the name of each log. For the last log remove WITH NORECOVERY. In Demonstration Code Snippets.sql, under the -- Repeat from oldest log to newest log comment, execute the code for all logs except the newest, going from oldest to newest, replacing AW_TLBackUp5 with the name of each log. For the newest log use WITH RECOVERY.

Backup the Transaction Log Tail


In Demonstration Code Snippets.sql, under the -- Backup the Transaction Log Tail comment, execute the code.

Restore the Transaction Log Tail


In Demonstration Code Snippets.sql, under the -- Restore the Transaction Log Tail comment, execute the code.

The damaged page should now be fully restored.

DISASTER RECOVERY

3-13

Lesson 5

Recovering Data from Database Snapshots


Contents:
Question and Answers Detailed Demo Steps 14 15

3-14

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Creating and Recovering a Database Snapshot
Question: Was a backup device specified in the restore statement? Answer: When using this statement, you must specify a snapshot name rather than a backup device.

DISASTER RECOVERY

3-15

Detailed Demo Steps


Demonstration: Creating and Recovering a Database Snapshot
Creating the Snapshot
Use the NY-SQL-01 Virtual Machine and logon as Student. Open SQL Server Management Studio and connect using Windows Authentication. If not already open, open the E:\Mod03\Democode\Demonstration Code Snippets.sql file. Expand the Databases node. Right-click the AdventureWorks2008 database, click New Query. In Demonstration Code Snippets.sql, under the -- Create Database Snapshot comment, select the code, paste it into the query window and then execute it.

The snapshot has been created at the specified location.

Restoring the Database from the Snapshot


Reverting to a database snapshot will fail if the database is in use. Before proceeding close all query windows, table views and property dialogs. Expand the System Databases node. Right-click the Master database, click New Query. In Demonstration Code Snippets.sql, under the -- Restore Database from the Snapshot comment, select the code, paste it into the query window and then execute it. You may need to open this file again first.

The database should now be reverted to the snapsh

3-16

Maintaining a Microsoft SQL Server 2008 Database

Module Reviews and Takeaways


Review questions
1. When is it best to use the database and transaction log backup strategy? Perform a full database and transaction log backup strategy for frequently modified databases. You also should consider whether the database and transaction logs can be backed up in an acceptable amount of time. 2. What are the three phases of the Restore Process? Phases of a restore include the data copy phase, the redo phase and the undo phase. The data copy phase involves copying all data, log and index pages from the backup media. The redo phase applies the transactions to the data copied from the backup to be rolled forward to the recovery point. The undo phase is the first part of any recovery and rolls back any uncommitted transactions and makes the database available to users. After the rollback phase, subsequent backups cannot be restored. 3. When is a database considered to be online? A database is considered to be online when its primary filegroup is online. The database is considered to be online even if secondary filegroups are offline.

Common Issues related to Interactive Navigation


Issue Restoring databases or files fails. Troubleshooting tip Remove any existing database snapshots and ensure that the SQL Server Agent service is running. An online restore tries to update metadata, and that update might fail if a critical page is involved. If an online restore attempt fails, the restore must be performed offline. An attempt to access a filegroup that is offline, including a filegroup that contains a file that is being restored or recovered, causes an error.

A Page restore fails.

Accessing a filegroup results in an error.

DISASTER RECOVERY

3-17

Lab Review Questions and Answers


Question: What is an effective backup strategy for a large database with frequent changes to a subset of filegroups? Answer: Differential database backups are especially useful if a subset of a database is modified more frequently than the rest of the database. If you have a very small database then differential backups may not save any noticeable time. Question: What are the steps to recover data from a snapshot? Answer: Identify the database snapshot to which you want to revert the database, Drop any other database snapshots, and Perform the revert operation.

Managing Security

4-1

Module 4
Managing Security
Contents:
Lesson 1: Overview of SQL Server Security Lesson 2: Protecting the Server Scope Lesson 3: Protecting the Database Scope Lesson 4: Managing Keys and Certificates Lesson 5: Auditing Security Module Reviews and Takeaways Lab Review Questions and Answers 2 4 7 11 14 17 18

4-2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Overview of SQL Server Security


Contents:
Question and Answers 3

Managing Security

4-3

Question and Answers


SQL Server Security Framework
Question: What users and groups need SQL Server access in your organization?

What Are Securables?


Question: What are the key securables in your organization's SQL Server? Answer: Some examples could be Logins, Tables, Databases, Schemas, etc.

4-4

Maintaining a Microsoft SQL Server 2008 Database

Lesson 2

Protecting the Server Scope


Contents:
Question and Answers Detailed Demo Steps 5 6

Managing Security

4-5

Question and Answers


Password Policies
Question: Does your organization employ a password policy?

Managing Logins
Question: Do you prefer to use SQL Server Management Studio or Transact-SQL to create logins? Why?

4-6

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Password Policies
Creating the Window Credential Login
Start NY-SQL-01 and login as Student. Open Server Manager. In console tree, expand Configuration | Local Users and Groups | Users. Create a new User named Frank with a Password of Pa$$w0rd. Open SQL Server Management Studio. Connect to the default server instance using Windows Authentication. Open the E:\Mod04\Democode\Demonstration Code Snippets.sql file. Under the -- Create Window Credential Login comment, execute the code.

The Window Credential Login should now be created.

Creating the SQL Credential Login


In Demonstration Code Snippets.sql, under the -- Creating SQL Credential Login comment, execute the code.

The SQL Credential Login should now be created.

Managing Security

4-7

Lesson 3

Protecting the Database Scope


Contents:
Question and Answers Detailed Demo Steps 8 9

4-8

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Managing Users
Question: Which method of user modification are you most likely to use?

Database-Scope Permissions
Question: What is your preference for assigning permissions: Transact-SQL, SQL Server Management Studio? Why?

Managing Roles and Users


Question: When would you use roles in your environment? Answer: For example, a member of the payroll department probably views salary figures for everyone in your company, while managers might have access to salaries for members of their team. Individual employees would have no access to view any.

Managing Security

4-9

Detailed Demo Steps


Demonstration: Managing Roles and Users
Create new users for Windows groups and users, and the App SQL Server login
In Object Explorer create the following new AdventureWorks2008 database users: User name: Employees Login name: NY-SQL-01\Employees Default schema: Leave blank User name: Paul Login name: NY-SQL-01\Paul Default schema: HumanResources User name: Susan Login name: NY-SQL-01\Susan Default schema: dbo User name: App Login name: App Default schema: HumanResources Verify that the new database users have been created

Assign roles to users and verify users' permissions


View the properties on the database user Susan. Add the database role db_backupoperator to this user. On the file menu open E:\Mod04\DemoCode\TestPermissions.sql. Review the script. Replace ENTER USER NAME with App. Execute the query. Verify that query execution fails with SELECT permission denied, INSERT permission denied and EXECUTE permission denied. View the properties on the AdventureWorks2008 database user App. Add the db_datareader role to this user. In the query window Execute the query. In the Messages pane verify that 16 rows were returned. Verify that the INSERT and EXECUTE statements still fail. In the query window replace App with Paul. Execute the query. Verify the query fails with SELECT permission denied, INSERT permission denied and EXECUTE permission denied. In Object Explorer view the properties of the AdventureWorks2008 database user Employees. Add roles: db_datareader and db_datawritter to this user.

4-10

Maintaining a Microsoft SQL Server 2008 Database

In the query window Execute the script. Verify that the SELECT and INSERT statements succeed but that EXECUTE still fails.

Create a new customer database role and add a user to the role
In Object Explorer for the AdventureWorks2008 database create a new database role, Role name: Manager. In Object Explorer, view schemas user the AdventureWorks2008 database. View the properties of the HumanResources schema. Add: Manager to the Select Users or Roles section. Grant Manager EXECUTE permission. In Object Explorer view the properties for the AdventureWorks2008 database role: Manager. Add the database user Paul to this role. In the TestPermissions.sql query, on the line that begins with EXECUTE HumanResources.uspUpdateEmployeeLogin, change 16 to NULL. In the query window execute the TestPermissions.sql query. Verify that all statements complete successfully.

Managing Security

4-11

Lesson 4

Managing Keys and Certificates


Contents:
Question and Answers Detailed Demo Steps 12 13

4-12

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Encrypting and Decrypting Data
Question: What types of organizational data might you encrypt using PKI? Answer: Payroll or other sensitive information that other users should not have access to.

Managing Security

4-13

Detailed Demo Steps


Demonstration: Encrypting and Decrypting Data
Create the EmployeeReview table and assign permission to the App user
In Management Studio open the file E:\Mod04\DemoCode\EncryptData.sql. In the query pane, review the script. Select the code segment below the comment 'Create Employee table and grant permissions' and click Execute. Verify that the EmployeeReview table has been created in the AdventureWorks2008 database. View the properties of the EmployeeReview table. Verify that only the App user has Insert, Select and Update permissions.

Create keys and a certificate for protecting data


In the query pane, select the code segment below the comment 'Create database master key. Execute the code segment. Note: This statement creates a symmetric database master key for the AdventureWorks2008 databases. This key is encrypted by using the password Pa$$w0rd In the query pane, select the code segment below the comment 'Create certificate. Execute the code segment.

Encrypt and decrypt data by using the certificate


In the query pane, select the code segment below the comment 'Insert encrypted data. Execute the code segment. In the query pane, select the code segment below the comment 'Read the decrypted data as App. Execute the code segment. Verify the statement 'Increasing salary to $35,000' is visible in the results pane.

Attempt to access encrypted data as an unauthorized user


In the query pane, select the code segment below the comment 'Try to read data as another user. Execute the code segment. In the results pane verify that the code runs without error but the comments column appear blank. In the query pane, select the code segment below the comment 'Try to decrypt data as another user. Execute the code segment. In the results pane verify that the code fails with the message 'Cannot find the symmetric key HRKey.

4-14

Maintaining a Microsoft SQL Server 2008 Database

Lesson 5

Auditing Security
Contents:
Question and Answers Detailed Demo Steps 15 16

Managing Security

4-15

Question and Answers


Auditing with DDL Triggers
Question: How would you use DDL triggers to track changes in your organization's database? Answer: You can prevent or log changes to your database. As a DBA or database developer, it may be important to know if and when something in your database has changed. In some cases, you may even want to prevent changes by any user altogether.

Using SQL Server Audit


Question: When might you use SQL Server Audit? Answer: For example, a database audit that will write an event to the audit log whenever the database owner for the specified table does a SELECT or INSERT on that table. In a high security environment, the Windows Security log is the appropriate location to write events that record object access.

4-16

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Using SQL Server Audit
Create a SQL Server Audit object and define its target
In Object Explorer, expand NY-SQL-01 | Databases | AdventureWorks2008 | Tables | Person.Person | Keys and delete FK_Person_BusinessEntity_BusinessEntityID. In Management Studio open the file E:\Mod04\DemoCode\SQLAudit.sql. In the query pane, review the script. Select the code segment below the comment 'Create the SQL Server Audit object, and sent the results to the Windows Application event log' and click Execute.

Create and enable an audit specification


Select the code segment below the comment 'Create the Database Audit Specification object using an Audit event for the Person.Person table and the FirstName and LastName columns' and click Execute.

Create an auditable event and view the event in the Windows event log
Select the code segment below the comment 'Create an auditable event' and click Execute . In Windows, open the Event Viewer in Administrative Tools. Under Windows Logs view the Application log. Verify that a SQL Server audit event has been created.

Managing Security

4-17

Module Reviews and Takeaways


Review questions
1. How does SQL Server take advantage of Windows password Policy? When it is running on Windows Server 2003 or later, SQL Server can use Windows password policy mechanisms. 2. What database changes would you track using Profiler? For example, you can monitor a production environment to see which stored procedures are affecting performance by executing too slowly.

Real-world Issues and Scenarios


1. You want your IT department to be able to view customer data but not sensitive credit card numbers. Use transparent database encryption and only provide access to authorized parties. 2. You have a scenario where one group of Windows users can ADD data to a table and another group of Windows users can only EDIT and DELETE. What is a good way to leverage SQL to manage this situation? Create SQL logins for each Windows groups. Create database users for the logins and assign those users relevant permissions against the table.

Best Practices related to a particular technology area in this module


Supplement or modify the following best practices for your own work situations: Documenting your organizations data access requirements in advance will make securing SQL Server easier. Identify groups of users by their access needs and create logins for those groups. Identify sensitive data in advance and create a encryption strategy around it.

4-18

Maintaining a Microsoft SQL Server 2008 Database

Lab Review Questions and Answers


Question: What is the importance of password policies? Answer: Users need access to certain objects and their account gives them this access. The password helps protect these objects from others who were not meant to use that account. An effective password policy helps prevent passwords from being guessed or cracked. Question: How can server and database scope permissions be used to manage organizational access to data? Answer: Server-level permissions control who can manage the server itself (start, stop, add users, etc), and database permissions control who can do what on a particular database. Question: What are some of the benefits of encryption? Answer: Some of the benefits of transparent data encryption include searching encrypted data using either range or fuzzy searches, more secure data from unauthorized users, and data encryption. Question: How can SQL Server audits be used to make management tasks easier? Answer: You can track performance issues or log and prevent changes in a database, among other things. With this information you can alter you database to meet the needs of your organization.

Transferring Data

5-1

Module 5
Transferring Data
Contents:
Lesson 1: Overview of Data Transfer Lesson 2: Introduction to SQL Server Integration Services Module Reviews and Takeaways Lab Review Questions and Answers 2 5 10 11

5-2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Overview of Data Transfer


Contents:
Question and Answers Detailed Demo Steps 3 4

Transferring Data

5-3

Question and Answers


What is Data Transfer?
Question: In what situations have you had to import and export large amounts of data? Answer: The students who have had prior experience with database projects will be able to relate some experience related to one of the points on the slide.

Tools for Data Transfer


Question: When is bcp the right solution for a bulk transfer? Answer: There are a variety of answers, but generally use bcp when a large amount of rows need to be imported or transferred and no transformation needs to be performed.

Considerations for Bulk Import/Export


Question: What type of backup do you need to perform for a database using the bulk-logged recovery model? Answer: Only a log backup is necessary.

Bulk Import/Export Tools


Question: What kind of information needs to be present in format files? Answer: The format file can include information to map columns and provide column information such as data type. The format file needs to contain correct column or record information to function.

XML Bulk Load


Question: Is XML data storage in use in a SQL environment that you work with?

Using the Import Export Wizard


Question: Could you use the Import and Export Wizard to export all files in a table of names that started with the letter 'A'? How would you accomplish that? Answer: Yes. The table could be queried by a SELECT command which calls for only those rows which start with the letter A.

Using the Database Copy Wizard


Question: In what scenarios would the database copy wizard be best utilized? Answer: The Database Copy Wizard can be used for database migrations, to upgrade databases to SQL Server 2008, or for creating a test database for development.

5-4

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Using the Import Export Wizard
This demonstration will go over a basic data transfer using the Import Export Wizard. The demonstration will perform all the basic tasks in any data transfer; Export data, Transform data and then Import data. Use the Import and Export Wizard to do a basic export of data from the AdventureWorks2008 database HumanResources.Employee table to a flat file. Use the Import and Export Wizard to do a simple transformation. o From the Person.ContactType table, export using the SQL Query below:

SELECT Firstname, Lastname FROM Person.Contact WHERE ContactID < 20 Use the Import and Export Wizard to import the flat file created in the previous step.

Using the Database Copy Wizard


This demonstration will illustrate how to use the Database Copy Wizard to move databases. Start the SQL Server Instance SQLInstance2. Start the Copy Database Wizard for the AdventureWorks2008 database. Discuss the Attach and Detach Method versus the SQL Management Object Method.

Transferring Data

5-5

Lesson 2

Introduction to SQL Server Integration Services


Contents:
Question and Answers Detailed Demo Steps 6 7

5-6

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


What is Data Transformation?
Question: What types of data transformations have you needed to perform in the past? Common simple data transformations include parsing addresses from a single field to multiple (number, street, city, state, zip) fields, changing date formats, and currency conversions. More complicated scenarios could include normalizing data and fuzzy lookups.

SQL Server Integration Services Tools


Question: How would you use these tools to create and deploy a recurring transformation process? Answer: SSIS designer packages could be created and the DTExec tool can then be used in a script or a schedule to run the package regularly.

How SQL Server Integration Services processes tasks


Question: What is an example of a use of a precedence constraint? Answer: A precedence constraint could allow an email to be sent when a data flow process successfully executes.

How to deploy packages


Question: When is a package configuration useful or necessary? Answer: To manipulate object properties, such as the connection manager string.

Using SQL Server Integration Services


Question: What could you add to the package in order to notify other operators that the task is completed? Answer: An SMTP connection manager could be created and invoked by an SMTP task upon completion. It would send an email to the administrator.

Transferring Data

5-7

Detailed Demo Steps


Demonstration: Using SQL Server Integration Services
This demonstration will show how to create an SSIS package.

Create a new Integration Services project.


Open SQL Server Management Studio and connect to the NY-SQL-01 database engine. Create a new project called SSIS_proj2. Rename the package products.dtsx. Create a data source for the AdventureWorks database Create a new data source connection to the AdventureWorks2008 database on NY-SQL-01. Name the data source AdventureWorks2008_ds. Create a new data source view using AdventureWorks2008_ds as the data source. Add the Product (Production) table to the included objects pane. Name the data source view Products_dsv. Expand the Product node in the Tables pane to view the columns in this table. In the Tables pane, right-click the Product node, and then click Explore Data. Review the sample data in the Table, PivotTable, Chart, and Pivot Chart tabs.

Create a connection manager


From the control flow tab, create a new connection manager from the AdventureWorks2008_ds data source. Rename the new connection manager AdventureWorks2008_cm.

Create a data flow task


Add a data flow task to the control flow design surface. Name the new task DFT Retrieve product data and give it a description. Open the data flow task design surface. Drag an OLE DB Source from the Toolbox to the design surface. Name the new object OLE Retrieve product data and provide a description. On the Connection Manager page of the OLE DB Source Editor dialog box, add the Products_dsv data source view in the OLE DB connection manager list, using Table or view as the data source type. Use the Production.product table.

Create a row count transformation


Add a Row Count transformation to the design surface. Connect the output of the OLE DB source to the new Row Count transformation. Double-click the Row Count transformation.

5-8

Maintaining a Microsoft SQL Server 2008 Database

In the Advanced Editor for Row Count dialog box, in the Name box, type CNT Retrieve row count. In the Description box, type Add row count to the ProductCount variable. In the VariableName box, type ProductCount. Save the solution.

Add a script task after the data flow task


Drag a Script Task from the Toolbox to the control flow design surface. Click the Data Flow task, and then drag the precedence constraint from the Data Flow task to the Script task. Double-click the Script task. On the General page of the Script Task Editor dialog box, in the Name box, type SCR Display complete. In the Description box, type Retrieve product count from ProductCount variable and display in message. On the Script page of the Script Task Editor dialog box, in the ReadOnlyVariables box, type ProductCount, and then click Edit Script. In the Microsoft Visual Studio for Applications window, in the Project Explorer pane, double-click ScriptMain.cs. Select the Main() subroutine on the right hand drop down box. The Main() subroutine begins with the following line of code. public void Main() Insert a line after // TODO: Add your code here and add the following code. MessageBox.Show("Product data has been exported"); Close the Microsoft Visual Studio for Applications window. On the toolbar, click the Save All button.

Add a flat file destination


Add a Flat File destination to the design surface. Connect the output of the Row Count transformation to the Flat File destination. Name the flat file destination FFD Load product data. In the Flat File Destination Editor dialog box, click New. In the Flat File Format dialog box, verify that the Delimited option is selected, and then click OK. In the Flat File Connection Manager Editor dialog box, in the Connection manager name box, type Products_cm. In the Description box, type Connects to the Products.txt file. In the File name box, type E:\Mod05\Labfiles\Products.txt. When completed, save all objects in the project.

Transferring Data

5-9

Run the package and view the resulting data


Run the package. Discuss different ways to run the package. Open the E:\Mod05\Labfiles\Products.txt file.

5-10

Maintaining a Microsoft SQL Server 2008 Database

Module Reviews and Takeaways


Review questions
1. 2. 3. 4. What data transfer tool can also move logins and stored procedures? Database Copy What is bcp capable of that Bulk Insert can not do? Exporting Data. What SSIS object is used to connect to data sources? Connection Manager

Real-world Issues and Scenarios


1. 2. An entire database needs to be moved to another SQL Server. However, the database must remain online during the transfer. How would you perform the transfer? An application needs data formatted XML documents. Some of the data for the XML documents is in the SQL Server and other data is in a spreadsheet. What process would you design to create the XML documents?

Common Issues related to Transferring Data


Issue Unexpected Null Found error during a Bulk Import operation. Large bulk import performance is slow. Database copy performance is slow. Troubleshooting tip Remove hidden characters from the source data file. Drop table indexes before importing. If possible, take the database offline with the detach and attach method.

Best Practices related to data transfer.


Use SSIS for transfers that need to be repeated or replicated to other servers. Use bcp or the Import and Export Wizard for less complex one-time transfers. Transfers, particularly those involving transformations, can be resource intensive. Perform large transfers during periods of low activity. Avoid transfer methods that require staging. Automate whenever possible.

Transferring Data

5-11

Lab Review Questions and Answers


Question: You are asked to export a small amount of data from a table to a flat file so that an analyst can put it into a spreadsheet for a one-time reporting project. What application or technique would you use? Answer: Either bcp or the Import and Export Wizard would be the simplest way to perform an ad-hoc one use export. Question: Another analyst would like you to deliver data for a weekly report. He would like the Firstname, Lastname, and Title fields joined. What application would you use to provide the data for him? SSIS can perform the transformation and also create a scheduled package. Question: The SSIS project that we created in the third lab can be modified to apply to similar projects in some branch offices. How can the project be transferred to another server? Answer: The project folder can simply be file copied to the other server and run against that database.

Automating Administrative Tasks

6-1

Module 6
Automating Administrative Tasks
Contents:
Lesson 1: Automating Administrative Tasks in SQL Server 2008 Lesson 2: Using SQL Server Agent Lesson 3: Creating Maintenance Plans Lesson 4: Implementing Alerts Lesson 5: Managing Multiple Servers Lesson 6: Managing SQL Server Agent Security Module Reviews and Takeaways Lab Review Questions and Answers 2 5 8 11 14 17 19 20

6-2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Automating Administrative Tasks in SQL Server 2008


Contents:
Question and Answers Detailed Demo Steps 3 4

Automating Administrative Tasks

6-3

Question and Answers


What are Operators?
Question: Would your current Active Directory users and groups function for operator groups or would you need to create new groups? Answer: If there are administrative groups that define roles, then it might be possible to simply assign them to operators.

Creating Job Steps


Question: What functions do you currently perform manually that could be placed in a job? Answers will vary, but they will probably include database backups, maintenance tasks such as log shipping and data warehousing, and manual actions like adding operators.

Creating Jobs and Operators


Question: What other tasks would you automate in your environment? Answers will vary, but can include backup, maintenance, and data warehousing operations.

6-4

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Creating Jobs and Operators
In this demonstration, create an operator based on the administrator user. Then create a job to backup the master database that sends a net send notification to the newly created operator. Create an Operator named AWAdmin. Explain the options as you go through the creation process. Configure with the E-mail address administrator@NY-SQL-01. Create a job backing up the master database. Configure a notification that contacts AWAdmin when the job is complete.

Note that the Net Send function will not work on the Windows Server 2008 demonstration machine.

Automating Administrative Tasks

6-5

Lesson 2

Using SQL Server Agent


Contents:
Question and Answers Detailed Demo Steps 6 7

6-6

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Using SQL Server Agent
Question: How would your maintenance plan differ from the one we just created? Answers will vary.

Automating Administrative Tasks

6-7

Detailed Demo Steps


Demonstration: Using SQL Server Agent
In this demonstration, configure database mail using the SQL Server Management Studio. Use the account name SQLServer. Then configure SQL Server Agent to use the Database Mail account just created. Configure Database Mail In SQL Server Management Studio, right-click Database Mail and then click Configure Database Mail. Create a profile named SQL Server Agent Profile. Add an account to the profile with the following settings:

Account name: SQLServer Description: SQL Server e-mail account E-mail address: sqlserver@adventure-works.com Display name: SQL Server Reply e-mail: sqlserver@adventure-works.com Server name: NY-SQL-01 Port number: 25 This server requires a secure connection (SSL): Cleared Anonymous authentication: Selected Enable: access to the profile. Configure SQL Server Agent. Add NY-SQL-01\SQLServer to the DatabaseMailUserRole. Enable the mail profile Restart SQL Server Agent service.

6-8

Maintaining a Microsoft SQL Server 2008 Database

Lesson 3

Creating Maintenance Plans


Contents:
Question and Answers Detailed Demo Steps 9 10

Automating Administrative Tasks

6-9

Question and Answers


What is a Maintenance Plan?
Question: What types of maintenance tasks should be automated? Answers will vary, but will include backups, integrity checks, and index tasks.

Creating a Maintenance Plan


How would your maintenance plan differ from the one we just created? Answers will vary.

6-10

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Creating a Maintenance Plan
In this demonstration, configure database mail using the SQL Server Management Studio. Use the account name SQLServer. Then configure SQL Server Agent to use the Database Mail account just created. Configure Database Mail In SQL Server Management Studio, right-click Database Mail and then click Configure Database Mail. Create a profile named SQL Server Agent Profile. Add an account to the profile with the following settings:

Account name: SQLServer Description: SQL Server e-mail account E-mail address: sqlserver@adventure-works.com Display name: SQL Server Reply e-mail: sqlserver@adventure-works.com Server name: NY-SQL-01 Port number: 25 This server requires a secure connection (SSL): Cleared Anonymous authentication: Selected Enable: access to the profile. Configure SQL Server Agent. Add NY-SQL-01\SQLServer to the DatabaseMailUserRole. Enable the mail profile Restart SQL Server Agent service.

Automating Administrative Tasks

6-11

Lesson 4

Implementing Alerts
Contents:
Question and Answers Detailed Demo Steps 12 13

6-12

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


What is an Alert?
Question: What events are you familiar with that should have a configured alert? Answers will vary but will include failed jobs, successful jobs, and memory usage exceeding a tolerance.

How to Create an Alert


Question: How can an operator be contacted? Answer: By email or netsend. Email is the most common and generally the best practice. Pagers can be accessed via an email gateway.

Handling Alerts
Question: What type of job would be launched by an alert configured to trigger when the tempdb database free space falls below 1000 KB? Answer: The SQL Server service could be restarted, or an ALTER DATABASE T-SQL command could flush the database.

Using Alerts
Question: Are you aware of other tools that can be used by the administrator to monitor SQL Server? Answer: Some options include Operations Manager and other network monitoring tools.

Automating Administrative Tasks

6-13

Detailed Demo Steps


Demonstration: Using Alerts
In this demonstration, create an alert for critical database events. Speak about the options as you create the alert. In Object Explorer, expand NY-SQL-01. Expand SQL Server Agent. Right-click Alerts and then click New Alert. Create an alert with a severity of 019. Check Notify Operators and click the AWAdmin Operator. In the Select a Page pane, click the Options tab and speak through the available options.

6-14

Maintaining a Microsoft SQL Server 2008 Database

Lesson 5

Managing Multiple Servers


Contents:
Question and Answers Detailed Demo Steps 15 16

Automating Administrative Tasks

6-15

Question and Answers


Configuration Servers
Question: What scenarios would invite the use of master and target configuration servers? Answer: A variety of tasks, including maintenance plan tasks and data collection processes.

Using Event Forwarding for Multiple Server Jobs


Question: What are the advantages and disadvantages of using Event Forwarding? Answers: Advantages: Centralization. Centralized control and a consolidated view of the events of several instances of SQL Server are possible from a single server. Scalability. Many physical servers can be administered as one logical server. You can add or remove servers to this physical server group as needed. Efficiency. Configuration time is reduced, because you need to define alerts and operators only once. Disadvantages Increased traffic. Forwarding events to an alerts management server can increase network traffic. This increase can be moderated by restricting event forwarding to events that are above a designated severity level. Single point of failure. If the alerts management server goes offline, no alerts are issued for any event on the managed group of servers. Server load. Handling alerts for the forwarded events causes an increased processing load on the alerts management server.

6-16

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Creating a Multiple Server Job
In this demonstration, set up master server and target server. Then configure event forwarding. Start a second instance of SQL Server. In SQL Server Configuration Manager, start SQL Server (SQLINSTANCE2) and SQL Server Agent (SQLINSTANCE2). Note that an error may occur that states The Service can not be started. If you refresh the view, the service will have actually started. Configure Master Server and Target Server o o o In SQL Server Management Studio, Right-click SQL Server Agent, click Multi Server Administration, and then click Make this a Master. For the Master Server operator, provide the email address administrator@adventureworks.com. For Target Servers, click Add Connection and add NY-SQL-01\SQLINSTANCE2.

Configure the SQL Server instance as an events forwarding server.

Automating Administrative Tasks

6-17

Lesson 6

Managing SQL Server Agent Security


Contents:
Question and Answers 18

6-18

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


SQL Server Agent Roles
Question: Are there administrative roles in your organization that should be granted SQLAgentOperatorRole? Answer: Any fully privileged SQL administrator would probably be assigned that role.

Automating Administrative Tasks

6-19

Module Reviews and Takeaways


Review questions
1. What are the tools used to automate administrative tasks? Create operators to receive notification of job activites. Create jobs to sequence tasks and schedule them. Database Mail is used to notify operators of job activities via SMTP. How do you employ SQL Server Agent Roles? Use SQL Server Agent Roles to allow some operators to run jobs while others have greater control over stopping and viewing jobs. How is SQL Server Agent security managed? SQL Server Proxies store windows credentials that allow access to other resources, such as subsystems in job steps.

2.

3.

Common Issues related to cached reports and report snapshots


Issue How do you implement security for SQL Server Agent? Create Maintenance Plans for large scale SQL Server farms. Troubleshooting tip Utilize role-based permissions appropriate to the user's needs. Standardize based on Service Level Agreement

Too many alerts are being forwarded, confusing the operators.

Refine and target alerts using SQL Server Agent. Only send alerts to administrators who can respond to them.

Best Practices related to SQL Server Agent.


Establish SSL encryption between target and master servers. Migrate applications that use SQL Mail to Database Mail. Be aware that jobs increase network and processor loads. Schedule processes for non-peak activity periods. Generally, use as few master servers as possible to simplify management.

6-20

Maintaining a Microsoft SQL Server 2008 Database

Lab Review Questions and Answers


Question: What role is used by Database Mail? Answer: Add the SQL Server Agent user to the DatabaseMailUserRole. Question: What should you create first the operator or the job? Answer: Create the operators first so that you can configure the operators for each job as you create it. Question: What ways can you notify an operator? Answer: An operator can be notified by Net Send, email, or pager.

Implementing Replication

7-1

Module 7
Implementing Replication
Contents:
Lesson 1: Overview of Replication Lesson 2: Managing Publications and Subscriptions Lesson 3: Configuring Replication in Some Common Scenarios Module Reviews and Takeaways Lab Review Questions and Answers 2 4 7 11 12

7-2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Overview of Replication
Contents:
Question and Answers 3

Implementing Replication

7-3

Question and Answers


Distributing and Synchronizing Data
Question: In what other scenarios would replication be useful? What are the potential challenges for each scenario?

Types of Replication
Question: What are the disadvantages of transactional replication? Answer: There will be points between the scheduled synchronizations when data will not be consistent at all nodes. Also, if changes are made at multiple nodes to the same data, conflicts will occur.

What are Replication Agents?


Question: Which agent moves transactions marked for replication from the transaction log on the publisher server to the distribution database? Answer: The Log Reader Agent.

7-4

Maintaining a Microsoft SQL Server 2008 Database

Lesson 2

Managing Publications and Subscriptions


Contents:
Question and Answers Detailed Demo Steps 5 6

Implementing Replication

7-5

Question and Answers


How to Create a Publication
Question: When would it be desirable to use stored procedures instead of the wizard to create publications? Answer: With stored procedures, one could automate the creation of publications based on variable inputs, allowing for quick dynamic publication creation.

Managing and Monitoring Replication


Question: A server in a branch office that subscribes to a standard transactional replication publication goes offline for an entire weekend. What is necessary to return data to 100% consistency? Answer: It may be necessary to manually verify that each transaction has been recorded consistently in both location. Some T-SQL automation could be used to simplify the process.

7-6

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Configuring Snapshot Replication
In this demonstration, you will create a snapshot replication between two SQL Server instances. Create a snapshot replication publication on the default instance of SQL Server for a table in the AdventureWorks2008 database. Make the snapshot immediately available. Set the update frequency to 1 minute. Start the SQLINSTANCE2 SQL Server instance and the SQL Server Agent for SQLINSTANCE2. For SQLINSTANCE2, create a new subscription to the new publication on the default instance of SQL Server. Add it to a new database called AdventureWorks2008 Verify that the replication is functioning by changing a value in the table on the default instance and then checking the same value on SQLINSTANCE2.

Implementing Replication

7-7

Lesson 3

Configuring Replication in Some Common Scenarios


Contents:
Question and Answers Detailed Demo Steps 8 9

7-8

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Server-to-Client Replication Scenarios
Question: What kind of potential problems can occur that would be specific to server-to-client replication scenarios? Answer: Considerations include security and planning for unreliable network links.

HTTP Merge Replication


Question: What scenarios would make use of HTTP merge replication? Answer: Mobile clients or remote branch offices without dedicated links to the main office.

Configuring Peer-to-Peer Replication


Question: If you only need a portion of the database and the database is very large, how could you simplify the transfer of data and schema to the peers? Answer: create a backup of the original database and restore it to the new peer.

Implementing Replication

7-9

Detailed Demo Steps


Demonstration: Configuring HTTP Merge Replication
In this demonstration, you will deploy a merge replication using IIS. Create a new merge replication publication on the AdventureWorks2008 table Person.Person, filtering for the top 50 rows. o o Replicate every minute. Name it AdventureWorksHTTPContacts

Enable Web synchronization Create a self signed SSL Certificate in IIS and bind it to the https protocol. Configure Web synchronization for the AdventureWorksHTTPContacts publication. o o Create a new virtual directory named AdventureWorksHTTPContacts. Use only Basic authentication. Confirm the setup by browsing to https://NY-SQL01/AdventureWorksHTTPConntacts/replisapi.dll.

Create a subscription for the new publication On SQLINSTANCE2, add a new subscription to AdventureWorksHTTPContacts. Log off the server and log in as user sqlserver. Set the Internet explorer home page to blank. In Internet settings, under the Connections tab, click LAN Settings. Clear the Automatically detect settings check box. Log off and log on as Administrator. View synchronization status. Generate scripts for the http replication.

Configuring Peer-to-Peer Replication


In this demonstration, you will configure an HTTP merge replication that will use IIS to replicate data between to SQL Server instances. Configure distribution Set SQLINSTANCE2 and the related SQL Server Agent services to autostart. Configure distribution using the snapshot folder \\NY-SQL-01\repldata.

Create a transactional publication Create a new transactional publication on the default SQL Server instance for the ProductVendor (Purchasing) table. Do not filter any rows.

Enable peer-to-peer replication For the new publication properties, set Allow peer-to-peer publications to True.

Backup and restore the database.

7-10

Maintaining a Microsoft SQL Server 2008 Database

For the default SQL Server instance AdventureWorks2008 database, set the Recovery Model to Full. Backup the database and transaction logs. On SQLINSTANCE2, set the filestream level to 3. Use the following query: EXEC sp_filestream_configure @enable_level = 3; RECONFIGURE GO

Restore the database and log files. Use the following query: RESTORE DATABASE AdventureWorks2008 FROM DISK = 'C:\Backup\AdventureWorks2008.bak' WITH MOVE 'AdventureWorks2008_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLINSTANCE2\MSSQL\Data\AdventureWorks2008_Data.mdf', MOVE 'AdventureWorks2008_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLINSTANCE2\MSSQL\Data\AdventureWorks2008_Log.ldf', MOVE 'FileStreamDocuments' to 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLINSTANCE2\MSSQL\Data\Documents'

Configure the topology for the peer to peer replication, adding the second SQL Server instance.

Implementing Replication

7-11

Module Reviews and Takeaways


Review questions
1. What technology is best suited for creating point in time reports? Data base snapshot replication. 2. What tools can you use to monitor database replication? Replication Monitor, Windows Event Viewer, and View Synchronization Status. 3. What role does a distributor play in a replication? The distributor stores replication-specific data associated with one or more publishers.

Common Issues related to HTTP merge replication


Issue Synchronization does not occur. View Synchronization Status displays a proxy error. Synchronization does not occur with the Merge Agent error "Timeout Expired." Troubleshooting tip Confirm that proxy settings are correct at publisher and subscriber. In Internet Explorer, disable automatic proxy settings detection. Increase the Query Timeout in the Merge Agent profile.

Synchronization Status displays a failure of "General Network Error." Merge replication occurs slowly.

Confirm that the snapshot folder is properly available. Increase the batch sizes processed by Merge Agent. Use static partitions if possible. Reindex merge replication system tables.

Best Practices related to replication


Create and test a backup scheme for the publication, distribution, and subscription databases, as well as the mdb and master databases. Preserve the scripts for replication topology for reuse and modification. Test replication performance and establish baselines.

7-12

Maintaining a Microsoft SQL Server 2008 Database

Lab Review Questions and Answers


Question: What is the best way to manage security for replication? Answer: Create Active Directory users, supply them with only the appropriate rights for the replication, and assign them to the agents. Question: What elements need to exist on all peers before peer-to-peer replication is instituted? Answer: The table and the schema needs to be in place. They can be placed there either using a backup and restore process or via an SSIS project. Question: When is HTTP replication useful? Answer: When a copy of a database or table needs to be made securely available over the internet.

Maintaining High Availability

8-1

Module 8
Maintaining High Availability
Contents:
Lesson 1: Introduction to High Availability Lesson 2: Implementing Log Shipping Lesson 3: Implementing Database Mirroring Lesson 4: Implementing Server Clustering Lesson 5: Using Distributed High Availability Solutions Module Reviews and Takeaways Lab Review Questions and Answers 2 4 7 11 13 15 17

8-2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Introduction to High Availability


Contents:
Question and Answers 3

Maintaining High Availability

8-3

Question and Answers


What is High Availability?
Question: Where in your organization have you implemented high availability?

Factors Affecting Availability


Question: What types of failures affecting availability have you experienced in your organization?

Discussion: Why High Availability?


Question: What would high availability mean for your organization?

8-4

Maintaining a Microsoft SQL Server 2008 Database

Lesson 2

Implementing Log Shipping


Contents:
Question and Answers Detailed Demo Steps 5 6

Maintaining High Availability

8-5

Question and Answers


What is Log Shipping?
Question: What factors might affect the frequency at which you would run the log backup, copy, and restore jobs in a log shipping configuration? Answer: Answers will vary, but the speed of log growth and the acceptable latency between the primary and secondary servers are major factors.

Switching Server Roles


Question: What effect do the RECOVERY and NO RECOVERY options have in a restore command? Answer: RECOVERY instructs the restore operation to roll back any uncommitted transactions. NORECOVERY instructs the restore operation to not roll back any uncommitted transactions.

Configuring Log Shipping


Question: Why must a network share be used for log shipping? Answer: Because the remote machine must be able to access the logs over the network.

Configuring Log Shipping


Question: How would you modify the log shipping configuration to ship logs to multiple secondary servers? Answer: You need to restore database backups to each secondary server, then add additional copy and restore schedules as needed for each additional secondary server.

8-6

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Configuring Log Shipping
In this demonstration, you will configure log shipping to ship transaction logs from one SQL Server to another to create a warm standby. Start 6231A-HOU-DC-01, 6231A-HOU-SQL-01, and 6231A-HOU-SQL-02. Log on to HOU-SQL-01 and HOU-SQL-02 as Adventureworks\Administrator. On HOU-SQL-01, use SQL Server Management Studio to connect to the database engine on HOU-SQL-02. Open E:\Mod08\Democode\EnableFilestream.sql and execute the query to FILESTREAM access. On HOU-SQL-01, change the AdventureWorks2008 database recovery model to Full. Enable AdventureWorks2008 as the primary database in a log shipping configuration. Set the Network path to backup folder to \\HOU-SQL-01\Backup. Set the local path to the backup folder to C:\Backup. Create a schedule called LogShippingBackup and set the interval to every 5 minutes. In the Secondary databases section, add HOU-SQL-02, and set the destination folder to C:\LSBackup. Create a copy schedule called HOU-SQL-02_CopyJob and set the interval to every 5 minutes. Set the database state when restoring backups to Standby mode. Create a restore schedule called HOU-SQL-02_Restore job and set the interval to every 5 minutes. Save the log shipping configuration. Use SQL Server Management Studio to check the status of the AdventureWorks2008 database on HOU-SQL-02. Use the Job Activity Monitor to check the status of SQL Server Agent jobs on HOU-SQL-01 and HOU-SQL-02. On HOU-SQL-01, open E:\Mod08\Democode\InsertNewCurrency.sql and execute the query to insert a new product into the Sales.Currency table. On HOU-SQL-02, open E:\Mod08\Democode\SelectNewCurrency.sql and execute the query to verify that the Ukranian currency appears in the AdventureWorks2008 database on HOUSQL-02. Turn off HOU-SQL-01 and HOU-SQL-02 and delete changes.

Maintaining High Availability

8-7

Lesson 3

Implementing Database Mirroring


Contents:
Question and Answers Detailed Demo Steps 8 10

8-8

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


What is Database Mirroring?
Question: When would you use mirroring instead of clustering? Answer: Answers may vary, but mirroring is more appropriate in situations where hardware and software don't meet the requirements in the Hardware Compatibility List, or when the SQL Servers are geographically too far apart to support clustering.

Database Mirroring Server Roles


Question: What is the benefit of using a witness server for mirroring? Answer: The witness server allows for automatic failover.

Options for Database Mirroring Configuration


Question: When might you want to use High Performance mode?

What are Database Mirroring Endpoints?


Question: How many endpoints do you need if you are mirroring 3 databases on a single SQL Server instance? Answer: Just one. Only one endpoint is needed per SQL Server instance.

Establishing a Mirror Session


Question: What firewall ports do you need to open on the principal, mirror, and witness servers in order to successfully implement High Availability mirroring? Answer: In High Availability mode, 3 ports need to be opened for the TCP protocol. Commonly, the ports 5022, 5023, and 5024 are used.

Handling Failover
Question: Why is there possible data loss in the Forced Service scenario? Answer: Data loss is possible because the mirror server cannot communicate with the principal server and, therefore, cannot guarantee that the two databases are synchronized. Forcing service starts a new recovery fork. Because the original principal database and mirror database are on different recovery forks, each database now contains data that the other database does not: the original principal database contains whatever changes were not yet sent from its send queue to the former mirror database (the unsent log); the former mirror database contains whatever changes occur after service was forced.

Transparent Client Redirection


Question: Would your current database applications be able to handle automatic failover in a mirroring scenario?

Maintaining High Availability

8-9

Configuring Database Mirroring


Question: If a witness server was not used, how would failover occur? Answer: Failover can only occur manually if a witness server is not used.

8-10

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Configuring Database Mirroring
In this demonstration, you will configure database mirroring to provide high availability and automatic failover using a witness. Start 6231A-HOU-DC-01, 6231A-HOU-SQL-01, and 6231A-HOU-SQL-02. Log on to HOU-SQL-01 and HOU-SQL-02 as Adventureworks\Administrator. On HOU-SQL-01 in SQL Server Management Studio, change the Recovery model of the AdventureWorksDW2008 database to Full. Backup the database to C:\Backup\AdventureWorksDW2008.bak. Backup the transaction log to C:\Backup\AdventureWorksDW2008.trn. On HOU-SQL-02, open E:\Mod08\Democode\EnableFilestream.sql and execute the query to enable FILESTREAM support. Open the file E:\Mod08\Democode\RestoreAWDW2008.sql. Select the RESTORE DATABASE command and then click Execute. When the restore is complete, select the RESTORE LOG command and then click Execute. Verify that on HOU-SQL-02, the AdventureWorksDW2008 database is in the Restoring state. On HOU-SQL-01, start a Mirror task on the AdventureWorksDW2008 database. Using the Configure Database Mirroring Security Wizard, for the Mirror Server Instance, use the default instance on HOU-SQL-02. For the Service Account, use the default service account. When the wizard completes, start the mirroring session. WWhen mirroring is complete and the databases are synchronized, verify that the database state on HOU-SQL-01 is Principal, Synchronized and that on HOU-SQL-02 it is Mirror, Synchronized / Restoring. On HOU-SQL-01, stop the SQL Server service. On HOU-SQL-02, verify that the AdventureWorksDW2008 database is now in the Principal, Disconnected state. On HOU-SQL-01, start the SQL Server and SQL Server Agent services. Check the status of the databases on HOU-SQL-01 and HOU-SQL-02. Make HOU-SQL-01 the principal again by taking the HOU-SQL-02 copy of AdventureWorksDW2008 offline. Turn off the virtual machines and delete changes.

Maintaining High Availability

8-11

Lesson 4

Implementing Server Clustering


Contents:
Question and Answers 12

8-12

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


What is Server Clustering?
Question: When would clustering have advantages over database mirroring? Answer: Answers may vary, but clustering has advantages over mirroring when servers are geographically close together on a high-speed network connection, when automatic failover is a requirement, and clients may not have the capability of handling automatic failover in a mirroring scenario.

Installing SQL Server in a Cluster


Question: Where would a SQL Server cluster fit in with your organization?

Maintaining High Availability

8-13

Lesson 5

Using Distributed High Availability Solutions


Contents:
Question and Answers 14

8-14

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Considerations for Peer-to-Peer Replication
Question: Why is peer-to-peer replication often used as a high availability solution? Answer: Peer-to-peer replication is often used as a high availability solution, because it keeps up-todate databases running in different locations, resulting in good fault tolerance.

Implementing Distributed Load Balancing


Question: Do you think load balancing would help with other high availability solutions, such as clustering, database mirroring, or log shipping?

Implementing Distributed High Availability


Question: In what scenarios would you use Peer-to-Peer Replication instead of database mirroring or log shipping?

Considerations for Optimizing Database Availability


Question: In your organization, what kinds of redundancy do you currently employ?

Maintaining High Availability

8-15

Module Reviews and Takeaways


Review questions
1. When would you choose to implement a clustering solution instead of a database mirroring? Clustering is appropriate if you have compatible hardware that is listed on the HCL, and if the cluster nodes are in the same geographic location. 2. What database recovery models are suitable for use in high availability solutions? Full and bulk-logged. Simple recovery mode is not supported for any high availability solution. 3. Which high availability solutions enable automatic client redirection? Clustering and database mirroring.

Common Issues Related to Log Shipping


Identify the causes for the following common issues related to log shipping and fill in the troubleshooting tips. For answers, refer to relevant lessons in the module. Issue Clients are not redirected to the secondary server automatically. No connections can be made to the secondary database. Troubleshooting tip Log shipping does not employ automatic redirection for clients. Clients must be manually redirected. The secondary database is normally in a state which does not allow client connections. Change the database state to allow connections. SQL Server Agent jobs may have errors. Check SQL Server logs on both the primary and secondary and verify that the backup, copy, and restore jobs are working correctly. Server roles must be switched manually in a log shipping environment.

Data on the secondary database is out of date.

After switching server roles, and bringing the original primary server back online, it does not automatically become the primary server again.

Real-world Issues and Scenarios


1. The Los Angeles and Paris offices are connected via a high-speed private network connection. An online product catalog database that is currently only available on a single SQL Server in the Paris office needs a high availability solution. Which high availability solutions would be appropriate, and why? Because of the distance involved, even a high speed network connection will rule out clustering. Mirroring, log shipping, or peer-to-peer transactional replication would be good possibilities for high availability in this scenario.

Best Practices for High Availability


Supplement or modify the following best practices for your own work situations: Use database mirroring on high-bandwidth network connections. Low-bandwidth connections degrade mirroring performance.

8-16

Maintaining a Microsoft SQL Server 2008 Database

Use a mirror server that has equivalent capacity, the same SQL Server configuration, and the same SQL Server edition as the principal server, so that the mirror server can carry the full workload of the principal in the event of failover. Make sure SQL Server logins, permissions, SQL Server Agent jobs, and other related items are copied from the principal server to the mirror server, so that applications will continue to operate normally in the event of failover. SQL Server Agent jobs are normally disabled on the mirror server; make sure to enable them in the event of failover.

Maintaining High Availability

8-17

Lab Review Questions and Answers


Question: What are the SQL Server Agent jobs involved in configuring log shipping? Answer: There are three jobs: a job to backup the database, a job to copy the log files, and a job to restore the log files. Question: What recovery models are supported for high availability solutions? Answer: Full and bulk-logged. Question: What feature of the High Availability mode of database mirroring makes automatic failover possible? Answer: Use of a witness server.

Monitoring SQL Server

9-1

Module 9
Monitoring SQL Server
Contents:
Lesson 1: Viewing Current Activity Lesson 2: Using SQL Server Profiler Lesson 3: Monitoring with DDL Triggers Lesson 4: Using Event Notifications Module Reviews and Takeaways Lab Review Questions and Answers 2 5 8 11 14 15

9-2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Viewing Current Activity


Contents:
Question and Answers Detailed Demo Steps 3 4

Monitoring SQL Server

9-3

Question and Answers


Considerations for Monitoring SQL Server
Question: How have you monitored system performance in your organization?

Overview of Activity Monitor


Question: Why is it important to monitor locks? Answer: It is important to monitor locks because while locking is necessary, locks can be the cause of performance problems.

Overview of Reliability and Performance Monitor


Question: Can you think of a scenario in your organization where you might use Reliability and Performance Monitor to identify a performance issue?

Overview of Dynamic Management Views and Functions


Question: Why would you want to use dynamic management views to view current activity? Answer: Because dynamic management views can show current activity and health information that is not always available elsewhere.

How to View Activity with Dynamic Management Views


Question: What current information would you want to monitor in your organization?

Using Activity Monitor


Question: In what scenarios might you need to kill a process, and how would you kill it with Activity Monitor? Answer: Answers may vary, but a typical scenario would involve processes that are deadlocked and are causing problems by holding other transactions up. Kill the process in Activity Monitor my rightclicking it and then clicking Kill Process.

Using Dynamic Management Views


Question: In which schema are dynamic management views located? Answer: They are located in the sys system schema.

9-4

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Using Activity Monitor
This demonstration will show how to use Activity Monitor. In SQL Server Management Studio, open Activity Monitor and review the information available, process information, and how to kill a process.

Using Dynamic Management Views


This demonstration will show how use dynamic management views (DMV's) to view SQL Server performance information. Use any of the views listed to show information about SQL Server activity: o o o o o o o sys.dm_db_partition_stats sys.dm_exec_sessions sys.dm_io_pending_io_requests sys.dm_os_memory_pools sys.dm_os_threads sys.dm_broker_queue_monitors sys.dm_tran_locks

Monitoring SQL Server

9-5

Lesson 2

Using SQL Server Profiler


Contents:
Question and Answers Detailed Demo Steps 6 7

9-6

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Overview of SQL Server Profiler
Question: When might you want to trace SQL Server activity? Answer: There are several different scenarios, but commonly, tracing SQL Server activity is often used to resolve query/application performance problems.

SQL Server Profiler Trace Options


Question: How do SQL Server Profiler templates help you trace activity? Answer: Templates can be used to reduce the time to setup a trace, and can be easily moved to other SQL Servers.

Trace Categories, Events, and Columns


Question: What are some examples of SQL Server events that you can trace with Profiler? Answer: There are many; some of the common SQL Server events traced with Profiler are T-SQL statements and security information.

Using SQL Server Profiler


Question: How can you limit the amount of data SQL Server Profiler collects during a trace? Answer: By using filters, and by selecting only the events you specifically need to monitor.

Monitoring SQL Server

9-7

Detailed Demo Steps


Demonstration: Using SQL Server Profiler
This demonstration will show how to create a new trace using SQL Server Profiler. It will also show how to use the trace and modify the trace options and column filters. It will also demonstrate how to save the trace to a file. Start SQL Server Profiler and create a new trace called SP_PerformanceTrace. Configure the trace to capture events that relate to Stored Procedure event classes (SP:Completed, SP:Starting, SP:StmtCompleted and SP:StmtStarting), and TSQL event classes (SQL:BatchStarting and SQL:BatchCompleted). Include all necessary data columns in the trace and group by ClientProcessID. Configure the trace to be saved to E:\Mod09\Demofiles and clear the Enable file rollover option. Start the trace. After the trace generates some data stop the trace and review it. Click the some of the events and review trace information in the lower pane.

9-8

Maintaining a Microsoft SQL Server 2008 Database

Lesson 3

Monitoring with DDL Triggers


Contents:
Question and Answers Detailed Demo Steps 9 10

Monitoring SQL Server

9-9

Question and Answers


Overview of DDL Triggers
Question: What kind of activity would you want to monitor in your organization using DDL triggers?

Creating DDL Triggers


Question: What scope would you use for a trigger designed to monitor login activity? Answer: Login activity would be monitored using a server-scoped trigger.

Managing DDL Triggers


Question: Why might you want to encrypt a DDL trigger? Answer: Encrypting DDL triggers prevents their definition from being viewed by unauthorized users, so encryption would be useful in cases where you dont want users to see what conditions will cause a trigger to fire.

Using DDL Triggers


Question: What are the three parameters of RAISERROR used for? Answer: The first parameter specifies the error message or error ID. The second parameter specifies the severity of the error, and the third parameter specifies the error state. You can customize RAISERROR severities, states, and ID's to help identify which sections of code cause errors.

9-10

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Using DDL Triggers
This demonstration will show how to create and manage a DDL Trigger. It will also demonstrate how to test the DDL Trigger. Start SQL Server Management Studio and connect to the database engine on NY-SQL-01. Open the file E:\Mod09\Democode\SafetyTrigger.sql. Review the code and then execute the part of the code that creates the trigger. Execute the part of the code that attempts to drop the Sales.vPersonDemographics view. Review the error information. View the current SQL Server log file and verify that there are messages generated by the Safety trigger. Execute the part of the code that disables the trigger. Execute the part of the code that attempts to drop the Sales.vPersonDemographics view. The view should be dropped this time.

Monitoring SQL Server

9-11

Lesson 4

Using Event Notifications


Contents:
Question and Answers Detailed Demo Steps 12 13

9-12

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


Overview of Event Notifications
Question: When might you use an event notification instead of a DDL trigger? Answer: There are several cases, but commonly, you might want to use an event notification to respond to a SQL Trace event, or if you need to respond to events without using any resources defined by the immediate transaction.

Processing Event Notifications


Question: What is the importance of queues for event notifications? Answer: The Service Broker queue receives the messages for event notifications.

Managing Event Notifications


Question: If you drop an event notification, should you also drop the queue it used? Answer: No, you do not necessarily need to drop the queue.

Implementing Event Notifications


Question: What role does Service Broker play in event notifications? Answer: Service Broker processes the event notification messages.

Monitoring SQL Server

9-13

Detailed Demo Steps


Demonstration: Implementing Event Notifications
In this demonstration, you will configure log shipping to ship transaction logs from one SQL Server to another to create a warm standby. Start 6231A-HOU-DC-01, 6231A-HOU-SQL-01, and 6231A-HOU-SQL-02. Log on to HOU-SQL-01 and HOU-SQL-02 as Adventureworks\Administrator. On HOU-SQL-01, use SQL Server Management Studio to connect to the database engine on HOU-SQL-02. Open E:\Mod08\Democode\EnableFilestream.sql and execute the query to FILESTREAM access. On HOU-SQL-01, change the AdventureWorks2008 database recovery model to Full. Enable AdventureWorks2008 as the primary database in a log shipping configuration. Set the Network path to backup folder to \\HOU-SQL-01\Backup. Set the local path to the backup folder to C:\Backup. Create a schedule called LogShippingBackup and set the interval to every 5 minutes. In the Secondary databases section, add HOU-SQL-02, and set the destination folder to C:\LSBackup. Create a copy schedule called HOU-SQL-02_CopyJob and set the interval to every 5 minutes. Set the database state when restoring backups to Standby mode. Create a restore schedule called HOU-SQL-02_Restore job and set the interval to every 5 minutes. Save the log shipping configuration. Use SQL Server Management Studio to check the status of the AdventureWorks2008 database on HOU-SQL-02. Use the Job Activity Monitor to check the status of SQL Server Agent jobs on HOU-SQL-01 and HOU-SQL-02. On HOU-SQL-01, open E:\Mod08\Democode\InsertNewCurrency.sql and execute the query to insert a new product into the Sales.Currency table. On HOU-SQL-02, open E:\Mod08\Democode\SelectNewCurrency.sql and execute the query to verify that the Ukranian currency appears in the AdventureWorks2008 database on HOUSQL-02. Turn off HOU-SQL-01 and HOU-SQL-02 and delete changes.

9-14

Maintaining a Microsoft SQL Server 2008 Database

Module Reviews and Takeaways


Review questions
1. How do DDL triggers and event notifications differ from one another? DDL triggers run within the scope of a transaction and can roll back transactions. Event Notifications run outside the scope of the transaction, and cannot roll back transactions. DDL triggers do not use Service Broker. Event Notifications are not limited to DDL events, and only DDL triggers use the EVENTDATA function. 2. What kinds of information can you view using dynamic management views? With dynamic management views, you can get server state information that can be used to monitor the health of a server instance, diagnose problems, and tune performance. 3. How can you determine how specific SQL statements affect server performance? You can use SQL Server Profiler to determine how specific statements affect performance, and you can also use the Recent Expensive Queries section of Activity Monitor to review recent queries that have had the most significant impact on performance.

Common Issues related to DDL Triggers


Identify the causes for the following common issues related to report access and fill in the troubleshooting tips. For answers, refer to relevant lessons in the module. Issue I need to audit changes to data inside tables, but cannot find how to do this using a DDL trigger. I get an error creating the DDL trigger. Troubleshooting tip DDL triggers cannot monitor changes to table data. Table structure and metadata can be monitored using DDL. Make sure you are specifying the correct scope for the action you are trying to audit. DDL monitoring is on the server scope or the database scope, depending on the event you want to monitor. Not all DDL events can be used to fire DDL triggers, including the ADD_ROLE_MEMBER DDL event. See SQL Server Books online for documentation on DDL events. Use event notifications for these events.

I want to audit additions to role membership, which is a DDL event. However, the DDL trigger I designed does not work.

Best Practices for using SQL Server Profiler


Supplement or modify the following best practices for your own work situations: Limit the number of events you trace to reduce the amount of data you have to review. Make sure to trace the time-related columns if you want to correlate SQL Server Profiler data with performance data from Reliability and Performance Monitor. Use trace templates to help automate traces you perform regularly.

Monitoring SQL Server

9-15

Lab Review Questions and Answers


Question: How can you find out how specific SQL statements impact performance? Answer: Use SQL Server Profiler to generate trace data, and correlate that with performance data from Reliability and Performance Monitor. Question: How would you scope a DDL trigger that monitors alterations to a database? Answer: Database alterations require a database-scoped DDL trigger. Question: How would you scope an event notification that monitors locking-related events? Answer: Locking-related events are scoped at the server level.

Performance Tuning and Troubleshooting

10-1

Module 10
Performance Tuning and Troubleshooting
Contents:
Lesson 1: Troubleshooting SQL Server Lesson 2: Performance Tuning in SQL Server Lesson 3: Using Resource Governor Lesson 4: Using Data Collector Module Reviews and Takeaways Lab Review Questions and Answers 2 5 8 12 15 17

10--2

Maintaining a Microsoft SQL Server 2008 Database

Lesson 1

Troubleshooting SQL Server


Contents:
Question and Answers Detailed Demo Steps 3 4

Performance Tuning and Troubleshooting

10-3

Question and Answers


SQL Server Troubleshooting Methodology
Question: How have you resolved technical problems in your organization?

Troubleshooting Connectivity
Question: How can DNS resolution affect connectivity? Answer: DNS provides name-to-IP address resolution. If a DNS server cannot resolve the name of a server, a connection to a server by name will likely timeout, causing the connection to fail.

Concurrency Concepts
Question: When would it be appropriate to use optimistic concurrency control? Answer: In scenarios where there is low contention for data, optimistic concurrency may be appropriate.

Troubleshooting Disk Space Problems


Question: Why can databases still have disk space problems with autogrow enabled? Answer: Autogrow may cause physical disk space to be used up. Even with autogrow enabled, SQL Server still may run out of space if the data file or transaction log fills before the space is grown in high-volume environments.

Troubleshooting Concurrency Problems


Question: How does Activity Monitor help identify concurrency problems? Answer: Activity Monitor monitors locks, processes, and resource waits, so can help identify the root session ID and the activity associated with each ID.

10--4

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Troubleshooting Concurrency Problems
This demonstration will show how to troubleshoot concurrency problems. On HOU-SQL-01, start SQL Server Management Studio and connect to the Database Engine on HOU-SQL-01. Start Activity Monitor and view the Processes page. In Windows Explorer, browse to E:\Mod10\Democode. Double-click RunQuery1.cmd and then double-click RunQuery2.cmd. In Activity Monitor, refresh the view and in the Database list, click AdventureWorks2008. Refresh the view until only a single process is listed and make a note of the Process ID value. Right-click the row and then click Kill Process. Note: You may receive an error message if the deadlock has already been timed out. Close Activity Monitor and Windows Explorer.

Performance Tuning and Troubleshooting

10-5

Lesson 2

Performance Tuning in SQL Server


Contents:
Question and Answers Detailed Demo Steps 6 7

10--6

Maintaining a Microsoft SQL Server 2008 Database

Question and Answers


What is Performance Tuning?
Question: How would database applications in your organization benefit from performance tuning?

How Indexes Affect Performance


Question: What database applications in your organization would benefit from indexing?

Using the Database Engine Tuning Advisor


Question: What aspects of a database cannot be tuned using the Database Engine Tuning Advisor? Answer: Most aspects of a database cannot be tuned with the DTA. The DTA will not recommend changes to data types, normalization, queries, and so on. The DTA is index-oriented.

Introduction to Query Tuning


Question: What is the purpose of the execution plan in the context of query tuning? Answer: The execution plan shows how SQL Server processes the query and can show which parts of a query use the most resources.

Using the Database Engine Tuning Advisor


Question: What importance does the workload play in using the Database Engine Tuning Advisor? Answer: The workload is a sample of typical queries that are run on the database. In order to effectively tune your index, the workload should be representative of queries that are run by users or database applications on that particular database.

Performance Tuning and Troubleshooting

10-7

Detailed Demo Steps


Demonstration: Query Tuning
This demonstration will show how to perform query tuning. Click Start, point to All Programs, point to Microsoft SQL Server 2008, and click SQL Server Management Studio. Connect to NY-SQL-01 using Windows Authentication. Open the E:\Mod10\Democode\QTSetup.sql file and execute the query. Open the E:\Mod10\Democode\QTQueries.sql file and examine the queries in this file (there are four queries). Open the E:\Mod10\Democode\CreateTables.sql file and examine the scripts used to create the tables. In SQL Server Management Studio, return to the QTQueries.sql file. On the Query menu, click Include Actual Execution Plan. On the Query menu, click Execute. Wait for the query to finish executing. Click the Execution Plan tab in the bottom pane of the query window, and review the execution plans for the four queries. Notice that each query includes a table scan of the ProductData.Product table. Open the file E:\Mod10\Democode\DatabaseStats.sql. Execute the query and notice that the AUTO_CREATE STATISTICS and AUTO_UPDATE_STATISTICS settings are not enabled. Open the file E:\Mod10\Democode\ShowDBStatistics.sql and execute the query.

Demonstration: Using the Database Engine Tuning Advisor


This demonstration will show how to use the Database Engine Tuning Advisor. Start the Database Engine Tuning Advisor and connect to HOU-SQL-01. Create a new session named AWLT2008_Tuning. For the workload file, use E:\Mod10\Democode\SampleWorkload.sql. Select the AdventureWorksLT2008 database for workload analysis. On the Tuning Options tab, in the Physical Design Structures (PDS) to use in database section, select Indexes and indexed views. In the Physical Design Structures (PDS) to keep in database section, click Keep clustered indexes only. Start the analysis. When the analysis is complete, review the recommendations on the Recommendations tab. View the Workload analysis report. Apply all recommendations and then close the Database Engine Tuning Advisor.

10--8

Maintaining a Microsoft SQL Server 2008 Database

Lesson 3

Using Resource Governor


Contents:
Question and Answers Detailed Demo Steps 9 10

Performance Tuning and Troubleshooting

10-9

Question and Answers


Introducing Resource Governor
Question: Which SQL Server resources cannot be limited using Resource Governor? Answer: Resource Governor cannot be used to limit physical or logical disk resources, network resources, or other resources. It can only limit memory and CPU resources.

Resource Governor Concepts


Question: What is the relationship between resource pools and workload groups? Answer: Resource pools are assigned to workload groups by classification functions.

Monitoring Resource Governor


Question:Why do you need to monitor Resource Governor? Answer: Resource Governor should be monitored to ensure that the workload groups are functioning as intended to control access to CPU and memory resources.

Configuring Resource Governor


Question: How does Resource Governor determine whether to limit SQL Server resources? Answer: The Resource Governor uses the results of the classifier function to determine whether or not resources should be limited.

10--10

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Configuring Resource Governor
This demonstration will show how to configure and use Resource Governor. On HOU-SQL-01, start SQL Server Management Studio and connect to the Database Engine on HOU-SQL-01. Create a SQL Server login for the AdventureWorks\AW_Backup user, and grant the user the VIEW SERVER STATE privilege. Create a user in the AdventureWorks2008 database for the AW_Backup login, and make it a member of the db_backupoperator role. In Object Explorer, expand Management. Under Management, right-click Resource Governor and then click Enable. In Windows Explorer, browse to E:\Mod10\Labfiles\Starter. Open the RG_LimitCPU.sql file and then execute the script. Start Reliability and Performance Monitor. Right-click Performance Monitor, point to New, and then click Data Collector Set. Name the collector set AW_BackupPerf. In the Root directory field, change the directory to E:\MOD10\Labfiles\Starter\AW_BackupPerf, click Next and then click Finish. In the console tree, expand Data Collector Sets, expand User Defined, and then click AW_BackupPerf. In the right pane, right-click System Monitor Log and then click Properties. In the System Monitor Log Properties dialog box, click Add. In the Add Counters dialog box, add the counters listed to the log: Process - % Processor Time - sqlservr, SQLServer:Resource Pool Stats - CPU usage % - pMAX_CPU_PERCENT_20, SQLServer:Workload Group Stats - CPU usage % -gMAX_CPU_PERCENT_20 When all the counters have been added, set the data collector to save to a file named AW_BackupPerf. Start the AW_BackupPerf log. Start SQL Server Profiler on HOU-SQL-01. Create a new trace called AW_BackupTrace. Set the trace to be saved to the E:\Mod10\Labfiles\Starter folder. Select the following events in addition to the default events: Showplan:All, Scan:Started, Audit:Login, Audit:Logout, Audit Backup / Restore Event, SQL:StmtStarting, SQLTransaction Run the trace. On HOU-SQL-03, login as AdventureWorks\AW_Backup with the password Pa$$w0rd. Start SQL Server Management Studio and connect to the Database Engine on HOU-SQL-01.

Performance Tuning and Troubleshooting

10-11

Backup the AdventureWorks2008 database with the NOFORMAT, NOINIT, and COMPRESSION options enabled. On HOU-SQL-01, stop the SQL Server Profiler trace. In Reliability and Performance Monitor, stop AW_Backup_Perf. In SQL Server Profiler, open the E:\Mod10\Labfiles\Starter\AW_BackupTrace.trc file. Import performance data from E:\Mod10\Labfiles\Starter\AW_BackupPerf\AW_BackupPerf.blg and choose to import all performance counters. Search for the text BACKUP DATABASE. In the graph, find the SQLServer: Workload Group Stats and SQLServer: Resource Pool Stats counters. Take notice of the Min Value, Max Value, and Avg Value values for the counters. Close SQL Server Profiler and Reliability and Performance Monitor. Turn off HOU-DC-01, HOU-SQL-01 and HOU-SQL-03.

10--12

Maintaining a Microsoft SQL Server 2008 Database

Lesson 4

Using Data Collector


Contents:
Question and Answers Detailed Demo Steps 13 14

Performance Tuning and Troubleshooting

10-13

Question and Answers


Introducing Data Collector
Question: How do you think Data Collector would help your organization?

Data Collector Concepts


Question: What kinds of data providers might you use for data collection?

Configuring Data Collector


Question: What default reports are available through Data Collector? Answer: There are several different types of default reports available; discuss some of the different ones with students.

10--14

Maintaining a Microsoft SQL Server 2008 Database

Detailed Demo Steps


Demonstration: Configuring Data Collector
This demonstration will show how to implement Data Collector. Start SQL Server Management Studio and connect to the Database Engine on NY-SQL-01. Start the Configure Management Data Warehouse Wizard. Configure the data warehouse to be stored on NY-SQL-01, with a database name of DC_Warehouse. Set the cache directory to E:\Mod10\Labfiles\Starter. In the Map Logins and Users page, in the Users mapped to this login field, select BUILTIN\Administrators. In the Database role membership for DC_Warehouse field, select mdw_admin to populate all three checkboxes. In the Map Logins and Users page, in the Users mapped to this login field, select NY-SQL01\sqlserver. In the Database role membership for DC_Warehouse field, select mdw_admin to populate all three checkboxes. Click Next and then click Finish. When configuration is complete, click Close. In Object Explorer, expand Data Collector, and then expand System Data Collection Sets. Right-click Disk Usage, point to Reports, point to Historical, and then click Disk Usage Summary. When the report appears, review the data. In the report pane, click AdventureWorks2008. Review the Data Files Space Usage and Transaction Log Space Usage charts. Close SQL Server Management Studio. Turn off NY-SQL-01 and delete changes.

Performance Tuning and Troubleshooting

10-15

Module Reviews and Takeaways


Review questions
1. What are the main components of Resource Governor? Workload Groups and Resource Pools 2. How can indexes affect database performance? Indexes can improve performance by reducing table scans, resulting in rows being found faster. 3. What is the default concurrency control for SQL Server? Pessimistic Concurrency Control

Common Issues related to report access


Identify the causes for the following common issues related to report access and fill in the troubleshooting tips. For answers, refer to relevant lessons in the module. Issue Updates on data are lost. Troubleshooting tip You may be using optimistic concurrency control. Consider using pessimistic concurrency control with locking to prevent lost updates. You may have the LOCK_ESCALATION of ALTER TABLE set to AUTO. Change LOCK_ESCALATION to TABLE. Transactions that include user interaction are prone to deadlocking. Try to rewrite the application to avoid these types of transactions. Try running at a lower isolation level, or a Row Versioning-based isolation level.

I have deadlocking problems on a partitioned table.

I have deadlocking issues with transactions that interact with users. I still have significant locking related issues.

Real-world Issues and Scenarios


1. A database application has worked well with good performance. Recently, users have begun to complain that the application is slow. Where would you begin to look? Start by determining if there are particular times or operations that result in slow performance for users. Follow the SQL Server Troubleshooting Methodology to narrow down the possible causes of the performance problems.

Best Practices for Query Tuning


Supplement or modify the following best practices for your own work situations: If the query uses cursors, determine if the cursor query could be written using either a more efficient cursor type (such as fast forward-only) or a single query. Single queries typically outperform cursor operations. If an application uses a loop, consider putting the loop inside the query. Often an application contains a loop that contains a parameterized query, which is executed many times and requires a network round trip between the computer running the application and SQL Server. Instead,

10--16

Maintaining a Microsoft SQL Server 2008 Database

create a single, more complex query using a temporary table. Only one network round trip is necessary, and the query optimizer can better optimize the single query. Do not use multiple aliases for a single table in the same query to simulate index intersection. This is no longer necessary because SQL Server automatically considers index intersection and can make use of multiple indexes on the same table in the same query.

Performance Tuning and Troubleshooting

10-17

Lab Review Questions and Answers


Question: How can you verify that Resource Governor is limiting access to resources correctly? Answer: Use Profiler and Performance monitor to trace data and performance information. Question: When using Database Engine Tuning Advisor, what can you use for a sample workload? Answer: A file with T-SQL queries or a table. Question: How do you kill a process causing a lock? Answer: Use Activity Monitor to locate the Process ID and then kill that process.

Maintaining a Microsoft SQL Server 2008 Database

R-1

Resources
Contents:
Microsoft Learning Technet and MSDN Content Communities 2 3 21

R-2

Maintaining a Microsoft SQL Server 2008 Database

Microsoft Learning
This section describes various Microsoft Learning programs and offerings. Microsoft Skills Assessments Describes the skills assessment options available through Microsoft Microsoft Learning Describes the training options available through Microsoft face-to-face or self-paced Microsoft Certification Program Details how to become a Microsoft Certified Professional, Microsoft Certified Database Administrators, and more Microsoft Learning Support o o To provide comments or feedback about the course, send e-mail to support@mscourseware.com. To ask about the Microsoft Certification Program (MCP), send e-mail to mcphelp@microsoft.com

Maintaining a Microsoft SQL Server 2008 Database

R-3

Technet and MSDN Content


This section includes content from Microsoft TechNet and MSDN that provides in-depth discussion on technical topics related to SQL Server 2008.

Module 1
For more information on Version and Edition Upgrades, see "Version and Edition Upgrades", http://go.microsoft.com/fwlink/?LinkID=127393 For more information on SQL Server 2005 Features Comparison, see "SQL Server 2005 Features Comparison", http://go.microsoft.com/fwlink/?LinkID=127394 For more information on Windows Essential Business Server Overview, see "Windows Essential Business Server Overview", http://go.microsoft.com/fwlink/?LinkID=127395 For more information on Hardware and Software Requirements for Installing SQL Server 2008, see "Hardware and Software Requirements for Installing SQL Server 2008", http://go.microsoft.com/fwlink/?LinkID=127396 For more information on Check Parameters for the System Configuration Checker, see "Check Parameters for the System Configuration Checker", http://go.microsoft.com/fwlink/?LinkID=127397 For more information on SQL Server Browser Service, see "SQL Server Browser Service", http://go.microsoft.com/fwlink/?LinkID=127398 For more information on Multiple Instances of SQL Server, see "Multiple Instances of SQL Server", http://go.microsoft.com/fwlink/?LinkID=127399 For more information on Virtualization and Multiple Instances, see "Virtualization and Multiple Instances", http://go.microsoft.com/fwlink/?LinkID=127401 For more information on Taking the pain - and some costs - out of upgrading, see "Taking the pain - and some costs - out of upgrading", http://go.microsoft.com/fwlink/?LinkID=127402 For more information on Security Considerations for a SQL Server Installation, see "Security Considerations for a SQL Server Installation", http://go.microsoft.com/fwlink/?LinkID=127403 For more information on Security and Protection (Database Engine), see "Security and Protection (Database Engine)", http://go.microsoft.com/fwlink/?LinkID=127404 For more information on Security Considerations for Databases and Database Applications, see "Security Considerations for Databases and Database Applications", http://go.microsoft.com/fwlink/?LinkID=127405 For more information on Security Considerations for SQL Server, see "Security Considerations for SQL Server", http://go.microsoft.com/fwlink/?LinkID=127406 For more information on Using SQL Server Collations, see "Using SQL Server Collations", http://go.microsoft.com/fwlink/?LinkID=127407 For more information on Selecting a SQL Server Collation, see "Selecting a SQL Server Collation", http://go.microsoft.com/fwlink/?LinkID=127408 For more information on Collation and Unicode Support, see "Collation and Unicode Support", http://go.microsoft.com/fwlink/?LinkID=127409

R-4

Maintaining a Microsoft SQL Server 2008 Database

For more information on How to: Upgrade to SQL Server 2008 (Setup), see "How to: Upgrade to SQL Server 2008 (Setup)", http://go.microsoft.com/fwlink/?LinkID=127410 For more information on Using Upgrade Advisor to Prepare for Upgrades, see "Using Upgrade Advisor to Prepare for Upgrades", http://go.microsoft.com/fwlink/?LinkID=127411 For more information on Working with Multiple Versions and Instances of SQL Server, see "Working with Multiple Versions and Instances of SQL Server", http://go.microsoft.com/fwlink/?LinkID=127412 For more information on How to: Install SQL Server 2008 (Setup), see "How to: Install SQL Server 2008 (Setup)", http://go.microsoft.com/fwlink/?LinkID=127413 For more information on System Configuration Check (SCC), see "System Configuration Check (SCC)", http://go.microsoft.com/fwlink/?LinkID=127415 For more information on Quick-Start Installation of SQL Server 2008, see "Quick-Start Installation of SQL Server 2008", http://go.microsoft.com/fwlink/?LinkID=127416 For more information on Editions and Components of SQL Server 2008, see "Editions and Components of SQL Server 2008", http://go.microsoft.com/fwlink/?LinkID=127417 For more information on File Locations for Default and Named Instances of SQL Server, see "File Locations for Default and Named Instances of SQL Server", http://go.microsoft.com/fwlink/?LinkID=127418 For more information on Installing SQL Server Analysis Services by Using Setup, see "Installing SQL Server Analysis Services by Using Setup", http://go.microsoft.com/fwlink/?LinkID=127419 For more information on Notification Services Enhancements, see "Notification Services Enhancements", http://go.microsoft.com/fwlink/?LinkID=127420 For more information on How to: Install SQL Server 2008 from the Command Prompt, see "How to: Install SQL Server 2008 from the Command Prompt", http://go.microsoft.com/fwlink/?LinkId=127672 For more information on Running Setup to Install SQL Server 2000 (64-bit), see "Running Setup to Install SQL Server 2000 (64-bit)", http://go.microsoft.com/fwlink/?LinkID=127421 For more information on SQL Server Configuration Manager, see "SQL Server Configuration Manager", http://go.microsoft.com/fwlink/?LinkID=127423 For more information on Backward Compatibility, see "Backward Compatibility", http://go.microsoft.com/fwlink/?LinkID=127424 For more information on Introducing SQL Server Management Studio, see "Introducing SQL Server Management Studio", http://go.microsoft.com/fwlink/?LinkId=127673 For more information on SQL Server Studios Overview, see "SQL Server Studios Overview", http://go.microsoft.com/fwlink/?LinkID=127425 For more information on Visual SourceSafe 2005, see "Visual SourceSafe 2005", http://go.microsoft.com/fwlink/?LinkID=127426 For more information on Using the sqlcmd Utility, see "Using the sqlcmd Utility", http://go.microsoft.com/fwlink/?LinkID=127427 For more information on Tutorial: sqlcmd Utility, see "Tutorial: sqlcmd Utility", http://go.microsoft.com/fwlink/?LinkID=127428

Maintaining a Microsoft SQL Server 2008 Database

R-5

For more information on Using a Dedicated Administrator Connection, see "Using a Dedicated Administrator Connection", http://go.microsoft.com/fwlink/?LinkID=127429 For more information on How to: Use the Dedicated Administrator Connection with SQL Server Management Studio, see "How to: Use the Dedicated Administrator Connection with SQL Server Management Studio", http://go.microsoft.com/fwlink/?LinkID=127430 For more information on sqlcmd Utility, see "sqlcmd Utility", http://go.microsoft.com/fwlink/?LinkID=127431 For more information on SQL Server PowerShell Overview, see "SQL Server PowerShell Overview", http://go.microsoft.com/fwlink/?LinkID=127432 For more information on Using the SQL Server cmdlets, see "Using the SQL Server cmdlets", http://go.microsoft.com/fwlink/?LinkID=127433 For more information on Using the SQL Server PowerShell Provider, see "Using the SQL Server PowerShell Provider", http://go.microsoft.com/fwlink/?LinkID=127434 For more information on sqlps Utility, see "sqlps Utility", http://go.microsoft.com/fwlink/?LinkId=127674 For more information on Using the Invoke-Sqlcmd cmdlet, see "Using the Invoke-Sqlcmd cmdlet", http://go.microsoft.com/fwlink/?LinkID=127435 For more information on Using CLR Integration in SQL Server 2005, see "Using CLR Integration in SQL Server 2005", http://go.microsoft.com/fwlink/?LinkID=127436

Module 2
For more information on Files and Filegroups Architecture, see "Files and Filegroups Architecture", http://go.microsoft.com/fwlink/?LinkID=127437 For more information on Understanding Files and Filegroups, see "Understanding Files and Filegroups", http://go.microsoft.com/fwlink/?LinkID=127438 For more information on File Locations for Default and Named Instances of SQL Server, see "File Locations for Default and Named Instances of SQL Server", http://go.microsoft.com/fwlink/?LinkID=127439 For more information on Capacity Planning for tempdb, see "Capacity Planning for tempdb", http://go.microsoft.com/fwlink/?LinkID=127440 For more information on tempdb Database, see "tempdb Database", http://go.microsoft.com/fwlink/?LinkID=127441 For more information on Understanding Pages and Extents, see "Understanding Pages and Extents", http://go.microsoft.com/fwlink/?LinkID=127442 For more information on Transaction Log Physical Architecture, see "Transaction Log Physical Architecture", http://go.microsoft.com/fwlink/?LinkID=127443 For more information on Physical Database Architecture, see "Physical Database Architecture", http://go.microsoft.com/fwlink/?LinkID=127444 For more information on Database Architecture, see "Database Architecture", http://go.microsoft.com/fwlink/?LinkID=127445

R-6

Maintaining a Microsoft SQL Server 2008 Database

For more information on Introduction to Transaction Logs, see "Introduction to Transaction Logs", http://go.microsoft.com/fwlink/?LinkId=127675 For more information on Using Files and Filegroups, see "Using Files and Filegroups", http://go.microsoft.com/fwlink/?LinkID=127446 For more information on Creating Filegroups, see "Creating Filegroups", http://go.microsoft.com/fwlink/?LinkID=127447 For more information on Microsoft SQL Server 7.0 Storage Engine Capacity Planning Tips, see "Microsoft SQL Server 7.0 Storage Engine Capacity Planning Tips", http://go.microsoft.com/fwlink/?LinkID=127448 For more information on Partitioned Tables and Indexes in SQL Server 2005, see "Partitioned Tables and Indexes in SQL Server 2005", http://go.microsoft.com/fwlink/?LinkID=127449 For more information on Maximum Capacity Specifications for SQL Server 2008, see "Maximum Capacity Specifications for SQL Server 2008", http://go.microsoft.com/fwlink/?LinkID=127450 For more information on Expanding a Database, see "Expanding a Database", http://go.microsoft.com/fwlink/?LinkID=127451 For more information on Designing Databases, see "Designing Databases", http://go.microsoft.com/fwlink/?LinkID=127452 For more information on Setting Database Options, see "Setting Database Options", http://go.microsoft.com/fwlink/?LinkID=127453 For more information on Creating, Altering, and Removing Databases, see "Creating, Altering, and Removing Databases", http://go.microsoft.com/fwlink/?LinkID=127454 For more information on CREATE DATABASE (Transact-SQL), see "CREATE DATABASE (TransactSQL)", http://go.microsoft.com/fwlink/?LinkID=127455 For more information on Creating Databases, see "Creating Databases", http://go.microsoft.com/fwlink/?LinkID=127456 For more information on Database Options, see "Database Options", http://go.microsoft.com/fwlink/?LinkID=127457 For more information on Shrinking a Database, see "Shrinking a Database", http://go.microsoft.com/fwlink/?LinkID=127459 For more information on Understanding the Database Schemas, see "Understanding the Database Schemas", http://go.microsoft.com/fwlink/?LinkID=127460 For more information on Database Schemas (General Page), see "Database Schemas (General Page)", http://go.microsoft.com/fwlink/?LinkID=127461 For more information on Schemas in AdventureWorks, see "Schemas in AdventureWorks", http://go.microsoft.com/fwlink/?LinkID=127462 For more information on CREATE SCHEMA (Transact-SQL), see "CREATE SCHEMA (Transact-SQL)", http://go.microsoft.com/fwlink/?LinkId=127677 For more information on How to: Create a Central Management Server and Server Group (SQL Server Management Studio), see "How to: Create a Central Management Server and Server Group (SQL Server Management Studio)", http://go.microsoft.com/fwlink/?LinkID=127463

Maintaining a Microsoft SQL Server 2008 Database

R-7

For more information on Administering Multiple Servers Using Central Management Servers, see "Administering Multiple Servers Using Central Management Servers", http://go.microsoft.com/fwlink/?LinkID=127464 For more information on Administering Servers by Using Policy-Based Management, see "Administering Servers by Using Policy-Based Management", http://go.microsoft.com/fwlink/?LinkID=127466 For more information on Tutorial: Administering Servers by Using Policy-Based Management, see "Tutorial: Administering Servers by Using Policy-Based Management", http://go.microsoft.com/fwlink/?LinkID=127467 For more information on Policy-Based Management How-to Topics, see "Policy-Based Management How-to Topics", http://go.microsoft.com/fwlink/?LinkID=127468

Module 3
For more information about the different backup options, see Backup Overview, http://go.microsoft.com/fwlink/?LinkID=127592 For more information about three recovery models, see Recovery Model Overview, http://go.microsoft.com/fwlink/?LinkID=127619 For more information about the different backup and restore strategies, see Introduction to Backup and Restore Strategies in SQL Server, http://go.microsoft.com/fwlink/?LinkID=127613 For more information about using full database backups, see Full Database Backups, http://go.microsoft.com/fwlink/?LinkID=127601 For more information about using transaction log backups, see Working with Transaction Log Backups, http://go.microsoft.com/fwlink/?LinkID=127631 For more information about using backup media, see Working with Backup Media in SQL Server, http://go.microsoft.com/fwlink/?LinkID=127630 For more information about database role permissions, see Permissions of Fixed Database Roles, http://go.microsoft.com/fwlink/?LinkID=127618 For more information about the different database-level roles, see Database-Level Roles, http://go.microsoft.com/fwlink/?LinkID=127598 For more information about how to check database integrity, see Check Database Integrity Task, http://go.microsoft.com/fwlink/?LinkID=127514 For more information about checking database integrity as part of a maintenance plan, see Check Database Integrity Task (Maintenance Plan), http://go.microsoft.com/fwlink/?LinkID=127593 For more information about DBCC CHECKDB transact-SQL statement, see DBCC CHECKDB (Transact-SQL), http://go.microsoft.com/fwlink/?LinkID=127599 For more information about how to create transaction log backups, see Creating Transaction Log Backups, http://go.microsoft.com/fwlink/?LinkID=127596 For more information about backing up a transaction log with SQL Server Management Studio, see How to: Back Up a Transaction Log (SQL Server Management Studio), http://go.microsoft.com/fwlink/?LinkID=127610

R-8

Maintaining a Microsoft SQL Server 2008 Database

For more information about backing up a transaction log with Transact-SQL, see How to: Create a Transaction Log Backup (Transact-SQL), http://go.microsoft.com/fwlink/?LinkID=127612 For more information about performing Differential Backups, see Using Differential Backups, http://go.microsoft.com/fwlink/?LinkID=127627 For more information about Differential database backups, see Differential Database Backups, http://go.microsoft.com/fwlink/?LinkID=127600 For more information about Full File backups, see Full File Backups, http://go.microsoft.com/fwlink/?LinkID=127602 For more information about backing up files and filegroups using SQL Server Management Studio, see How to: Back Up Files and Filegroups (SQL Server Management Studio), http://go.microsoft.com/fwlink/?LinkID=127611 For more information about Tail-Log backups, see Tail-Log Backups, http://go.microsoft.com/fwlink/?LinkID=127625 For more information about Copy-Only backups, see Copy-Only Backups, http://go.microsoft.com/fwlink/?LinkID=127595 For more information about backup compression, see Backup Compression, http://go.microsoft.com/fwlink/?LinkID=127591 For more information about how to use Mirrored Backup Media Sets, see Using Mirrored Backup Media Sets, http://go.microsoft.com/fwlink/?LinkID=127628 For more information about how to verify backups, see Verifying Backups, http://go.microsoft.com/fwlink/?LinkID=127629 For more information about the different restore and recovery options, see Restore and Recovery Overview, http://go.microsoft.com/fwlink/?LinkID=127621 For more information about how restore and recovery works in SQL Server, see Understanding How Restore and Recovery of Backups Work in SQL Server, http://go.microsoft.com/fwlink/?LinkID=127626 For more information about the RESTORE Transact-SQL statement, see RESTORE (Transact-SQL), http://go.microsoft.com/fwlink/?LinkID=127620 For more information about restoring a transaction log, see Restore Transaction Log, http://go.microsoft.com/fwlink/?LinkID=127623 For more information about restoring a transaction log using SQL Server Management Studio, see How to Restore a Transaction Log Backup (SQL Server Management Studio), http://go.microsoft.com/fwlink/?LinkID=127605 For more information about the different arguments for the RESTORE Transact-SQL statement, see RESTORE Arguments (Transact-SQL), http://go.microsoft.com/fwlink/?LinkID=127622 For more information about online restores, see Performing Online Restores, http://go.microsoft.com/fwlink/?LinkID=127615 For more information about page restores, see Performing Page Restores, http://go.microsoft.com/fwlink/?LinkID=127616 For more information about file restores, see Performing File Restores (Simple Recovery Model), http://go.microsoft.com/fwlink/?LinkID=127614

Maintaining a Microsoft SQL Server 2008 Database

R-9

For more information about restoring files and filegroups using Transact-SQL, see How to Restore Files and Filegroups (Transact-SQL), http://go.microsoft.com/fwlink/?LinkID=127607 For more information about restoring files and filegroups using SQL Server Management Studio, see How to Restore Files and Filegroups (SQL Server Management Studio), http://go.microsoft.com/fwlink/?LinkID=127606 For more information about piecemeal restores, see Performing Piecemeal Restores, http://go.microsoft.com/fwlink/?LinkID=127617 For more information about database snapshots, see Database Snapshots, http://go.microsoft.com/fwlink/?LinkID=127597 For more information about how database snapshots work, see How Database Snapshots Work, http://go.microsoft.com/fwlink/?LinkID=127603 For more information about reverting to a database snapshot, see Reverting to a Database Snapshot, http://go.microsoft.com/fwlink/?LinkID=127624 For more information about reverting to a database snapshot using Transact-SQL, see How to Revert a Database to a Database Snapshot (Transact-SQL), http://go.microsoft.com/fwlink/?LinkID=127609 For more information about what to consider when backing up and restoring system databases, see Considerations for Backing Up and Restoring System Databases, http://go.microsoft.com/fwlink/?LinkID=127594 For more information about restoring the master database using Transact-SQL, see How to Restore the master Database (Transact-SQL), http://go.microsoft.com/fwlink/?LinkID=127608 For more information about what to consider before restoring the master database, see Considerations for Restoring the master Database, http://technet.microsoft.com/enus/library/ms175535(SQL.100).aspx For more information about restoring a database backup using SQL Server Management Studio, see How to Restore a Database Backup (SQL Server Management Studio), http://go.microsoft.com/fwlink/?LinkID=127604

Module 4
For more information about Kerberos authentication with SQL Server, see Kerberos Authentication and SQL Server, http://go.microsoft.com/fwlink/?LinkID=127652 For more information about the permissions hierarchy, see Permissions Hierarchy, http://go.microsoft.com/fwlink/?LinkID=127657 For more information about principals, see Principals, http://go.microsoft.com/fwlink/?LinkID=127658 For more information about securables, see Securables, http://go.microsoft.com/fwlink/?LinkID=127660 For more information about permissions, see Permissions, http://go.microsoft.com/fwlink/?LinkID=127656 For more information about the different server-level roles, see Server-Level Roles, http://go.microsoft.com/fwlink/?LinkID=127663

R-10

Maintaining a Microsoft SQL Server 2008 Database

For more information about the different database-level roles, see Database-Level Roles, http://go.microsoft.com/fwlink/?LinkID=127643 For more information about the authentication modes, see Choosing an Authentication Mode, http://go.microsoft.com/fwlink/?LinkID=127635 For more information about password policies, see Password Policy, http://go.microsoft.com/fwlink/?LinkID=127655 For more information about the SQL Server logins, see Security Node, http://go.microsoft.com/fwlink/?LinkID=127662 For more information about the creating a SQL Server login, see How to: Create a SQL Server Login, http://go.microsoft.com/fwlink/?LinkID=127650 For more information about the Linked servers for delegation, see Configuring Linked Servers for Delegation, http://go.microsoft.com/fwlink/?LinkID=127637 For more information about credentials, see Credentials, http://go.microsoft.com/fwlink/?LinkID=127640 For more information about creating credentials, see Creating Credentials, http://go.microsoft.com/fwlink/?LinkID=127639 For more information about the GRANT Transact-SQL statement, see GRANT (Transact-SQL), http://go.microsoft.com/fwlink/?LinkID=127648 For more information about the different application roles, see Application Roles, http://go.microsoft.com/fwlink/?LinkID=127633 For more information about how to manage logins and users, see Managing Logins and Users How-to Topics, http://go.microsoft.com/fwlink/?LinkID=127653 For more information about database users, see Database User, http://go.microsoft.com/fwlink/?LinkID=127642 For more information about the user and role properties, see User or Role Properties, http://go.microsoft.com/fwlink/?LinkID=127670 For more information about the Special Users, see Glossary definitions for Special Users, http://go.microsoft.com/fwlink/?LinkID=127647 For more information about schemas, see Schemas, http://go.microsoft.com/fwlink/?LinkID=127659 For more information about ownership chains, see Ownership Chains, http://go.microsoft.com/fwlink/?LinkID=127654 For more information about database encryption keys, see SQL Server and Database Encryption Keys, http://go.microsoft.com/fwlink/?LinkID=127664 For more information about database encryption in SQL Server, see Database Encryption in SQL Server 2008 Enterprise Edition, http://go.microsoft.com/fwlink/?LinkID=127641 For more information about certificates and Asymmetric keys, see SQL Server Certificates and Asymmetric Keys, http://go.microsoft.com/fwlink/?LinkID=127666 For more information about the encryption hierarchy, see Encryption Hierarchy, http://go.microsoft.com/fwlink/?LinkID=127645

Maintaining a Microsoft SQL Server 2008 Database

R-11

For more information about the different encryption algorithms, see Choosing an Encryption Algorithm, http://go.microsoft.com/fwlink/?LinkID=127636 For more information about how to extend database impersonation, see Extending Database Impersonation by Using EXECUTE AS, http://go.microsoft.com/fwlink/?LinkID=127646 For more information about Transparent Data Encryption, see Understanding Transparent Data Encryption http://go.microsoft.com/fwlink/?LinkID=127669 For more information about SQL Server Profiler, see Introducing SQL Server Profiler, http://go.microsoft.com/fwlink/?LinkID=127651 For more information about how to use SQL Server Profiler, see Using SQL Server Profiler, http://go.microsoft.com/fwlink/?LinkID=127671 For more information about the Security Audit event category, see Security Audit Event Category (SQL Server Profiler), http://go.microsoft.com/fwlink/?LinkID=127661 For more information about DDL Triggers, see DDL Triggers, http://go.microsoft.com/fwlink/?LinkID=127644 For more information about how DDL Triggers work, see Understanding DDL Triggers, http://go.microsoft.com/fwlink/?LinkID=127667 For more information about auditing in SQL Server, see Auditing, http://go.microsoft.com/fwlink/?LinkID=127634 For more information about SQL Server Audit, see Understanding SQL Server Audit, http://go.microsoft.com/fwlink/?LinkID=127668 For more information about creating and managing audits, see Creating and Managing Audits with Transact-SQL, http://go.microsoft.com/fwlink/?LinkID=127638 For more information about creating a server-level audit, see How to: Create a Server-level Audit, http://go.microsoft.com/fwlink/?LinkID=127649 For more information about SQL Server Audit Action groups and Actions, see SQL Server Audit Action Groups and Actions, http://go.microsoft.com/fwlink/?LinkID=127665

Module 5
For more information about Creating Package Control Flow, see "Creating Package Control Flow" http://go.microsoft.com/fwlink/?LinkID=127500 For more information about Designing and Creating Integration Services Packages, see "Designing and Creating Integration Services Packages" http://go.microsoft.com/fwlink/?LinkID=127501 For more information about Package Deployment, see "Package Deployment" http://go.microsoft.com/fwlink/?LinkID=127502 For more information about Scenarios for Bulk Importing and Exporting Data, see "Bulk Importing and Exporting Data" http://go.microsoft.com/fwlink/?LinkID=127469 For more information about Bulk Copy Program, see "Bulk Copy Program" http://go.microsoft.com/fwlink/?LinkID=127470 For more information about BULK INSERT, see "BULK INSERT" http://go.microsoft.com/fwlink/?LinkID=127471

R-12

Maintaining a Microsoft SQL Server 2008 Database

For more information about XML Bulk Load, see "XML Bulk Load" http://go.microsoft.com/fwlink/?LinkID=127472 For more information about Import Export Wizard, see "Import Export Wizard" http://go.microsoft.com/fwlink/?LinkID=127473 For more information about Importing and Exporting Data by Using the SQL Server Import and Export Wizard, see "Importing and Exporting Data by Using the SQL Server Import and Export Wizard" http://go.microsoft.com/fwlink/?LinkID=127474 For more information about Basic Guidelines for Bulk Importing Data, see "Basic Guidelines for Bulk Importing Data" http://go.microsoft.com/fwlink/?LinkID=127483 For more information about Optimizing Bulk Import Performance, see "Optimizing Bulk Import Performance" http://go.microsoft.com/fwlink/?LinkID=127481 For more information about Importing Bulk Data by Using BULK INSERT or OPENROWSET, see "Importing Bulk Data by Using BULK INSERT or OPENROWSET" http://go.microsoft.com/fwlink/?LinkID=127484 For examples of Bulk Importing and Exporting XML Documents, see "examples of Bulk Importing and Exporting XML Documents" http://go.microsoft.com/fwlink/?LinkID=127472#bulk_export_xml_data For more information about Integration Services, see "What is new in Integration Services http://go.microsoft.com/fwlink/?LinkID=127487 For more information about Data Source Configuration Wizard, see "Data Source Configuration Wizard" http://go.microsoft.com/fwlink/?LinkID=127495 For more information about Using Data Source Views in Packages, see "Using Data Source Views in Packages" http://go.microsoft.com/fwlink/?LinkID=127496 For more information about Integration Services Connections, see "Integration Services Connections" http://go.microsoft.com/fwlink/?LinkID=127497 For more information about Connection Managers, see "Connection Managers" http://go.microsoft.com/fwlink/?LinkID=127498 For more information about Creating Package Data Flow, see "Creating Package Data Flow" http://go.microsoft.com/fwlink/?LinkID=127499 For more information about Creating Package Control Flow, see "Creating Package Control Flow" http://go.microsoft.com/fwlink/?LinkID=127500 For more information about Designing and Creating Integration Services Packages, see "Designing and Creating Integration Services Packages" http://go.microsoft.com/fwlink/?LinkID=127501 For more information about Package Deployment, see "Package Deployment" http://go.microsoft.com/fwlink/?LinkID=127502

Module 6
For more information about Automating Administration Across an Enterprise, see "Automating Administration Across an Enterprise" http://go.microsoft.com/fwlink/?LinkID=127503 For more information about Implementing Jobs, see "Implementing Jobs" http://go.microsoft.com/fwlink/?LinkID=127504

Maintaining a Microsoft SQL Server 2008 Database

R-13

For more information about Components of Automatic Administration, see "Components of Automatic Administration" http://go.microsoft.com/fwlink/?LinkID=127505 For more information about Defining Operators, see "Defining Operators" http://go.microsoft.com/fwlink/?LinkID=127506 For more information about Creating Job Steps, see "Creating Job Steps" http://go.microsoft.com/fwlink/?LinkID=127507 For more information about Monitoring Job Activity, see "Monitoring Job Activity" http://go.microsoft.com/fwlink/?LinkID=127508 For more information about Configuring SQL Server Agent, see "Configuring SQL Server Agent" http://go.microsoft.com/fwlink/?LinkID=127510 For more information about Database Mail, see "Database Mail " http://go.microsoft.com/fwlink/?LinkID=127512 For more information about starting the Maintenance Plan WIzard, see "How to: Start the Maintenance Plan Wizard (SQL Server Management Studio)" http://go.microsoft.com/fwlink/?LinkID=127524 For more information about creating a maintenance plan, see "How to: Create a Maintenance Plan" http://go.microsoft.com/fwlink/?LinkID=127525 For more information about Defining Alerts, see "Defining Alerts" http://go.microsoft.com/fwlink/?LinkID=127526 For more information about Creating a SQL Server Agent, see "Sample: Creating a SQL Server Agent Alert by Using the WMI Provider for Server Events" http://go.microsoft.com/fwlink/?LinkID=127527 For more information about SQL Server Agent Properties , see "SQL Server Agent Properties (Alert System Page)" http://go.microsoft.com/fwlink/?LinkID=127528 For more information about sp_add_alert, see "sp_add_alert" http://go.microsoft.com/fwlink/?LinkID=127529 For more information about the alerts object, see "SQL Server Agent, Alerts Object" http://go.microsoft.com/fwlink/?LinkID=127530 For more information about Creating a Multi-server Environment, see "Creating a Multi-server Environment" http://go.microsoft.com/fwlink/?LinkID=127535 For more information about Troubleshooting Multi-server Jobs That Use Proxies, see "Troubleshooting Multi-server Jobs That Use Proxies" http://go.microsoft.com/fwlink/?LinkID=127537 For more information about Managing Jobs Across an Enterprise, see "Managing Jobs Across an Enterprise" http://go.microsoft.com/fwlink/?LinkID=127538 For more information about SQL Server Agent Fixed Database Roles, see "SQL Server Agent Fixed Database Roles" http://go.microsoft.com/fwlink/?LinkID=127539 For more information about creating a proxy, see "How to: Create a Proxy" http://go.microsoft.com/fwlink/?LinkID=127541 For more information about Creating SQL Server Agent Proxies, see "Creating SQL Server Agent Proxies" http://go.microsoft.com/fwlink/?LinkID=127542

R-14

Maintaining a Microsoft SQL Server 2008 Database

Module 7
For more information about Replication for SQL Server 2008, see "What is new in Replication for SQL Server 2008" http://go.microsoft.com/fwlink/?LinkID=127548 For more information about SQL Server Replication, see "SQL Server Replication" http://go.microsoft.com/fwlink/?LinkID=127549 For more information about Selecting the Appropriate Type of Replication http://go.microsoft.com/fwlink/?LinkID=127550 For more information about the Replication Publishing Model, see "Replication Publishing Model Overview" http://go.microsoft.com/fwlink/?LinkID=127551 For more information about Designing and Implementing, see "Designing and Implementing" http://go.microsoft.com/fwlink/?LinkID=127552 For more information about Types of Replication, see "Types of Replication Overview" http://go.microsoft.com/fwlink/?LinkID=127554 For more information about Replication Agent Executables Concepts, see "Replication Agent Executables Concepts" http://go.microsoft.com/fwlink/?LinkID=127562 For more information about Replication Agents, see "Replication Agents Overview" http://go.microsoft.com/fwlink/?LinkID=127563 For more information about Publishing Data and Database Objects, see "Publishing Data and Database Objects" http://go.microsoft.com/fwlink/?LinkID=127569 For Best Practices for Replication Administration, see "Best Practices for Replication Administration" http://go.microsoft.com/fwlink/?LinkID=127574 For more information about Monitoring, see "Monitoring (Replication)" http://go.microsoft.com/fwlink/?LinkID=127575 For more information about Monitoring Replication with Replication Monitor, see "Monitoring Replication with Replication Monitor" http://go.microsoft.com/fwlink/?LinkID=127576 For more information about Replication Physical Architecture, see "Replication Physical Architecture" http://go.microsoft.com/fwlink/?LinkID=127577 For more information about Replication Solution Design Considerations, see "Replication Solution Design Considerations" http://go.microsoft.com/fwlink/?LinkID=127578 For more information about Replicating Data in a Server to Server Environment, see "Replicating Data in a Server to Server Environment" http://go.microsoft.com/fwlink/?LinkID=127579 For more information about Replicating Data Between a Server and Clients, see "Replicating Data Between a Server and Clients" http://go.microsoft.com/fwlink/?LinkID=127582 For more information about Integrating Data from Multiple Sites, see "Integrating Data from Multiple Sites" http://go.microsoft.com/fwlink/?LinkID=127583 For more information about Configuring Web Synchronization, see "Configuring Web Synchronization" http://go.microsoft.com/fwlink/?LinkID=127585 For more information about Web Synchronization for Merge Replication, see "Web Synchronization for Merge Replication" http://go.microsoft.com/fwlink/?LinkID=127586

Maintaining a Microsoft SQL Server 2008 Database

R-15

For more information about How Oracle Publishing Works, see "How Oracle Publishing Works" http://go.microsoft.com/fwlink/?LinkID=127587 For more information about Peer-to-Peer Transactional Replication, see "Peer-to-Peer Transactional Replication" http://go.microsoft.com/fwlink/?LinkID=127590

Module 8
For more information on high availability, see, "High Availability in SQL Server", http://go.microsoft.com/fwlink/?LinkId=131095 For more information about compressing transaction log backups for log shipping, see "Backup Compression", http://go.microsoft.com/fwlink/?LinkId=131120 For more information about about failover in a log shipping implementation, see "Failing Over to a Log Shipping Secondary", http://go.microsoft.com/fwlink/?LinkId=131121 For more information about switching server roles, see "Changing Roles Between Primary and Secondary Servers", http://go.microsoft.com/fwlink/?LinkId=131099 For more information about log shipping, see "Log Shipping Overview", http://go.microsoft.com/fwlink/?LinkId=131096 For more information about configuring log shipping with T-SQL, see "How to: Enable Log Shipping (Transact-SQL)", http://go.microsoft.com/fwlink/?LinkId=131097 For more information about configuring log shipping in SQL Server Management Studio, see "How to Enable Log Shipping (SQL Server Management Studio)", http://go.microsoft.com/fwlink/?LinkId=131098 For more information about database mirroring, see "Database Mirroring Overview", http://go.microsoft.com/fwlink/?LinkId=131100 For more information about the witness role database mirroring, see "Database Mirroring Witness", http://go.microsoft.com/fwlink/?LinkId=131101 For more information about the witness role database mirroring, see "Asynchronous Database Mirroring (High-Performance Mode)", http://go.microsoft.com/fwlink/?LinkId=131103 For more information about the witness role database mirroring, see "Synchronous Database Mirroring (High-Safety Mode)", http://go.microsoft.com/fwlink/?LinkId=131104 For more information about database mirroring endpoints, see "Database Mirroring Endpoint", http://go.microsoft.com/fwlink/?LinkId=131105 For more information about creating database mirroring endpoints, see "How to: Create a Mirroring Endpoint for Windows Authentication", http://go.microsoft.com/fwlink/?LinkId=131122 For more information on establishing a database mirroring session, see "Database Mirroring Sessions", http://go.microsoft.com/fwlink/?LinkId=131102 For more information on setting up database mirroring, see "Setting Up Database Mirroring", http://go.microsoft.com/fwlink/?LinkId=131106 For more information on preparing a database for mirroring, see "How to: Prepare a Database for Mirroring", http://go.microsoft.com/fwlink/?LinkId=131124 For more information on configuring a mirror session, see "How to: Configure a Database Mirroring Session", http://go.microsoft.com/fwlink/?LinkId=131125

R-16

Maintaining a Microsoft SQL Server 2008 Database

For more information on using Windows authentication with database mirroring, see "How to: Establish a Database Mirroring Session Using Windows Authentication", http://go.microsoft.com/fwlink/?LinkId=131126 For more information on the Forced Service option, see "Forced Service (with Possible Data Loss)", http://go.microsoft.com/fwlink/?LinkId=131108 For more information on making a connection to a mirrored database, see "Making the Initial Connection to a Database Mirroring Session", http://go.microsoft.com/inkId=131128 For more information on reconnecting to a mirrored database, see "Reconnecting to a Database Mirroring Session", http://go.microsoft.com/nk/?LinkId=131111 For more information on connecting clients to a mirrored database, see "Connecting Clients to a Mirrored Database", http://go.microsoft.com/link/?LinkId=131127 For more information on high availability, see "Overview of High Availability in SQL Server", http://go.microsoft.com/fwlink/?LinkId=131095 For more information about hardware compatibility for clustering, see "Windows Catalog and Hardware Compatibility List", http://go.microsoft.com/fwlink/?LinkId=131129 For more information about pre-installation tasks for clustering, see "Before Installing Failover Clustering", http://go.microsoft.com/fwlink/?LinkId=131115 For more information on SQL Server clustering, see "Getting Started with SQL Server 2008 Failover Clustering", http://go.microsoft.com/link/?LinkId=131114 For more information on installing a SQL Server cluster, see "Installing a SQL Server 2008 Failover Cluster", http://go.microsoft.com/link/?LinkId=131116 For more information about administering a peer-to-peer transactional replication implementation, see "How to: Administer a Peer-to-Peer Topology", http://go.microsoft.com/link/?LinkId=131130 For more information about peer-to-peer transactional replication, see "Peer-to-Peer Transactional Replication", http://go.microsoft.com/link/?LinkId=131117 For more information about network load balancing, see "Network Load Balancing", http://go.microsoft.com/fwlink/?LinkId=131118 For more information about selecting high availability, see "High Availability Solutions", http://go.microsoft.com/fwlink/?LinkId=131131 For more information about selecting a high availability solution that fits your needs, see "Selecting a High Availability Solution", http://go.microsoft.com/fwlink/?LinkId=131119 For more information about peer-to-peer transactional replication, see "Peer-to-Peer Transactional Replication", http://go.microsoft.com//?LinkId=131117

Module 9
For more information on Server and Performance Monitoring, see "Server and Performance Monitoring", http://go.microsoft.com/fwlink/?LinkId=131132 For more information on how to use Activity Monitor, see "How-to: Open the Activity Monitor: ", http://go.microsoft.com/fwlink/?LinkId=131133

Maintaining a Microsoft SQL Server 2008 Database

R-17

For more information on Reliability and Performance Monitor Step-by-Step Guide: , see "Reliability and Performance Monitor Step-by-Step Guide: ", http://go.microsoft.com/fwlink/?LinkId=131134 For more information on Dynamic Management Views and Functions, see "Dynamic Management Views and Functions", http://go.microsoft.com/fwlink/?LinkId=131135 For more information on Using SQL Server Profiler, see "Using SQL Server Profiler", http://go.microsoft.com/fwlink/?LinkId=131212 For more information on Typical Uses of SQL Server Profiler, see "Typical Uses of SQL Server Profiler", http://go.microsoft.com/fwlink/?LinkId=131136 For more information on Create a Trace Template, see "Create a Trace Template", http://go.microsoft.com/fwlink/?LinkId=131137 For more information on Saving Trace Results to a Table, see "Saving Trace Results to a Table", http://go.microsoft.com/fwlink/?LinkId=131138 For more information on Saving Trace Results to a File, see "Saving Trace Results to a File", http://go.microsoft.com/fwlink/?LinkId=131139 For more information on Setting Global Trace Options, see "Setting Global Trace Options", http://go.microsoft.com/fwlink/?LinkId=131140 For more information on Columns Displayed in a Trace, see "Columns Displayed in a Trace", http://go.microsoft.com/fwlink/?LinkId=131141 For more information on DDL Triggers, see "DDL Triggers", http://go.microsoft.com/fwlink/?LinkId=131142 For more information on Designing DDL Triggers, see "Designing DDL Triggers", http://go.microsoft.com/fwlink/?LinkId=131143 For more information on The EventData Function, see "The EventData Function", http://go.microsoft.com/fwlink/?LinkId=131144 For more information on Understanding Event Notifications, see "Understanding Event Notifications", http://go.microsoft.com/fwlink/?LinkId=131145 For more information on Getting Information About Event Notifications, see "Getting Information About Event Notifications", http://go.microsoft.com/fwlink/?LinkId=131146 For more information on Monitoring CPU Usage, see "Monitoring CPU Usage", http://go.microsoft.com/fwlink/?LinkId=131147 For more information on Monitoring Disk Usage, see "Monitoring Disk Usage", http://go.microsoft.com/fwlink/?LinkId=131148 For more information on Monitoring Memory Usage, see "Monitoring Memory Usage", http://go.microsoft.com/fwlink/?LinkId=131149 For more information on SQL Server Profiler Terminology, see "SQL Server Profiler Terminology", http://go.microsoft.com/fwlink/?LinkId=131150 For more information on Saving Traces and Trace Templates, see "Saving Traces and Trace Templates", http://go.microsoft.com/fwlink/?LinkId=131151 For more information on Replaying Traces, see "Replaying Traces", http://go.microsoft.com/fwlink/?LinkId=131152

R-18

Maintaining a Microsoft SQL Server 2008 Database

For more information on SQL Server Profiler Templates, see "SQL Server Profiler Templates", http://go.microsoft.com/fwlink/?LinkId=131153 For more information on Filtering Traces with SQL Server Profiler, see "Filtering Traces with SQL Server Profiler", http://go.microsoft.com/fwlink/?LinkId=131154 For more information on Describing Events by Using Data Columns, see "Describing Events by Using Data Columns", http://go.microsoft.com/fwlink/?LinkId=131155 For more information on Understanding DDL Triggers, see "Understanding DDL Triggers", http://go.microsoft.com/fwlink/?LinkId=131156 For more information on Implementing DDL Triggers, see "Implementing DDL Triggers", http://go.microsoft.com/fwlink/?LinkId=131157 For more information on DDL Event Groups, see "DDL Event Groups", http://go.microsoft.com/fwlink/?LinkId=131158 For more information on CREATE TRIGGER, see "CREATE TRIGGER", http://go.microsoft.com/fwlink/?LinkId=131159 For more information on DROP TRIGGER, see "DROP TRIGGER", http://go.microsoft.com/fwlink/?LinkId=131160 For more information on ALTER TRIGGER, see "ALTER TRIGGER", http://go.microsoft.com/fwlink/?LinkId=131161 For more information on DISABLE TRIGGER, see "DISABLE TRIGGER", http://go.microsoft.com/fwlink/?LinkId=131162 For more information on Designing Event Notifications, see "Designing Event Notifications", http://go.microsoft.com/fwlink/?LinkId=131163 For more information on Implementing Event Notifications, see "Implementing Event Notifications", http://go.microsoft.com/fwlink/?LinkId=131164 For more information on CREATE EVENT NOTIFICATION, see "CREATE EVENT NOTIFICATION", http://go.microsoft.com/fwlink/?LinkId=131165 For more information on EVENTDATA, see "EVENTDATA", http://go.microsoft.com/fwlink/?LinkId=131166

Module 10
For more information on Using a Dedicated Administrator Connection, see "Using a Dedicated Administrator Connection", http://go.microsoft.com/fwlink/?LinkId=131213 For more information on How to: Use the Dedicated Administrator Connection with SQL Server Management Studio, see "How to: Use the Dedicated Administrator Connection with SQL Server Management Studio", http://go.microsoft.com/fwlink/?LinkId=131214 For more information on Troubleshooting Database Engine Connectivity , see "Troubleshooting Database Engine Connectivity ", http://go.microsoft.com/fwlink/?LinkId=131167 For more information on Troubleshooting Concepts, see "Troubleshooting Concepts", http://go.microsoft.com/fwlink/?LinkId=131168 For more information on Isolation Levels in the Database Engine, see "Isolation Levels in the Database Engine", http://go.microsoft.com/fwlink/?LinkId=131215

Maintaining a Microsoft SQL Server 2008 Database

R-19

For more information on Types of Concurrency Control, see "Types of Concurrency Control", http://go.microsoft.com/fwlink/?LinkId=131216 For more information on Concurrency Effects, see "Concurrency Effects", http://go.microsoft.com/fwlink/?LinkId=131217 For more information on Troubleshooting Insufficient Disk Space in tempdb, see "Troubleshooting Insufficient Disk Space in tempdb", http://go.microsoft.com/fwlink/?LinkId=131169 For more information on Troubleshooting Insufficient Data Disk Space, see "Troubleshooting Insufficient Data Disk Space", http://go.microsoft.com/fwlink/?LinkId=131170 For more information on Considerations for Autogrow and Autoshrink, see "Considerations for Autogrow and Autoshrink", http://go.microsoft.com/fwlink/?LinkId=131171 For more information on Performance Monitoring and Tuning How-to Topics, see "Performance Monitoring and Tuning How-to Topics", http://go.microsoft.com/fwlink/?LinkId=131172 For more information on Monitoring and Tuning for Performance Overview, see "Monitoring and Tuning for Performance Overview", http://go.microsoft.com/fwlink/?LinkId=131173 For more information on SQL Server Profiler, see "SQL Server Profiler", http://go.microsoft.com/fwlink/?LinkId=131174 For more information on Database Tuning Advisor, see "Database Tuning Advisor", http://go.microsoft.com/fwlink/?LinkId=131175 For more information on Reports in Management Studio, see "Reports in Management Studio", http://go.microsoft.com/fwlink/?LinkId=131176 For more information on SQL Server Management Pack, see "SQL Server Management Pack", http://go.microsoft.com/fwlink/?LinkId=131177 For more information on General Index Design Guidelines, see "General Index Design Guidelines", http://go.microsoft.com/fwlink/?LinkId=131178 For more information on Understanding Database Engine Tuning Advisor, see "Understanding Database Engine Tuning Advisor", http://go.microsoft.com/fwlink/?LinkId=131179 For more information on Query Tuning Recommendations, see "Query Tuning Recommendations", http://go.microsoft.com/fwlink/?LinkId=131218 For more information on Analyzing a Query, see "Analyzing a Query", http://go.microsoft.com/fwlink/?LinkId=131219 For more information on Advanced Query Tuning Concepts, see "Advanced Query Tuning Concepts", http://go.microsoft.com/fwlink/?LinkId=131180 For more information on Introducing Resource Governor, see "Introducing Resource Governor", http://go.microsoft.com/fwlink/?LinkId=131181 For more information on Resource Governor Concepts, see "Resource Governor Concepts", http://go.microsoft.com/fwlink/?LinkId=131182 For more information on Resource Governor DDL and System Views, see "Resource Governor DDL and System Views", http://go.microsoft.com/fwlink/?LinkId=131183

R-20

Maintaining a Microsoft SQL Server 2008 Database

For more information on Using SQL Server Management Studio to Configure and Use Resource Governor, see "Using SQL Server Management Studio to Configure and Use Resource Governor", http://go.microsoft.com/fwlink/?LinkId=131184 For more information on Introducing the Data Collector, see "Introducing the Data Collector", http://go.microsoft.com/fwlink/?LinkId=131185 For more information on SQL Server 2008 Management Improvements, see "SQL Server 2008 Management Improvements", http://go.microsoft.com/fwlink/?LinkId=131186 For more information on Data Collector Architecture and Processing, see "Data Collector Architecture and Processing", http://go.microsoft.com/fwlink/?LinkId=131187 For more information on Getting Started with the Data Collector, see "Getting Started with the Data Collector", http://go.microsoft.com/fwlink/?LinkId=131188 For more information on Troubleshooting: Timeout Expired, see "Troubleshooting: Timeout Expired", http://go.microsoft.com/fwlink/?LinkId=131189 For more information on Login Failed for User 'x', see "Login Failed for User 'x'", http://go.microsoft.com/fwlink/?LinkId=131190 For more information on Connection Forcibly Closed, see "Connection Forcibly Closed", http://go.microsoft.com/fwlink/?LinkId=131191 For more information on No Process is on the Other End of the Pipe, see "No Process is on the Other End of the Pipe", http://go.microsoft.com/fwlink/?LinkId=131192 For more information on Troubleshooting a Full Transaction Log, see "Troubleshooting a Full Transaction Log", http://go.microsoft.com/fwlink/?LinkId=131193 For more information on SQL Server Management Studio Standard Reports, see "SQL Server Management Studio Standard Reports", http://go.microsoft.com/fwlink/?LinkId=131194 For more information on SQL Server Management Pack for MOM 2005, see "SQL Server Management Pack for MOM 2005", http://go.microsoft.com/fwlink/?LinkId=131195 For more information on Considerations for Using the Database Engine Tuning Advisor, see "Considerations for Using the Database Engine Tuning Advisor", http://go.microsoft.com/fwlink/?LinkId=131196 For more information on Tuning the Physical Database Design, see "Tuning the Physical Database Design", http://go.microsoft.com/fwlink/?LinkId=131197 For more information on Database Engine Tuning Advisor Features, see "Database Engine Tuning Advisor Features", http://go.microsoft.com/fwlink/?LinkId=131198 For more information on Using Transact-SQL to Configure and Use Resource Governor, see "Using Transact-SQL to Configure and Use Resource Governor", http://go.microsoft.com/fwlink/?LinkId=131199 For more information on Resource Governor Monitoring, see "Resource Governor Monitoring", http://go.microsoft.com/fwlink/?LinkId=131200 For more information on Data Collection Terminology, see "Data Collection Terminology", http://go.microsoft.com/fwlink/?LinkId=131201

Maintaining a Microsoft SQL Server 2008 Database

R-21

Communities
The Professional Association for SQL Server (PASS) is an independent, not-for-profit association, dedicated to supporting, educating, and promoting the Microsoft SQL Server community. Offering a multitude of networking channels from local user groups and special interest groups (SIGs) to webcasts and the annual PASS Summit the largest gathering of SQL Server professionals in the world PASS enables knowledge sharing, in-depth learning, access to the Microsoft SQL Server team, and the ability to influence the direction of SQL Server technologies. For more information and your free membership, visit www.sqlpass.org.

Blogs
SQL Server 2008: Administer multiple servers by designating configuration servers in SSQA.net. http://go.microsoft.com/fwlink/?LinkID=127465

R-22

Maintaining a Microsoft SQL Server 2008 Database

Send Us Your Feedback


You can search the Microsoft Knowledge Base for known issues at Microsoft Help and Support before submitting feedback. Search using either the course number and revision, or the course title. Note Not all training products will have a Knowledge Base article if that is the case, please ask your instructor whether or not there are existing error log entries.

Courseware Feedback
Send all courseware feedback to support@mscourseware.com. We truly appreciate your time and effort. We review every e-mail received and forward the information on to the appropriate team. Unfortunately, because of volume, we are unable to provide a response but we may use your feedback to improve your future experience with Microsoft Learning products.

Reporting Errors
When providing feedback, include the training product name and number in the subject line of your email. When you provide comments or report bugs, please include the following: Document or CD part number Page number or location Complete description of the error or suggested change

Please provide any details that are necessary to help us verify the issue.

Important All errors and suggestions are evaluated, but only those that are validated are added to the product Knowledge Base article.

You might also like