1. Trang chủ
  2. » Công Nghệ Thông Tin

Microsoft Press Configuring sql server 2005 môn 70 - 431 phần 8 pot

98 231 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 98
Dung lượng 2,85 MB

Nội dung

650 Chapter 17 Review Take a Practice Test The practice tests on this book’s companion CD offer many options. For example, you can test yourself on just the content covered in this chapter, or you can test yourself on all the 70-431 certification exam content. You can set up the test so that it closely sim- ulates the experience of taking a certification exam, or you can set it up in study mode so that you can look at the correct answers and explanations after you answer each question. MORE INFO Practice tests For details about all the practice test options available, see the “How to Use the Practice Tests” section in this book’s Introduction. C1762271X.fm Page 650 Friday, April 29, 2005 8:02 PM 651 Chapter 18 Implementing Log Shipping Log shipping is the automated process of backing up, copying, and restoring the trans- action log from one database on a primary server to one or more secondary databases on another server. Using log shipping, you can frequently synchronize the copy of the database with the original, so you can use the copy to distribute query processing for improved performance or as a warm standby database for high availability. This chap- ter will explain log shipping’s components, processes, and requirements. It then will show you how to configure the primary and secondary databases, the various log shipping options, and the optional monitor server for optimal operations. Exam objectives in this chapter: ■ Implement log shipping. ❑ Initialize a secondary database. ❑ Configure log shipping options. ❑ Configure a log shipping mode. ❑ Configure monitoring. Lessons in this chapter: ■ Lesson 1: Preparing to Log Ship. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653 ■ Lesson 2: Configuring Log Shipping Options . . . . . . . . . . . . . . . . . . . . . . . . . . 658 ■ Lesson 3: Configuring Log Shipping Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 ■ Lesson 4: Configuring Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 Before You Begin To complete the lessons in this chapter, you must have ■ A computer that meets the hardware and software requirements for Microsoft SQL Server 2005. ■ SQL Server 2005 Developer, Workgroup, Standard, or Enterprise Edition installed. ■ SQL Server Agent running and configured with a Microsoft Windows service account. C1862271X.fm Page 651 Friday, April 29, 2005 8:03 PM 652 Chapter 18 Implementing Log Shipping Real World Javier Loria Business users usually like the idea of log shipping because it doesn’t require expensive hardware. The first time I explained the benefits of log shipping to one of my customers, she liked the idea so much that she wanted to replace all her clustered servers with a log shipping implementation. I explained that log shipping configurations don’t automatically redirect users from one server to another as clustered servers do and that reconfiguring the secondary system as your primary system might take some time. After she reviewed the business objectives of each of her database servers, she chose to use log shipping technol- ogy for only three servers that do not run mission-critical applications. C1862271X.fm Page 652 Friday, April 29, 2005 8:03 PM Lesson 1: Preparing to Log Ship 653 Lesson 1: Preparing to Log Ship Before you configure log shipping, you need to understand log shipping’s architecture and requirements. In this lesson, you’ll learn how SQL Server 2005 implements log shipping and its requirements for log shipping. After this lesson, you will be able to: ■ Explain how log shipping works. ■ List the server and database requirements for log shipping. Estimated lesson time: 15 minutes Understanding Log Shipping Log shipping synchronizes distributed databases that can reside on different servers or on the same server but within different instances. A log shipping configuration doesn’t automatically fail over from the primary server to the secondary server. If you need to switch from the primary database to a secondary database, you bring the sec- ondary database online manually. SQL Server uses SQL Server Agent jobs to automate log shipping operations. Log shipping defines SQL Server Agent jobs to automate backup, copy, and restore pro- cesses at scheduled times. SQL Server then stores information about the history of its execution of jobs in the msdb database. MORE INFO SQL Server Agent For more information about SQL Server Agent, see Chapter 14, “Working with SQL Server Agent Jobs.” NOTE Log shipping in SQL Server 2005 Unlike in previous versions of SQL Server, log shipping in SQL Server 2005 is not part of the Data- base Maintenance Plan Wizard. The recommended log shipping configuration comprises five components: a primary database, a secondary database, a primary server, a secondary server, and a monitor server. Although a separate monitor server is optional, this configuration provides the C1862271X.fm Page 653 Friday, April 29, 2005 8:03 PM 654 Chapter 18 Implementing Log Shipping best setup for effective administration of your log shipping process. Table 18-1 defines each component. Figure 18-1 illustrates these components in a typical log shipping configuration. Figure 18-1 Typical log shipping configuration Table 18-1 Log Shipping Terms Term Definition Primary database The primary database is the original database that’s distrib- uted to other servers. The primary database receives the updates from the application. Secondary database The secondary database is the distributed copy of the pri- mary database. The secondary database is frequently synchronized through transaction log restores. Primary server The primary server is the SQL Server database engine instance that owns the primary database. Secondary server The secondary server is the SQL Server database engine instance that owns a secondary database. You can config- ure multiple secondary servers. Monitor server The monitor server is the SQL Server database engine instance that keeps track of the log shipping process and raises alerts when the process fails. Monitor Server Secondary Server Primary Server Primary Database Secondary Database C1862271X.fm Page 654 Friday, April 29, 2005 8:03 PM Lesson 1: Preparing to Log Ship 655 BEST PRACTICES Server configuration The same server can play different roles within the same log shipping configuration or in different log shipping configurations. For example, you could use the same server as both the primary server and the monitor server in the same configuration. However, to create a more fault-tolerant system, you shouldn’t use the monitor server as the primary or secondary server in the same configuration. The log shipping process consists of three main operations: ■ Backing up the transaction log of the primary database. ■ Copying the transaction log backup to each secondary server. ■ Restoring the transaction log backup on the secondary database. Understanding Log Shipping Requirements Log shipping requires the following infrastructure: ■ You must have at least two SQL Server 2005 database engine servers or two data- base engine instances in your log shipping implementation. To configure a sep- arate monitor server, you need three servers or three instances. However, for testing and learning purposes, you can configure the same server as the primary, secondary, and monitor server. ■ All servers participating in the log shipping process must have SQL Server 2005 Standard, Workgroup, Enterprise, or Developer Edition installed. SQL Server 2005 Express Edition does not support log shipping. IMPORTANT SQL Server 2003 log shipping version compatibility Previous versions of SQL Server cannot participate in a SQL Server 2005 log shipping process. ■ SQL Server Agent services should be running and configured with network cre- dentials. You can configure log shipping with SQL Server Agent services stopped, but the process doesn’t run automatically. ■ The primary database must be configured with the Full or Bulk-Logged recovery model. ■ You must have a shared folder to copy the transaction log backups to. The SQL Server Agent service account of the primary server should have read/write access either to the shared folder or to the local NTFS folder. The SQL Server Agent account of the secondary server should have read access to the shared folder. ■ The user configuring the log shipping process must have sysadmin access to the participating servers. C1862271X.fm Page 655 Friday, April 29, 2005 8:03 PM 656 Chapter 18 Implementing Log Shipping Quick Check ■ Your manager wants to use SQL Server 2005 Express Edition to monitor the log shipping process. What should you tell him? Quick Check Answer ■ Log shipping is not supported in SQL Server 2005 Express Edition. Lesson Summary ■ Log shipping uses SQL Server Agent jobs to automate the process of backing up, copying, and restoring data from a primary database on one server or instance to one or more secondary databases on another server or instance. ■ You can use the secondary database either to improve application performance by allowing distributed queries or to improve availability. ■ You can also configure a monitor server to record the status and historic infor- mation about log shipping jobs. ■ Among the prerequisites for log shipping is that the primary database must be in either Full or Bulk-Logged recovery mode. Lesson Review The following questions are intended to reinforce key information presented in this lesson. The questions are also available on the companion CD if you prefer to review them in electronic form. NOTE Answers Answers to these questions and explanations of why each answer choice is right or wrong are located in the “Answers” section at the end of the book. 1. Which SQL Server versions can participate in a SQL Server 2005 log shipping configuration as a monitor server? (Choose all that apply.) A. SQL Server 2005 Enterprise Edition B. SQL Server 2005 Express Edition C. SQL Server 2000 Standard Edition D. SQL Server 2005 Workgroup Edition C1862271X.fm Page 656 Friday, April 29, 2005 8:03 PM Lesson 1: Preparing to Log Ship 657 2. Which of the following database options can be responsible for preventing a log shipping configuration from succeeding? A. ANSI NULL Default: True B. Compatibility Level: SQL Server 2000 (80) C. Quoted Identifiers Enable: False D. Recovery Model: Simple 3. Which permissions are required on the backup shared folder to create a log ship- ping configuration? (Choose all that apply.) A. Primary SQL Server Agent service account: full permissions. B. Primary SQL Server Agent service account: read/write. C. Secondary SQL Server Agent service account: read. D. Secondary SQL Server Agent service account: no access. C1862271X.fm Page 657 Friday, April 29, 2005 8:03 PM 658 Chapter 18 Implementing Log Shipping Lesson 2: Configuring Log Shipping Options SQL Server 2005 offers three methods for configuring log shipping. The most straightforward method is via SQL Server Management Studio (SSMS), the graphical user interface (GUI) tool that database administrators (DBAs) use to configure, administer, and maintain SQL Server 2005, including log shipping tasks. Alterna- tively, you can use Transact-SQL statements or SQL Server Management Objects (SMO) to configure log shipping. In this lesson, you will learn how to use SSMS to cre- ate a log shipping configuration. The general steps for setting up a log shipping con- figuration are as follows: 1. Enable the primary database for log shipping. 2. Set log shipping backup options. 3. Enable secondary servers. 4. Set log shipping restore options. After this lesson, you will be able to: ■ Enable the primary database for log shipping. ■ Set log shipping backup options. ■ Use SSMS to script the log shipping configuration. ■ Enable secondary servers. ■ Set log shipping restore options. Estimated lesson time: 40 minutes How to Enable the Primary Database You configure log shipping in SSMS from the Database Properties window. Here’s how to enable the primary database for log shipping: 1. To display the Database Properties windows, open SSMS. 2. Connect to the database engine server that hosts the database and navigate to the appropriate database. 3. Select the database you want, right-click the database, and then choose Properties. C1862271X.fm Page 658 Friday, April 29, 2005 8:03 PM Lesson 2: Configuring Log Shipping Options 659 4. Below Select A Page, select the Transaction Log Shipping page (see Figure 18-2). Remember that only users with sysadmin access can create log shipping configurations. Figure 18-2 SSMS Database Properties window 5. To configure the database as the primary database in your log shipping imple- mentation, select the Enable This As A Primary Database In A Log Shipping Con- figuration check box. Defining Log Shipping Backup Options With the primary database enabled, you can now configure backup settings for the database. When you select the Enable This As A Primary Database In A Log Shipping Configuration check box on the Transaction Log Shipping page of the Database Prop- erties window, the Backup Settings button is enabled. To start your backup definition, click Backup Settings to display the Transaction Log Backup Settings window, shown in Figure 18-3. C1862271X.fm Page 659 Friday, April 29, 2005 8:03 PM [...]... database, see the SQL Server 2005 Books Online section titled SQL Server Language Reference-Transact -SQL Reference-System Tables -SQL Server Agent Tables.” Besides these standard SQL Server Agent job records, log shipping records specific log shipping infor mation in t he log_shipping_monitor_er ror_det ail and C 186 2271X.fm Page 685 Friday, April 29, 2005 8: 03 PM Lesson 4: Configuring Monitoring 685 log_shipping_monitor_history_detail... Procedures” topic in SQL Server 2005 Books Online SQL Server 2005 Books Online is installed as part of SQL Server 2005 Updates for SQL Server 2005 Books Online are available for download at www .microsoft. com/technet/prodtechnol /sql/ 2005/ downloads/books.mspx How to Configure Secondary Databases The log shipping configuration doesn’t distribute any data until you configure a secondary server If you are... Copy Files task Configuring Log Shipping Restore Options The last step of configuring the secondary server is specifying the settings for the restore task You specify these settings on the Restore Transaction Log tab of the Secondary Database Settings dialog box (see Figure 1 8- 6 ) C 186 2271X.fm Page 666 Friday, April 29, 2005 8: 03 PM 666 Chapter 18 Implementing Log Shipping Figure 1 8- 6 Secondary Database... the log shipping configuration D The primary server is having performance issues and is losing user connections; you need to increase the primary server s hardware resources C 186 2271X.fm Page 684 Friday, April 29, 2005 8: 03 PM 684 Chapter 18 Implementing Log Shipping Lesson 4: Configuring Monitoring Log shipping enables you to configure a separate monitor server to capture the history and status of... Right-click the LSTesting database and choose Properties 3 Select the Transaction Log Shipping page 4 Below Secondary Databases, click Add C 186 2271X.fm Page 674 Friday, April 29, 2005 8: 03 PM 674 Chapter 18 Implementing Log Shipping 5 Click Connect Use the appropriate credentials to connect to the secondary server If you are using the same instance as your secondary server, connect to the default server. .. restore backup operation begins C 186 2271X.fm Page 680 Friday, April 29, 2005 8: 03 PM 680 Chapter 18 Implementing Log Shipping Quick Check Answers 1 False Standby mode puts the secondary database in read-only access mode No database updates are allowed 2 True This default setting leaves user connected to the database, which will cause the restore job to fail PRACTICE Configuring Standby Mode In these... initialization, copy files, and restore options Figure 1 8- 4 Secondary Database Settings dialog box C 186 2271X.fm Page 664 Friday, April 29, 2005 8: 03 PM 664 Chapter 18 Implementing Log Shipping 2 To set up the connection to a secondary database, first select the secondary server that is the owner of the secondary database by clicking Connect to display the Connect To Server dialog box Provide the required credentials... the current activity of SQL Server jobs, and sysjobhistory keeps track of the historic execution of jobs Because backup jobs are executed on the primary server, and copy and restore jobs are executed on the secondary server, the backup history information is stored on the primary server, and copy and restore history information is stored on the secondary server MORE INFO SQL Server agent tables For... file to the secondary server, and configure the secondary database using the Restore An Existing Primary Database Backup In The Secondary Server option C 186 2271X.fm Page 667 Friday, April 29, 2005 8: 03 PM Lesson 2: Configuring Log Shipping Options 667 Real World Javier Loria Designing a fault-tolerant environment for the database does not necessarily guarantee that you have a fault-tolerant system After... monitor server must have sysadmin access to the monitor server 3 Because log shipping jobs (backup, copy, and restore) will store information in the monitor server instance, you must choose how these jobs will authenticate in the monitor server The default option is to impersonate the proxy account of the job, which means using the SQL Server Agent service account for authentication (see Figure 1 8- 9 ) You . Which SQL Server versions can participate in a SQL Server 2005 log shipping configuration as a monitor server? (Choose all that apply.) A. SQL Server 2005 Enterprise Edition B. SQL Server 2005 Express. topic in SQL Server 2005 Books Online. SQL Server 2005 Books Online is installed as part of SQL Server 2005. Updates for SQL Server 2005 Books Online are available for download at www .microsoft. com/technet/prodtechnol /sql/ 2005/ downloads/books.mspx. How. 14, “Working with SQL Server Agent Jobs.” NOTE Log shipping in SQL Server 2005 Unlike in previous versions of SQL Server, log shipping in SQL Server 2005 is not part of the Data- base Maintenance

Ngày đăng: 09/08/2014, 09:21

TỪ KHÓA LIÊN QUAN