1 Part I: Installing, Administering and Managing the Database Engine 1 Installing or Upgrading to the SQL Server 2008 Database Engine.. Table of Contents Part I: Installing, Administerin
Trang 1ptg
Trang 2Management and Administration
800 East 96th Street, Indianapolis, Indiana 46240 USA
Trang 3Copyright © 2009 by Sams Publishing
All rights reserved No part of this book shall be reproduced, stored
in a retrieval system, or transmitted by any means, electronic,
mechanical, photocopying, recording, or otherwise, without written
permission from the publisher No patent liability is assumed with
respect to the use of the information contained herein Although
every precaution has been taken in the preparation of this book, the
publisher and author assume no responsibility for errors or
omis-sions Nor is any liability assumed for damages resulting from the
use of the information contained herein.
This material may be distributed only subject to the terms and
conditions set forth in the Open Publication License, v1.0 or later
(the latest version is presently available at http://www.open
First Printing December 2009
Trademarks
All terms mentioned in this book that are known to be trademarks
or service marks have been appropriately capitalized Sams
Publishing cannot attest to the accuracy of this information Use of
a term in this book should not be regarded as affecting the validity
of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as
accurate as possible, but no warranty or fitness is implied The
information provided is on an “as is” basis The author and the
publisher shall have neither liability nor responsibility to any person
or entity with respect to any loss or damages arising from the
infor-mation contained in this book.
Bulk Sales
Sams Publishing offers excellent discounts on this book when
ordered in quantity for bulk purchases or special sales For more
information, please contact
U.S Corporate and Government Sales
Contributing Writers Hilary Cotter, MVP;
Shirmattie Seenarine;
John Welch, MVP;
Marco Shaw, MVP;
Maciej Pilecki, MVP
Trang 4Contents at a Glance
Introduction 1
Part I: Installing, Administering and Managing the Database Engine 1 Installing or Upgrading to the SQL Server 2008 Database Engine 11
2 Administering the SQL Server 2008 Database Engine 51
3 Creating Packages and Transferring Data with Integration Services 113
4 Managing and Optimizing SQL Server 2008 Indexes 161
5 Administering SQL Server 2008 Full-Text Search 203
6 SQL Server 2008 Maintenance Practices 247
7 Backing Up and Restoring the SQL Server 2008 Database Engine 273
Part II: SQL Server 2008 Security Practices 8 Hardening a SQL Server Implementation 315
9 Administering SQL Server Security and Authorization 349
10 Administering Policy Based Management 383
11 Encrypting SQL Server Data and Communications 405
Part III: SQL Server 2008 High Availability Alternatives 12 Implementing and Managing Failover Clustering 453
13 Implementing and Managing Database Mirroring 501
14 Implementing and Managing Log Shipping 531
15 Implementing and Managing Replication 561
Part IV: Monitoring and Troubleshooting SQL Server 2008 16 Managing Workloads and Consumption with Resource Governor 605
17 Monitoring SQL Server 2008 with Native Tools 627
18 Proactively Monitoring SQL Server 2008 with Systems Center Operations Manager 2007 681
19 Performance Tuning and Troubleshooting SQL Server 2008 707
Part V: SQL Server 2008 Bonus Content 20 Administering SQL Server 2008 with PowerShell 745
21 Consolidating and Virtualizing SQL Server 2008 with Hyper-V 791
Index 821
Trang 5This page intentionally left blank
Trang 6Table of Contents
Part I: Installing, Administering, and Managing the Database Engine
1 Installing or Upgrading to the SQL Server 2008
What’s New for Installation with SQL Server 2008? 12
Deprecated SQL Server 2008 Database Engine Elements 13
Preplanning and Preparing a SQL Server 2008 Server Database Engine Installation 14
Verifying Minimum Hardware Requirements 14
Examining SQL Server 2008 Software Prerequisites 16
Choosing the Appropriate SQL Server Edition 17
Choosing the Appropriate Windows Operating System Version and Edition to Support the SQL Server Installation 18
New Installation, Upgrade, or Transition? 21
Gathering Additional Information Necessary to Proceed 23
New SQL Server 2008 Installation or In-place Upgrade 24
New SQL Server 2008 Stand-alone Installation or Failover Cluster 24
Single-Instance or Multiple-Instance Installation 24
Side-by-Side Installations with Previous Versions of SQL Server 25
Determine Which SQL Server 2008 Features to Install 25
Installing a Clean Version of SQL Server 2008 28
Upgrading the Database Engine to SQL Server 2008 34
Creating a SQL Server Feature Discovery Report 35
Backing Up the Server 35
Verifying System Compatibility 35
Running the SQL Server Upgrade Advisor 35
Additional Considerations Before Upgrading the Database Engine to SQL Server 2008 39
Performing the SQL Server 2008 Upgrade 40
Trang 7Finalizing the SQL Server 2008 Installation or Upgrade 44
Reviewing SQL Server 2008 Logs 44
Downloading and Installing Updates 44
Hardening the SQL Server Installation 44
Items to Consider After an Upgrade 45
Managing SQL Server 2008 Installations 46
Employing Additional SQL Server 2008 Instances 46
Adding Features to an Existing SQL Server 2008 Installation 47
Changing SQL Server 2008 Editions 48
Summary 48
Best Practices 48
2 Administering the SQL Server 2008 Database Engine 51 What’s New for DBAs When Administering the Database Engine on SQL Server 2008 51
Administering SQL Server 2008 Server Properties 53
Administering the General Page 54
Administering the Memory Page 55
Administering the Processors Page 57
Administering the Security Page 60
Administering the Connections Page 62
Administering the Database Settings Page 64
Administering the Advanced Page 66
Administering the Permissions Page 69
Administering the SQL Server Database Engine Folders 70
Administering the Databases Folder 71
Administering the Security Folder 73
Administering the Server Objects Folder 74
Administering the Replication Folder 77
Administering the Management Folder 77
Administering Database Properties 79
Administering the Database Properties General Page 80
Administering the Database Properties Files Page 81
Administering the Database Properties Filegroups Page 85
Administering the Database Properties Options Page 86
Understanding and Effectively Using Recovery Models 87
Microsoft®SQL Server 2008 Management and Administration
Trang 8Contents
Compatibility Level 89
Other Options (Automatic) 89
Other Options (Cursor) 90
Other Options (Miscellaneous) 90
Other Options (Recovery) 92
Other Options (Service Broker) 92
Other Options (State) 92
Administering the Change Tracking Page 93
Administering the Database Properties Permissions Page 93
Administering the Database Properties Extended Permissions Page 94
Administering the Database Properties Mirroring Page 94
Administering the Database Properties Transaction Log Shipping Page 94
SQL Server Database Engine Management Tasks 94
Changing SQL Server Configuration Settings 95
Managing Database Engine Informational Reports 95
Detaching and Attaching Databases 97
Scripting Database Objects 99
Managing SQL Server with PowerShell 100
Backing Up and Restoring the Database 100
Transferring SQL Server Data 100
Taking a SQL Server Database Offline 101
Shrinking a Database 101
Data Compression in SQL Server 2008 102
Partitioning Tables and Indexes in SQL Server 2008 104
Enabling FILESTREAM Data for a SQL Server Instance 106
Renaming a Database 107
Administering the SQL Server Agent 107
Administering the SQL Server Agent Properties 108
Administering SQL Server Agent Jobs 109
Administering SQL Server Alerts and Operators 111
Administering SQL Server Proxies 111
Administering SQL Server Error Logs 111
Summary 111
Best Practices 112
Trang 93 Creating Packages and Transferring Data with
What’s New in Integration Services for SQL Server 2008 114
Options for Creating Packages 115
Import and Export Wizard 115
Copy Database Wizard 116
Business Intelligence Development Studio 116
Packages 116
Projects and Solutions 117
Control Flow 118
Tasks 118
Data Flow 119
Connections 121
Event Handlers 122
Variables 122
Log Providers and Logging 122
Developing Packages 123
Creating a Project 123
Creating a Package 124
Walkthrough of a Package 125
Walkthrough of the Control Flow 126
Walkthrough of the Data Flow 127
Walkthrough of the Connection Managers 130
Running a Package 130
Enhancing Packages 134
Transforming Data 134
Adding Logging 140
Using Expressions 140
Sending Email 141
Adding Error Handling 142
Adding Configurations 143
Adding Maintenance Tasks 147
Deploying and Running Integration Services Packages 147
Storing Packages 148
Deploying Packages 149
Securing SSIS Packages 151
Running Packages 153
Microsoft®SQL Server 2008 Management and Administration
Trang 10Transferring Data with Integration Services 156
Using the Copy Database Wizard 156
Using the Bulk Insert Task 158
Summary 159
Best Practices 159
4 Managing and Optimizing SQL Server 2008 Indexes 161 What’s New for Indexes with SQL Server 2008 161
The Importance of Indexes 162
How Indexes Work 162
General Index Characteristics 166
How Column Constraints Affect Indexes 167
How Computed Columns Affect Indexes 167
Clustered Index Characteristics 168
Nonclustered Index Characteristics 168
Nonclustered Index Include Columns 168
XML Index Characteristics 169
Filtered Index Characteristics 169
Spatial Index Characteristics 169
Index Design and Strategy 170
Using Clustered Indexes 170
Using Nonclustered Indexes 171
Using Unique Indexes and the Uniqueifier Column 171
Calculating Disk Space Requirements 172
Administering Indexes 174
Transact-SQL Index Syntaxes 174
Creating Indexes with SQL Server Management Studio 180
Creating Clustered Indexes 184
Creating Nonclustered Indexes 186
Disabling and Deleting Indexes 186
Enabling and Rebuilding Indexes 187
Implementing Index Maintenance and Maintenance Plans 188
Configuring Indexes for Maximum Performance 189
Configuring Index Statistics 189
Examining Fragmentation Considerations 190
Implementing Fill Factor Administration 192
Determining When to Rebuild or Reorganize an Index 193
Sorting Indexes in the tempdb 194
Contents
Trang 11Using the Database Engine Tuning Advisor 194
Examining Additional Indexing Options 197
Enterprise Indexing Features 198
Summary 200
Best Practices 200
5 Administering SQL Server 2008 Full-Text Search 203 New Features of SQL 2008 Full-Text Search 204
Architecture 205
Implementing SQL Server 2008 Full-Text Catalogs 217
Creating a Full-Text Catalog Using the Wizard 217
Using SQL Server Management Studio 217
Creating a Full-Text Catalog Using TSQL 219
Creating a Full-Text Index Using the Full-Text Wizard 219
Population Types 228
Creating a Full-Text Index Using TSQL 230
Maintaining Full-Text Indexes 234
Creating Stop Lists 236
Using Full-Text Search 239
Troubleshooting Full-Text Indexing 241
Best Practices 244
Summary 245
6 SQL Server 2008 Maintenance Practices 247 What’s New for Maintenance with SQL Server 2008? 247
Establishing a SQL Server Maintenance Plan 248
Check Database Integrity Task 248
Shrink Database Task 249
Reorganize Index Task 250
Rebuild Index Task 251
Update Statistics Task 252
History Cleanup Task 253
Execute SQL Server Agent Job 254
Back Up Database Task 254
Maintenance Cleanup Task 256
Creating a Maintenance Plan 257
Creating a Maintenance Plan with the Wizard 257
Creating a Maintenance Plan Manually 264
Viewing Maintenance Plans 267
Creating Multiserver Maintenance Plans 268
Microsoft®SQL Server 2008 Management and Administration
Trang 12Establishing Maintenance Schedules for SQL Server 269
Daily Routine Maintenance Tasks 270
Weekly Routine Maintenance Tasks 270
Monthly or Quarterly Maintenance Tasks 271
Summary 271
Best Practices 272
7 Backing Up and Restoring the SQL Server 2008 Database Engine 273 What’s New for Backup and Recovery with SQL Server 2008? 273
Backup Compression 274
The Importance of Backups 275
Items to Consider When Creating a Backup and Recovery Plan 276
Backing Up and Recovering the Database Engine 277
The Storage Architecture 277
Using Recovery Models Effectively 279
SQL Server Backup Methods 282
Backing Up and Recovering Examples 290
Backing Up and Recovering Full-Text Catalogs 307
Backing Up Full-Text Catalogs 307
Understanding and Creating Database Snapshots 308
Creating a Database Snapshot with TSQL 309
Viewing a Database Snapshot with SSMS 309
Reverting to a Database Snapshot with TSQL 310
Dropping a Database Snapshot 310
Summary 310
Best Practices 311
Part II: SQL Server 2008 Security Practices 313 8 Hardening a SQL Server Implementation 315 What’s New for Hardening a SQL Server 2008 Implementation? 315
Windows and SQL Server Authentication 316
Windows Authentication Mode 317
SQL Server and Windows Authentication (Mixed) Mode 317
Contents
Trang 13Which Mode Should Be Used to Harden
Authentication? 317
Configuring SQL Server 2008 Authentication Modes 318
Security Ramifications of the SA Account 319
Enforcing or Changing a Strong Password 320
Disabling and Renaming the SA Account 321
Using Configuration Tools to Harden the Installation 322
Reducing the SQL Server 2008 Surface Area 322
Using the SQL Server Configuration Manager Tool to Harden an Installation 322
Hardening a Server with the Security Configuration Wizard in Windows Server 2008 326
Verifying Security Using the Microsoft Baseline Security Analyzer (MBSA) 328
Using the SQL Server 2008 Best Practice Analyzer (BPA) Tool to Harden an Installation 330
Hardening SQL Server Service Accounts 331
The Principle of Least Privilege 332
Service Account Isolation 332
The Types of Service Accounts Available 333
Determining Which Type of Account to Use for SQL Server Services 333
Changing a SQL Server Service Account with SQL Server Configuration Manager 334
Installing Service Packs and Critical Fixes 335
Updating and Patching SQL Server and the Operating System 336
Understanding How SQL Server Security Logs Play a Part in Security 336
Configuring SQL Server Security Logs for Auditing 337
Enhanced Auditing Functionality included with SQL Server 2008 338
Additional SQL Server Hardening Recommendations 338
Removing the BUILTIN\Administrators Windows Group 338
Removing the BUILTIN\Administrators Windows Group with Transact-SQL 339
Using a Firewall to Filter Out Unwanted Traffic 339
Summary 346
Best Practices 346
Microsoft®SQL Server 2008 Management and Administration
Trang 149 Administering SQL Server Security and Authorization 349
What’s New for Security and Authorization with SQL
Server 2008? 349
SQL Server Security 350
Endpoints and Communication 352
Server Logins and Database Users 354
Role-Based Access 355
Database Schema 358
Password Policies 359
Logon Triggers 362
Security Management DDL 362
Managing Logins with DDL 362
Managing Users with DDL 364
Managing Roles with DDL 365
Managing Schemas with DDL 366
Managing Permissions with DDL 366
Administering SQL Server Security 367
Server Login Administration 368
Database User Administration 374
Database Role Administration 375
Security Schema Administration 377
Managing Application Roles 377
Server Endpoint Administration 378
Summary 381
Best Practices 381
10 Administering Policy Based Management 383 Introduction to Policy Based Management 383
Policy Based Management Concepts 385
Facets 385
Conditions 388
Policies 389
Categories 389
Targets 389
Execution Modes 390
Central Management Servers 391
Contents
Trang 15Implementing Policy Based Management 393
Creating a Condition Based on a Facet 394
Creating a Policy 395
Creating a Category 397
Evaluating Policies 399
Importing and Exporting Policies 401
Sample Templates and Real-World Examples 401
Sample Policy Templates 401
Recovery Models 402
Surface Area Configuration 402
SQL Server Health Checks 403
Object Naming conventions 403
Best Practices 403
Summary 403
Best Practices 404
11 Encrypting SQL Server Data and Communications 405 What’s New for Encryption with SQL Server 2008? 406
Encryption in SQL 406
Column Encryption 407
Encryption Hierarchy 408
Service Master Key 408
Database Master Key 408
Keys and Certificates 408
Encryption Algorithms 409
Securing the Data Storage 410
Creating a Database for Testing 410
Setting Up for Encryption 411
Creating the Encryption Certificate 411
Encrypting the Data 412
Using Encrypted Data 413
Attacking the Encryption 413
Using an Authenticator 416
Backing Up the Keys 418
Extensible Key Management 418
Enabling EKM 419
Creating the Cryptographic Provider 419
Creating the Credential to Access the HSM 420
Microsoft®SQL Server 2008 Management and Administration
Trang 16Creating the Encryption Key with EKM 420
Advantages of EKM 421
Transparent Data Encryption 421
Mode of Operation 421
Encryption Hierarchy 422
Enabling Transparent Data Encryption 422
Creating a Database Master Key in the Master Database 423
Creating Server Certificate in the Master Database 423
Creating a Database Encryption Key 423
Enabling Transparent Database Encryption for the Database 424
Disabling Transparent Database Encryption for the Database 425
Securing Connections 426
Hacking the Transmission 426
Configuring Server-Initiated Encryption 427
Hacking the Transmission: The Sequel 428
Using Certificates 429
Setting Up the Certificate Server 430
Provisioning a Server Certificate 432
SQL Server Certificate Configuration 434
Client Certificate Configuration 435
Client-Initiated Encryption 436
SQL Server Management Studio 437
SQL Server and BitLocker Drive Encryption 437
Examining BitLocker’s Drive Encryption Components and Windows Server 2008 Enhancements 438
Comprehending BitLocker’s Drive Encryption Hardware Requirements 440
Configuring BitLocker Drive Encryption on a SQL Server System 440
Configuring the System Partitions for BitLocker 440
Installing BitLocker Drive Encryption 442
Enabling BitLocker Drive Encryption 443
Utilizing the BitLocker Recovery Password 449
Removing BitLocker Drive Encryption 449
Summary 450
Best Practices 450
Contents
Trang 17Part III: SQL Server 2008 High Availability Alternatives 451
12 Implementing and Managing Failover Clustering 453
SQL Server 2008 Failover Clustering Overview 453
What’s New for SQL Server 2008 Failover Clustering When Running on Windows Server 2008? 454
Determining When to Implement a SQL Server 2008 Failover Cluster 455
Failover Clustering Terminology 456
SQL Server Failover Clustering Prerequisites 458
Failover Clustering Alternatives 459
SQL Server 2008 Failover Clustering Scalability Metrics 461
SQL Server 2008 Cluster-Aware Features 461
Combining Failover Clustering with Other SQL Server High-Availability Alternatives 461
Additional Elements of Failover Clustering 462
Windows Server 2008 Failover Cluster Quorum Models 462
Shared Storage for Failover Clusters 464
Types of Shared Storage 466
Implementing a Single-Instance SQL Server 2008 Failover Cluster 469
Preparing the Windows Server 2008 Operating System for Each Node 471
Configuring the Shared Storage for the Windows Server 2008 Failover Cluster 472
Preparing the Windows Server 2008 Failover Cluster 473
Creating the Windows Server 2008 Failover Cluster 475
Installing DTC as a SQL Server Failover Clustering Prerequisite 478
Installing the First Node in the Single-Instance SQL Server 2008 Failover Cluster 478
Installing Additional Nodes in the Single-Instance SQL Server 2008 Failover Cluster 485
Implement a Multiple-Instance SQL Server 2008 Failover Cluster 487
Installing the First Node in the Multiple-Instance SQL Server 2008 Failover Cluster 488
Installing Additional Nodes in the Multiple-Instance SQL Server 2008 Failover Cluster 490
Microsoft®SQL Server 2008 Management and Administration
Trang 18Managing Failover Clusters from a SQL Server 2008
Perspective 491
Verifying the Status of Clustered Service and Applications, Nodes, Storage, and Networks 491
Initiating Manual Service or Application Failovers 491
Managing SQL Server Failover Service Accounts 492
Managing Preferred Owners of a Cluster Node and Group 492
Managing Failover Clustering Failover Policies 493
Managing Failover Clustering Failback Policies 494
Removing SQL Server 2008 Nodes from an Existing SQL Server Failover Cluster 494
Removing SQL Server Failover Clustering 495
Managing Failover Clusters from a Windows Server 2008 Perspective 495
Administering Patch Management on a SQL Server 2008 Failover Cluster 496
Pausing and Resuming a SQL Server Cluster Node 496
Adding Additional Windows Nodes to the Cluster 496
Adding Storage to the Cluster 497
Managing Cluster Drive Dependencies 497
Cluster Quorum Configuration 498
Summary 499
Best Practices 499
13 Administering and Managing Database Mirroring 501 What’s New for Database Mirroring with SQL Server 2008? 502
SQL Server 2008 Database Mirroring Overview 503
Database Mirroring Terminology 505
Database Mirroring Configuration/Operating Modes 507
SQL Server Database Mirroring Prerequisites 508
When SQL Server 2008 Database Mirroring Is Desirable 509
Witness Server Placement 509
Combining Database Mirroring with Other SQL Server 2008 Technologies 510
Database Mirroring and Other High-Availability Alternatives 510
Database Mirroring and SQL Server 2008 Database Snapshots 511
Contents
Trang 19Administering a Database Mirroring Session 512
Configuring Database Mirroring Prerequisites 512
Configuring Database Mirroring with High Safety and Automatic Failover 513
Managing a Database Mirroring Session 520
Pausing and Resuming a Database Mirroring Session 520
Manually Failing Over a Database Mirroring Session 521
Changing the Database Mirroring Configuration/ Operating Mode 521
Removing a Database Mirroring Session 522
Managing Database Mirroring Client Connections and Redirect 523
Monitoring and Troubleshooting a Database Mirroring Session 525
Using the Database Mirroring Monitoring Tool to Manage Database Mirroring 525
Monitoring Database Mirroring Performance 527
Using the System Catalogs to Monitor Database Mirroring 528
Monitoring Database Mirroring with Operations Manager 2007 529
Summary 529
Best Practices 529
14 Implementing and Managing Log Shipping 531 What’s New for Log Shipping in SQL Server 2008? 531
SQL Server 2008 Log Shipping Overview 531
Understanding Log Shipping Terminology 533
Considering Environmental Factors 534
Deciding When to Use Log Shipping 535
Considering Design Factors 536
Combining Log Shipping with Other SQL Technologies 537
Administering Log Shipping 538
Configuring the Log Shipping Storage Locations 538
Configuring the Database Recovery Model 539
Implementing Log Shipping 540
Managing Log Shipping 549
Recovering from Log Shipping Interruptions 549
Managing Log Shipping Jobs 550
Microsoft®SQL Server 2008 Management and Administration
Trang 20Failing Over to a Secondary Server 551
Failing Back to the Primary Server 553
Managing Log Shipping from the Command Line 554
Monitoring and Troubleshooting Log Shipping 555
Viewing Log Shipping Reports 555
Querying Log Shipping Tables for Status 556
Using Log Shipping Stored Procedures 557
Summary 558
Best Practices 558
15 Implementing and Administering SQL Server Replication 561 What’s New in SQL Server 2008 Replication? 562
SQL Server 2008 Replication Essentials 562
SQL Server 2008 Replication Roles 563
Types of Replication Alternatives Available 564
Additional Replication Components 569
SQL Server 2008 Replication Topologies 570
SQL Server 2008 Replication Prerequisites 573
SQL Server 2008 Edition Limitations 574
Knowing When to Implement SQL Server 2008 Replication 574
Combining Replication with Other SQL Server High-Availability Alternatives 576
Administering SQL Server Replication 578
Creating the Distributor 578
Configuring Snapshot and Transactional Replication 581
Configuring Peer-to-Peer Transactional Replication 590
Configuring Merge Replication 593
Managing the Distributor’s Properties 596
Disabling Publishing and Distribution 598
Deleting Local Subscriptions 598
Deleting Local Publications 598
Managing Replication Passwords 598
Generating Replication Scripts 599
Monitoring and Troubleshooting SQL Server Replication 599
Summary 601
Best Practices 601
Contents
Trang 21Part IV: Monitoring and Troubleshooting SQL Server 2008 603
16 Managing Workloads and Consumption with
Resource Governor Concepts 606
Resource Governor Scenarios 608
Enabling Resource Governor 609
Creating a Classifier function 610
Troubleshooting Your Classifier Function 612
Creating a Resource Pool 613
Creating a Workload Group 615
Managing Resource Governor 618
Monitoring Resource Governor 619
Performance Monitor 619
Profiler 622
DMVs 622
Summary 625
Best Practices 625
17 Monitoring SQL Server 2008 with Native Tools 627 What’s New for Monitoring in SQL Server 2008? 628
Gaining Quick Insight into a SQL Server System 628
Leveraging Activity Monitor’s New Performance Dashboard 628
Leveraging Windows Server 2008 Task Manager 630
Obtaining Monitoring Metrics with Dynamic Management Views 634
Using Predefined SQL Server 2008 Standard Reports for Monitoring 636
Monitoring Job Activity 637
Monitoring SQL Logs 638
Monitoring Events with SQL Server Audit 640
SQL Server 2008 Audit Components 641
SQL Server Audit Failed Logon Attempt Example 643
Creating SQL Server Audits with SQL Server Management Studio 645
Enabling a SQL Server Audit with SQL Server Management Studio 647
Microsoft®SQL Server 2008 Management and Administration
Trang 22Create Server Audit Specification with SQL Server
Management Studio 648
Viewing an Audit Log 648
Create a Database Audit Specification with
Transact-SQL 649
Managing Audits and Audit Specifications 651
Data Collection with Performance Studio 653
Performance Studio Components and Architecture 653
Configuring the Management Data Warehouse 654
Set Up a Data Collection 657
Examining the System Data Collection Sets Included
with Performance Studio 658
Managing Data Collection Set Properties 661
Viewing Collection Set Logs 663
Capturing Performance Counters from Multiple SQL
Server 2008 Instances 664
Running Data Collection Reports 665
Creating Operators and Sending Email Alerts 666
Configuring Database Mail 666
Adding Operators 669
Defining Alerts 670
Using the Windows Server 2008 Performance and
Reliability Monitoring Tools 670
Additional Tools to Monitor SQL Server 2008 678
Using the SQL Server Profiler 678
Using the Database Engine Tuning Advisor 679
Summary 679
Best Practices 679
18 Proactively Monitoring SQL Server 2008 with System
Overview of System Center Operations Manager 682
Processing Operational Data 684
Generating Alerts and Responses 684
Outlining OpsMgr Architecture 684
Understanding How OpsMgr Stores Captured Data 686
Determining the Role of Agents in System Monitoring 686
Defining Management Groups 686
Contents
Trang 23Understanding How to Use OpsMgr 687
Managing and Monitoring with OpsMgr 687
Reporting from OpsMgr 688
Using Performance Monitoring 688
Using Active Directory Integration 688
Integrating OpsMgr with Non-Windows Devices 689
Integrating OpsMgr with Legacy Management Software 689
Exploring Third-Party Management Packs 689
Understanding OpsMgr Component Requirements 690
Exploring Hardware Requirements 690
Determining Software Requirements 691
OpsMgr Backup Considerations 691
Deploying OpsMgr Agents 691
Understanding Advanced OpsMgr Concepts 692
Understanding OpsMgr Deployment Scenarios 692
Multiple Configuration Groups 693
Deploying Geographic-Based Configuration Groups 693
Deploying Political or Security-Based Configuration
Groups 694
Sizing the OpsMgr Database 694
Defining Capacity Limits 695
Defining System Redundancy 695
Securing OpsMgr 696
Securing OpsMgr Agents 696
Understanding Firewall Requirements 697
Outlining Service Account Security 697
Exploring the SQL Server Management Pack 698
Downloading and Extracting the SQL Server 2008
Management Pack 701
Importing the SQL Server 2008 Management Pack
File into OpsMgr 2007 701
Installing the OpsMgr Agent on the SQL Server 702
Monitoring SQL Functionality and Performance with
Trang 2419 Performance Tuning and Troubleshooting SQL Server 2008 707
Platform Troubleshooting and Optimization 709
Platform Performance Measures 709
Database Engine and Integration Services
Profiler Trace Templates 719
Database Engine Tuning Advisor 721
Capturing a Workload 722
Analyzing the Workload 725
Reviewing the Results 726
Applying the Recommendations 729
Monitoring Processes with the Activity Monitor 730
Application Optimization and Troubleshooting 731
Query Analysis with Execution Plan 731
Query Analysis with the Tuning Advisor 733
Cursors and the Lazy Developer 734
Locking and Deadlock Detection 734
Introducing Extended Events to Troubleshoot SQL Server 736
Event-Related Components and Terminology 736
Creating an Extended Event with DDL Statements 738
Leveraging the Extended Events Catalog Views 740
Leveraging the Extended Events Dynamic
Management Views 740
Summary 741
Best Practices 741
Part V: SQL Server 2008 Bonus Content 743
20 Administering SQL Server 2008 with PowerShell 745
Trang 25Built-in Help Features 751
PowerShell Scripting Basics 754
A Few Basic Cmdlets 754
Creating a PowerShell Script 755
Dealing with CSV Files 767
Dealing with Dates and Times 768
Trang 26Scheduling Scripts 776
Common OS-Related Tasks 777
SQL Server–Specific Tasks 780
Using the Provider 781
Creating a Database Table 781
Doing a Database Backup 782
Checking Server Settings 784
Checking the Database Usage 784
Getting Table Properties 785
Cmdlet Example: Invoke-SqlCmd 786
Cmdlet Example: Invoke-PolicyEvaluation 787
Joining Columns 788
Retrieving an Entry 788
Summary 789
Best Practices 789
21 Consolidating and Virtualizing SQL Server 2008 with Hyper-V 791
Understanding Microsoft’s Virtualization Strategy 792
Integration of Hypervisor Technology in Windows
Server 2008 793
What’s New in Hyper-V? 794
Microsoft Hyper-V Server as a Role in Windows
Server 2008 794
Planning Your Implementation of Hyper-V 795
Sizing Your Windows Server 2008 System to Support
SQL Server 2008 Virtualization 795
SQL Server Virtualization Considerations 797
Running Other Services on the Hyper-V System 798
Planning for the Use of Snapshots on the Hyper-V
System 798
Installation of the Microsoft Hyper-V Server Role 799
Installing Windows Server 2008 as the Host
Operating System 799
Running Server Manager to Add the Hyper-V Role 799
Becoming Familiar with the Hyper-V Administrative Console 801
Launching the Hyper-V Administrative Console 801
Navigating and Configuring Host Server Settings 803
Contents
Trang 27Completing the Installation of the Guest Session 811
Installing SQL Server 2008 on the Guest Session 811
Modifying SQL Server 2008 Guest Session Configuration
Settings 811
Adding or Limiting the RAM of the Guest Session 812
Changing Network Settings for the Guest Session 812
Mounting a Physical CD/DVD Image or Mounting a
CD/DVD Image File 813
Other Settings to Modify for a Guest Session
Configuration 814
Launching a Hyper-V Guest Session 814
Automatically Launching a Guest Session 814
Manually Launching a Guest Session 816
Save State of a Guest Session 816
Using Snapshots of Guest Operating System Sessions 816
Snapshots for Image Rollback 817
Snapshots for Guest Session Server Fault Tolerance 817
Creating a Snapshot of a Guest Image 817
Rolling Back a Guest Image to a Previous
Trang 28About the Author
Ross Mistry, MVP, MCTS, MCDBA, MCSE Ross Mistry is a seasoned
professional in the Silicon Valley and a technology advocate with more than
a decade of experience in the computer industry As a principal consultant
and partner with Convergent Computing (CCO), Ross designs and
imple-ments SQL Server, Active Directory, and Exchange solutions for Fortune 500
organizations with a global presence Some of the organizations in which
Ross Mistry has taken on the role of lead global Microsoft architect include:
Network Appliance, Ross Stores Dress for Less, CIBC, Gilead Sciences,
Solectron, The Sharper Image, 2Wire, Infinera, and Wells Fargo’s small
busi-ness Ecommerce site
Ross had the opportunity to work with SQL Server 2008 two years prior to
the product release When he is not focused on his SQL Server specialties—
high availability, migrations, and security—his attention turns to SQL Server
development and Business Intelligence
Ross is an author, co-author, and technical editor of more than 10 books
Many of the books have been bestsellers Recently, he co-authored Windows
Server 2008 Unleashed and SQL Server 2005 Management and
Administration He was a contributing writer on Hyper-V Unleashed,
Exchange Server 2007 Unleashed, and SharePoint Server 2007 Unleashed.
Ross also took on the role of technical editor for SQL Server 2005 Unleashed
and SQL Server 2005: Changing the Paradigm.
In addition to being an author and consultant, Ross is a public speaker who
conducts seminars on Microsoft topics around the world He frequently
speaks at local SQL Server user groups and international conferences Most
recently, he spoke at the SQL Server PASS Community Summit in North
America, SQL Server Europe PASS, SQL Server Connections, and the
Microsoft campuses in San Francisco and the Silicon Valley
As a SQL Server Microsoft Most Valuable Professional (MVP), Ross is heavily
involved with the SQL Server community and assists by responding to questions
in newsgroups, writing articles for magazines, and blogging for networkworld
com and to IT managers on Microsoft’s TechNet Community Hub site His blog
site is http://www.networkworld.com/community/mistry
Trang 29Dedication
I dedicate this book to my immediate family and the
Almighty for providing me with the strength,
guidance, and fortitude for completing another
unthinkable task And to the next chapter in the
game of life: The New Beginning—01/01/2009.
Ross Mistry, MVP, MCTS, MCDBA, MCSE
Trang 30Acknowledgments
I would like to acknowledge my wife and children for their patience while I was
working on my third title I know it has been challenging not having a husband
and father around on evenings, weekends, and special holidays Your
unwaver-ing support and inspiration is what keeps me motivated and on the right track
A huge thank you goes out to Hilary Cotter for his contribution on the book
and for sharing his knowledge and contacts with me For this, I am much
obliged and look forward to future engagements
I would also like to acknowledge my other contributing writers: Shirmattie
Seenarine, John Welch, Marco Shaw, and Maciej Pilecki Thanks for putting
together great content on short notice Special thanks to Shirmattie Seenarine
for picking up the slack when other writers disengaged from the book Your
assistance ensured we met our deadlines
To the Sams Publishing team, especially Neil Rowe, Mandie Frank, Mark
Renfrow, and Margaret Berson, this was yet another great opportunity and
experience for me Thank you, Burzin Patel, Senior SQL Server Program
Manager at Microsoft, for providing insight and responding to my queries in
such a timely manner Also, I can’t forget Todd Robinson who was such a
meticulous technical editor
Thanks go out to the various co-authors of my previous books, SQL Server 2005
Management and Administration and Windows Server 2008 Unleashed,whose
knowledge and content are leveraged in this SQL Server 2008 book, including
Rand Morimoto, Chris Amaris, Alec Minty, and Omar Droubi
Lastly, to my best friend Lijon Geeverghese When I look back, it is hard to
believe how far we have come from the days of Pitfield Stay strong and keep
on trading; eventually we will beat the stock market!
Thanks to all—Ross Mistry
Trang 31We Want to Hear from You!
As the reader of this book, you are our most important critic and
commenta-tor We value your opinion and want to know what we’re doing right, what
we could do better, what areas you’d like to see us publish in, and any other
words of wisdom you’re willing to pass our way
You can email or write me directly to let me know what you did or didn’t
like about this book—as well as what we can do to make our books stronger
Please note that I cannot help you with technical problems related to the
topic of this book, and that due to the high volume of mail I receive, I might
not be able to reply to every message.
When you write, please be sure to include this book’s title and author as well as
your name and phone or email address I will carefully review your comments
and share them with the author and editors who worked on the book
Visit our website and register this book at
www.informit.com/title/9780672330445 for convenient access to any
updates, downloads, or errata that might be available for this book
Trang 32I N T R O D U C T I O N
SQL Server 2008 is Microsoft’s latest data platform providing data
management and analytical solutions for the enterprise The
plat-form is trusted, ensures business continuity, and is more
predictable and more scalable than ever before Although similar
to SQL Server 2005, SQL Server 2008 offers a tremendous
number of new features and functionality for database
administra-tors, developers, and business intelligence architects
This book is designed to be the ultimate guide for database
admin-istrators as it provides detailed guidance in the areas of planning,
installation, management, administration, security, high
availabil-ity, monitoring, and performance tuning of a SQL Server
environ-ment Moreover, this book includes industry best practices, tips,
and step-by-step instructions based on real-world examples
Some of the classic and new SQL Server 2008 topics covered in
the book include: installation, upgrade and migration strategies,
Policy Based Administration, Resource Governor, encryption,
failover clustering, database mirroring, authorization, hardening,
consolidation and virtualization, maintenance plans, monitoring,
performance tuning, troubleshooting, log shipping, PowerShell
scripting, replication, creating packages and transferring data,
indexes, full-text catalogs, and backing up and restoring databases
The book is also based on Microsoft’s latest award-winning server
operating system—Windows Server 2008 As a result, not only
will readers gain knowledge about SQL Server 2008, but they will
also have the opportunity to understand the advantages of running
SQL Server 2008 on Windows Server 2008
What Is in This Book?
This book is organized into five parts, with each part made up of
several chapters focusing on core SQL Server 2008 elements The
parts and chapters of the book are detailed in this section
Part I: Installing, Administering, and Managing the
Database Engine
The first part of the book begins by providing an overview of SQL
Server 2008, including planning and installing the new platform
After you get SQL Server 2008 installed, the majority of your time
will be spent managing and administering the new SQL Server
infra-structure Therefore, the remainder of Part I consists of chapters
dedi-cated to SQL Server 2008 administration and management tasks
Trang 33Chapter 1: Installing or Upgrading to the SQL Server 2008 Database
Engine
With the recent release of SQL Server 2008, organizations are eager to
migrate to the new and improved database platform However, many
organi-zations feel challenged when trying to establish the best strategies for moving
forward This chapter focuses on the various SQL Server 2008 migration
strategies that are available It answers the question once and for all whether
or not organizations should upgrade from a previous version or perform a
new SQL Server 2008 installation from scratch and then conduct a migration
Other topics highlighted in this chapter include: supported migration
method-ologies, hardware requirements, using the SQL Server 2008 Upgrade
Advisor, supported legacy versions of SQL Server, and best practices, tips,
and common pitfalls to look out for to achieve a successful migration
Moreover, this chapter describes the benefits associated with running SQL
Server on Windows Server 2008, and it also includes upgrade strategies for
moving to the latest server operating system
Chapter 2: Administering the SQL Server 2008 Database Engine
After SQL Server 2008 is installed, it is necessary to configure and
adminis-ter the server This chapadminis-ter focuses on adminisadminis-tering the core features and
components associated with the Database Engine Topics include
administer-ing the SQL Server properties pages, Database properties pages, Database
Engine folders, and the SQL Server Agent Managing server and database
configuration settings—such as memory, processor performance, auditing,
compression, database files, and autogrowth—is also covered in depth
Chapter 3: Creating Packages and Transferring Data with Integration
Services
A common database administrator task is transferring data or databases between
source and target environments This chapter focuses on importing, exporting,
and transforming data and databases via SQL Server Management Studio and
Integration Services The chapter also covers how packages are created, saved,
and executed as well as the management of the Integration Services component
Chapter 4: Managing and Optimizing SQL Server 2008 Indexes
Similar to an index found in a book, an index in SQL Server is utilized for
fast retrieval of data from tables This chapter explains index concepts, ways
to design the appropriate index strategy to maximize performance, creating
indexes with SQL Server Management Studio, and how to create indexes
with Transact-SQL The chapter also introduces new SQL Server 2008 index
topics, such as creating spatial and filtered indexes, and shares best practices
on implementing, managing, and optimizing indexes
INTRODUCTION
Trang 34Chapter 5: Administering SQL Server 2008 Full-Text Search
With the data explosion and the ever-increasing amount of data being stored
in its native format, full-text search is playing an increasingly important role
in databases today This chapter discusses the new features in SQL Server
full-text search and provides step-by-step instructions on how to implement
full-text search on your tables, and best practices for full-text search
Chapter 6: SQL Server 2008 Maintenance Practices
For SQL Server to perform at optimal levels, a DBA should conduct routine
maintenance on each database This chapter focuses on best practices
associ-ated with maintaining databases within the SQL Server Database Engine
The discussion includes creating maintenance plans to check database integrity,
shrink databases, reorganize indexes, and update statistics Additionally, this
chapter provides recommendations on daily, weekly, monthly, and quarterly
maintenance practices to be conducted on SQL Servers
Chapter 7: Backing Up and Restoring the SQL Server 2008
Database Engine
Backing and restoring databases is one of the most critical duties of a DBA It
is important that the DBA understand the concepts associated with SQL Server
backups, therefore, in the event of a disaster they can restore the database to the
point of failure This chapter covers the new backup compression feature, the
importance of backups, creating a backup and recovery plan, storage
architec-ture, transaction log files, recovery model, the various types of backups,
backing up with SSMS, automating backups with a maintenance plan, backing
up full-text catalogs, creating database snapshots, and of course, best practices
Part II: SQL Server 2008 Security Practices
Part II of SQL Server 2008 Management and Administration is dedicated to
SQL Server security The first two chapters cover hardening techniques for
both SQL Server 2008 and Windows Server 2008 and also discuss
adminis-tering security and authorization The next two chapters describe the new
features, Policy Based Management, and encryption
Chapter 8: Hardening a SQL Server Implementation
SQL Server is regularly targeted by hackers because it is a repository of
sensitive data for organizations If an organization’s system is breached,
hackers can gain access to confidential information including, but not limited
to, credit card numbers, social security numbers, and marketing information
As such, it is imperative that database administrators secure both the SQL
Server implementation and the data residing in it This chapter provides an
What Is in This Book?
Trang 35overview of how to harden a SQL Server implementation based on industry
best practices so that vulnerabilities and security breaches are minimized
Some of the security and hardening topics that the chapter delves into
include: choosing the appropriate authentication mechanism, hardening the
SA account, enforcing strong passwords, leveraging the configuration tools to
lock down a SQL Server, configuring the Windows Server 2008 advanced
firewall for secure access, selecting the correct service account, and applying
security templates with Active Directory
Chapter 9: Administering SQL Server Security and Authorization
After the SQL Server installation is hardened, the next step involves
adminis-tering security and granting authorization to the SQL Server environment
Chapter 9 is all about security administration topics: creating logons,
grant-ing access and authorization, understandgrant-ing SQL Server roles, administergrant-ing
password policies, endpoint authentication, SQL Server and database
princi-pals, role-based security, and user and schema separation
Chapter 10: Administering Policy Based Management
Enforcing best practices and standardization on large SQL Server
installa-tions was extremely difficult in previous versions of SQL Server To ensure
standardization, SQL Server 2008 introduces Policy Based Management,
which allows a DBA to define policies that can be applied to one or more
SQL Server instances, databases, and objects Policy Based Management
works on SQL Server 2000 and all its successors
New concepts, components, terminology, and reporting with Policy Based
Management as well as best practices are discussed in Chapter 10 The
reader’s attention is then turned to real-world step-by-step examples of how
to implement Policy Based Management in their environment
Chapter 11: Encrypting SQL Server Data and Communications
Organizations and DBAs are facing excessive pressure from regulatory
agen-cies to ensure that mission-critical data stored within SQL Server is
encrypted Not only is it important to ensure that data stored within SQL
Server is encrypted, but it is equally important to ensure that data in transit is
encrypted, database encryption can be implemented without making changes
to an application, data can be encrypted at the cell level, and finally, SQL
Server volumes can also be encrypted
Chapter 11 shares many strategies, tips, and best practices on how to leverage
the encryption-based technologies included in SQL Server 2008 and
Windows Server 2008 for end-to-end data protection Among these strategies
are: leveraging transparent data encryption, integrating security with a
INTRODUCTION
Trang 36Hardware Security Module (HSM), using certificates to encrypt data in
transit, and encrypting SQL Server volumes with BitLocker
Part III: SQL Server 2008 High-Availability Alternatives
DBAs typically feel compelled to choose just the right technologies to achieve
high availability when designing a SQL Server infrastructure Some of the
challenges they face are illustrated in their questions: Should I use failover
clustering, database mirroring, log shipping, or replication? Which alternative
provides the best protection? How does Windows Server 2008 impact my
deci-sion? This part of the book will alleviate pressure and concerns by providing
DBAs with best practices and tips on how to design and choose the right SQL
Server 2008 high-availability alternative to meet their organization’s needs
In this part, the chapters aim to teach DBAs how to select the appropriate HA
technology when designing and implementing SQL Server 2008
Technologies include failover clustering, log shipping, peer-to-peer
replica-tion, and database mirroring, based on Windows Server 2008
Chapter 12: Implementing and Managing Failover Clustering
The main focus of Chapter 12 is on how to design, configure, and manage a
single-instance or multiple-instance high-availability failover cluster with
SQL Server 2008
The chapter is also based on Windows Server 2008 As a result, it includes
the new features and prerequisites associated with implementing failover
clustering with SQL Server 2008 on Windows Server 2008 Step-by-step
procedures for both the Windows Server 2008 failover cluster and SQL
Server 2008 failover cluster are also provided
Chapter 13: Implementing and Managing Database Mirroring
Chapter 13 deals with configuring and managing database mirroring so that
organizations can enhance the availability of their SQL Server databases,
increase business continuity, and maintain a hot standby of their database in
another geographic location The chapter includes detailed step-by-step
instructions for configurations of all three database mirroring modes: high
availability, high protection, and high performance
This chapter also includes best practices from the field, case studies, and
discussions of how to integrate database mirroring with other high-availability
alternatives such as failover clustering and how to recover from a failed server
Chapter 14: Implementing and Managing Log Shipping
The focus of Chapter 14 is on configuring and managing log shipping This
chapter supplies step-by-step instructions on how to configure and maintain
What Is in This Book?
Trang 37one or more warm standby databases, typically referred to as secondary
data-bases Like the other high-availability chapters in this part, this chapter
includes real-world examples and industry best practices
Chapter 15: Implementing and Managing SQL Server Replication
SQL Server Replication is another way of distributing data from a source SQL
Server to either one or more target SQL Servers This chapter focuses on
replication components and provides a prelude to the different types of
repli-cation scenarios that a database administrator can manage, such as snapshot,
merge, and transactional replication Step-by-step replication configurations,
including the peer-to-peer replication scenario, a new form of high
availabil-ity, are also presented
Part IV: Monitoring and Troubleshooting SQL Server 2008
Part IV of this book covers monitoring, troubleshooting, and
performance-tuning techniques to ensure that SQL Server 2008 is optimized and
perform-ing at the highest possible levels
Chapter 16: Managing Workloads and Consumption with Resource
Governor
Unfortunately, with the previous releases of SQL Server, there was no way to
effectively mitigate performance issues associated with SQL Server
work-loads Thankfully, with SQL Server 2008, Microsoft introduced Resource
Governor, which provides persistent performance to end users and
applica-tions by giving Database Administrators the potential to define resource limits
and priorities on different SQL Server workloads This chapter focuses on
introducing, implementing, and configuring Resource Governor from a
data-base administrator perspective
Chapter 17: Monitoring SQL Server 2008 with Native Tools
SQL Server 2008 includes a tremendous number of native tools that should be
leveraged in order to monitor a SQL Server database and infrastructure This
chapter first teaches a DBA how to use native tools to gain quick insight into a
SQL Server system It then focuses on how to leverage the new SQL Server audit
functionality to monitor events and SQL Server activity and how to configure
database mail The final technologies described in this chapter are Performance
Studio, and Performance and Reliability Monitoring, which are new monitoring
technologies introduced with SQL Server 2008 and Windows Server 2008
Chapter 18: Proactively Monitoring SQL Server 2008 with System
Center Operations Manager 2007
Database Administrators and IT managers are under constant pressure to ensure
that their SQL Server systems are operating at optimal levels This can be very
INTRODUCTION
Trang 38challenging when managing a large SQL Server infrastructure It is
recom-mended for DBAs to leverage Operations Manager 2007 to proactively monitor
and provide a comprehensive view of the health of a SQL Server infrastructure
The discussion in this chapter focuses on the Operations Manager
compo-nents, installing the SQL Server management pack, and on how to use the
operations console to effectively monitor a SQL Server infrastructure By
gaining the upper hand in monitoring and managing a SQL Server
infrastruc-ture, Database Administrators can achieve the agility necessary to be
success-ful and focus on other tasks
Chapter 19: Performance Tuning and Troubleshooting SQL Server 2008
After SQL Server 2008 is placed in operation and is being monitored, it is
important to take action on the findings It is often difficult to anticipate
real-world loads during the development phase of application deployment; thus, it
is critical to adjust the parameters of the SQL Server 2008 platform to
opti-mize the performance after it is deployed Frequently, DBAs need to
trou-bleshoot the performance of SQL Server 2008 to address problems that are
uncovered by monitoring
This chapter focuses on how to tune, optimize, and troubleshoot the performance
of the SQL Server 2008 system Specific tools and components include Windows
Server 2008 System Monitor, performance thresholds, SQL Server Profiler,
Database Engine Tuning Advisor, Query Analysis, and Extended Events
Part V: SQL Server 2008 Bonus Content
The final part of the book offers bonus content, including leveraging
PowerShell to administer SQL Server and implementing Hyper-V to virtualize
a SQL Server infrastructure
Chapter 20: Administering SQL Server 2008 with PowerShell
SQL Server 2008 introduces support for Windows PowerShell PowerShell is
a new command-line shell and scripting language for automating server
administration Microsoft is beginning to integrate this new scripting language
into all of their server products This chapter discusses how to install
PowerShell, provides an overview of the language and how it is integrated
into SQL 2008, and then dives into how PowerShell can be leveraged to
undertake common SQL Server tasks
Chapter 21: Consolidating and Virtualizing SQL Server 2008 with
Hyper-V
Tremendous efforts are being made in the IT industry and the world to sustain
the environment Going green by consolidating and virtualizing servers is a
great way to simplify management, minimize data center costs, reduce power
What Is in This Book?
Trang 39consumption, and make the world a better place for future generations By
consolidating SQL Server instances and leveraging Windows Server 2008
Hyper-V for consolidating and virtualizing SQL Server databases and
instances, organizations can reduce the number of SQL Server systems within
the infrastructure This chapter focuses on how to plan and implement
Hyper-V and create virtualized guest sessions so that SQL Server systems can be
consolidated and virtualized In addition, SQL Server virtualization
considera-tions are also discussed
Sample Databases
To facilitate running the steps introduced throughout the book, all of the
examples are based on either the AdventureWorks2008 or Customer database
Both of these database samples can be downloaded directly from Microsoft’s
SQL Server sample website at http://www.codeplex.com/SqlServerSamples
The website and downloads also include the step-by-step instructions on how
to install the sample databases on SQL Server 2008
The exact link to the OLTP Adventureworks2008 sample can be found at
http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.asp
x?ReleaseId=18407 Be sure to choose the correct MSI file based on the 2008
schema and the processor type of your system
The Customer database can be downloaded from the sample Integration
Services Product Samples website at
http://www.codeplex.com/MSFTISProdSamples The package sample name is
“Execute SQL Statements in a Loop Sample Package” and the customer data
which needs to be imported into a newly created Customer database is located
in Customer.txt file
In addition, the book is based on SQL Server 2008 Enterprise Edition running
on Windows Server 2008 Enterprise Edition The following elements were
used for the scenarios of the book
Domain Controller TOR-DC01.companyabc.com
SQL Server Name TOR-SQL01\Instance01
TOR-SQL01\Instance02 Secondary Site San Francisco, California
SQL Server Name SFC-SQL01\Instance01
SFC-SQL02\Instance02 Disaster Recovery Site New York, New York
NYC-SQL01\Instance01 NYC-SQL02\Instance02
INTRODUCTION
Trang 40with Integration Services
2008 Indexes
Search
2008 Database Engine