232 Chapter6•ManagingHighAvailability done when the system needs to be expanded. By having this ability when you need to add new CPUs to the server you do not have to take a system outage to increase the system’s processing power. Most of the top-tier hardware vendors support the Hot Add CPU function. If the server hardware does not support this feature then it is disabled at both the operating system and the SQL Server levels. In order to ensure your hardware supports this feature check with your hardware vendor. This feature is supported only by the Data center or Itanium Edition. The ability to hot replace CPUs also requires Data center or Itanium Edition. Hot Add Memory The ability to add RAM into the server is also a hardware and operating system function as well as a function of the SQL Server. Like the Hot Add CPU feature this gives you the ability to add RAM into the server without taking the server offline. In order to ensure your hardware supports this feature check with your hardware vendor. Only the Enterprise, Data center, and Itanium Editions of Microsoft Windows support this feature. In Windows 2003 this feature is not available in the 64-bit builds of Windows. The ability to hot replace RAM also requires Data center or Itanium Edition. ManagingHighAvailability•Chapter6 233 Summary of Exam Objectives We have set up a database mirror, using both the SQL Server Management Studio as well as T/SQL code. We also have failed over a database mirror, using both the SQL Server Management Studio as well as T/SQL code. We have configured and failed over a Clustered installation of SQL Server, log shipping from one server to another, and a high-availability solution using SQL Server replication. Exam Objectives Fast Track Defining High Availability Selecting the right storage options is critical to the proper design on your ˛ high-availability solution. High-availability solutions can be directly attached storage or SAN storage. ˛ The goal of the high-availability solution is to keep the system online after ˛ some key piece of hardware has failed. SQL High-Availability Options Clustered solutions most often are used to keep databases online within ˛ a single site due to the complexity of setting up a geographically dispersed cluster. Database mirroring is the newest of the solutions and can be used within ˛ a single site, or from site to site over a WAN. Log shipping is the oldest of the high-availability technologies that are ˛ available. However, this solution is still in use today. Expandability Hot add CPU and RAM requires special hardware to add hardware while ˛ the server is still online. Hot add CPU and RAM requires at least Windows Enterprise Edition if ˛ not the Data center Edition. Hot installation of RAM is available only on the 32-bit Edition of ˛ Microsoft Windows. 234 Chapter6•ManagingHighAvailability Exam Objectives Frequently Asked Questions Q: Which is better, RAID 5 or RAID 10? A: RAID 5 is better for systems that have mostly reads. RAID 10 is better for systems that have mostly writes. You will need to evaluate the specific system for which you are designing the storage before you can decide on a RAID level. Q: Why not use RAID 10 all the time? A: RAID 10 is an extremely expensive solution to use all the time. Part of the responsibility of the DBA is to ensure that you are using the right solution for the right situation. Q: Since my hard drives are backed up to other hard drives, does this mean that I don’t need to back up my database anymore? A: No, you should still back up your database as you did before. It is possible that more than one hard drive will fail at the same time. Without a good database backup you would lose all the data in the database. Q: What is the best high-availability solution for moving data long distances? A: When you have to move data long distances database mirroring in high performance mode, and log shipping will be your best bet. These solutions allow for a small amount of data loss, but will not impact the performance of your production database when transmitting data across the WAN like database mirroring in high safety mode or using a Windows Cluster. Q: How does clustering provide a high-availability solution when the servers are sharing the storage? A: The storage systems that are used behind a Windows Cluster (typically a SAN) are very high-end systems that are designed to survive a hardware failure within themselves. They will often detect that a hard drive is starting to go bad before it actually does and take that drive out of service before it fails so that the drive can be replaced before the system is running in an unprotected state. ManagingHighAvailability•Chapter6 235 Q: When setting up database mirroring when the primary and mirror are in different data centers, which data center should the witness be in? A: The witness should be in the backup data center along with the mirror server. This way if the primary server or data center fails the witness will still be online and can tell the mirror that it needs to become active. 236 Chapter6•ManagingHighAvailability Self Test 1. You are designing a new database server for your company. You wish to store the database’s MDF file and NDF files on the most cost efficient storage possible, while providing a redundant storage solution. Your database will be 95% reads, and 5% writes. What RAID level should you use for your MDF and NDF files? A. RAID 0 B. RAID 1 C. RAID 5 D. RAID 10 2. You are configuring log shipping on your OLTP database from one data center to another. You need to ensure that the minimum amount of bandwidth is used when moving the logs from your primary site to the backup site. When configuring the log backups, which option should you select to meet your goal? A. Use the default server setting B. Compress backup C. Do not compress backup 3. You are setting up log shipping for a database between two instances of SQL Server 2008. You want to ensure that your users have access to the database when the logs are not actively being restored so that they can read the updated data for reporting purposes. In what state should you leave the database? A. RECOVERY B. NO RECOVERY C. STANDBY 4. Which of the following database mirroring modes requires the use of a witness instance? A. High Performance with automatic failover B. High Performance . power. Most of the top-tier hardware vendors support the Hot Add CPU function. If the server hardware does not support this feature then it is disabled at both the operating system and the SQL Server. system function as well as a function of the SQL Server. Like the Hot Add CPU feature this gives you the ability to add RAM into the server without taking the server offline. In order to ensure. 233 Summary of Exam Objectives We have set up a database mirror, using both the SQL Server Management Studio as well as T /SQL code. We also have failed over a database mirror, using both the SQL Server