tailieunhanh - Hướng dẫn học Microsoft SQL Server 2008 part 128
Đối với hợp đồng gần đây, khách hàng có 20 máy chủ dành riêng cho các dự án, trong đó bao gồm một môi trường dev, một môi trường thử nghiệm bảo đảm chất lượng, thử nghiệm hội nhập một môi trường, kiểm tra hiệu suất môi trường, và một môi trường sản xuất. | x-l I Cj mi Nrr r7 j-f . J __ X J - X 7 3 . . xr M. L vT ui- . V . 9 . h. w . 4 i - k v î i J T. v. L J- v ck X SV nK X A . 5 Schema Audit Triggers In some shops the path to production can be complicated. For a recent contract the client had 20 servers dedicated to the project which included a dev environment a QA testing environment an integration testing environment a performance testing environment and a production environment. Because the project scaled out using four servers each environment had four identical servers. Adding my development notebook to the mix pushed us to 21 machines. IN THIS CHAPTER Tracking schema changes At least once as I was deploying change scripts I missed a server and of course I wouldn t catch it in my testing. If I was lucky another DBA would catch it before it broke something for one of the app programmers. No doubt you ve been there too. While the schema audit trigger presented in this chapter couldn t have prevented my error it would have made it much easier to diagnose and correct. p This chapter builds on its sister chapter Chapter 27 j ._ - - _ . ._ 1 Creating DDL Triggers. That chapter demonstrates how to create a DDL trigger while this chapter applies the technology for a specific purpose. DDL triggers are easy enough to code but it s not a common task so I ve tried to automate the process for you with SchemaAudit an opensource schema auditing script available for download from my website or from . The SchemaAudit script creates a SchemaAudit table and installs the DDL trigger to track all schema changes. I P You can and should download the most recent version of j- 1 the SchemaAudit script from . It s quite likely this script will be updated over time. 1233 Part VIII Monitoring and Auditing SchemaAudit Table Just as with the Audit table in the previous chapter any audit system needs a repository. The following table is .
đang nạp các trang xem trước