12 Chapter1•NewFeaturesinSQLServer2008 Encryption Enhancements In the past, to use whole database encryption efficiently, it was necessary to purchase a third-party product such as NetLib. There are many other products out there that can be used for this as well. Transparent data encryption (TDE) is available in SQL Server 2008.TDE allows you to easily encrypt the contents of your database and is designed to provide protection to the entire database. With TDE, you can encrypt the contents of your database with no changes to your application. To enable TDE, you need to first create a master key and a certificate. Once the master key and certificate are set up, use the following to enable TDE: ALTER DATABASE myDatabase SET ENCRYPTION ON Once TDE is enabled, it’s designed to be transparent to the application. Key Management and Encryption Encryption requires keys to secure the database. These keys must be protected and backed up so that in the event the system needs to be recreated, the data will still be accessible. An enterprise key management system can be incorporated where you use a hardware security module to store the keys in separate hardware. Encryption is covered in greater detail in Chapter 5. High Availability There are quite a few new features when it comes to higher availability in SQL Server 2008. Mirroring has been improved, Hot Add CPU has been added, and Hot Add Memory is available. This means you can add a CPU or memory without switching the server off. Special hardware is required to take advantage of Hot Add CPU and Hot Add Memory, and these are supported only in the Enterprise edition of SQL Server 2008. SQL Server 2008 can also take advantage of the new failover clustering enhancements available in Windows 2008. It’s important to note that not all features are available in all of the SQL Server editions. For example, failover clustering is not available in the Web edition or workgroup edition. Performance There are a number of performance enhancements in SQL Server 2008. Many of these upgrades are internal to SQL Server 2008, but there are a few worth mentioning. NewFeaturesinSQLServer2008•Chapter1 13 Performance Data Management Performance data management is a new tool available in SQL Server 2008. Performance data management allows you to collect performance-related data from your SQL Servers over time. Performance data management consists of a warehouse database (for storing the results) and the data collector, and collection is usually scheduled to run at specific times. Resource Governor (similar to Query Governor) Resource Governor is a nice new feature to help manage workload, designed to limit the resources available to a process. The way the Resource Governor works is the DBA creates a workload group and a resource pool. Workload groups are containers to hold user sessions. Workload groups are mapped to resource pools. User sessions are mapped to workload groups based on classifier functions. The classifier functions can be by IP address, username, application name, and so on. Figure 1.5 shows at a high level how it all fits together. Figure 1.5 Managing a Workload with Resource Governor Connections Classification Function Default Group Group A Group B Group C Default Pool Pool 1 Pool 2 14 Chapter1•NewFeaturesinSQLServer2008 Freeze Plan Freeze plan is a cool (pardon the pun) new feature in SQL 2008. Plan freezing is meant to offer greater predictability when it comes to executing a particular query in SQL Server 2008. By executing a few lines of code, you can create a plan guide, which is basically a cached plan that is kept around and used for a particular query. First, you need to create the data warehouse, which is fairly easy. There’s a wizard that will guide you through the steps in the management console. The wizard’s main dialog is shown in Figure 1.6. Figure 1.6 Creating a Data Warehouse The actual how to is found later in this book; it’s worthwhile knowing how to use this new feature. Figure 1.7 is a sample of one of the reports available in the data collection set. NewFeaturesinSQLServer2008•Chapter1 15 As you can see, this report can be useful. It provides quite a bit of information about your databases and their size and growth. Unfortunately, the data collection can be used only on SQL Server 2008 servers. It will not work if you connect to a SQL 2005 or SQL 2000 database server. SQL Server 2008 Declarative Management Framework Another exciting new feature in SQL Server 2008 is the Declarative Management Framework (DMF). This is basically a new policy-based management system for SQL Server 2008. The DMF is very similar to Windows policy; however, it’s much more focused on SQL Server specifics. For example, you can enforce a particular naming convention for stored procedures and a different naming convention for tables. There are three main components to the DMF: policies, conditions, and facets. See Figure 1.8. Figure 1.7 A Data Collection Report 16 Chapter1•NewFeaturesinSQLServer2008 To create or apply a policy, you would right click on the policy node and proceed from there. In the following screens, you’ll be prompted to use facets and conditions to create a policy. Development Improvements Now we’ll discuss a few development improvements that were made to SQL Server 2008. LINQ Support LINQ is a new technology. It’s more of a programming language than T-SQL. It’s basically a mapping of the database object to programming objects. This allows for a more object-oriented approach to dealing with database objects than in the past. This is a cool new feature and is covered in greater detail later on in this book. Figure 1.8 DMF Components . on SQL Server 2008 servers. It will not work if you connect to a SQL 2005 or SQL 2000 database server. SQL Server 2008 Declarative Management Framework Another exciting new feature in SQL Server. available in the Web edition or workgroup edition. Performance There are a number of performance enhancements in SQL Server 2008. Many of these upgrades are internal to SQL Server 2008, but there. switching the server off. Special hardware is required to take advantage of Hot Add CPU and Hot Add Memory, and these are supported only in the Enterprise edition of SQL Server 2008. SQL Server 2008