tailieunhanh - The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P35

The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P35: Congratulations on your journey to become certified in SQL Server 2008. This book will help prepare you for your exam and give you a practical view of working with SQL Server 2008. | 152 Chapter 4 Managing Security USE Master GO EXEC sp_configure EXERCISE Enabling Database Mail You have just installed SQL Server 2008 and you are upgrading databases from SQL Server 2005. Many of the databases that you administer contain stored procedures that produce email alerts or emails containing reports. Since the Database mail feature is installed in a disabled state we need to enable DatabaseMailEnabled in the Surface Area Configuration tool. Follow these steps 1. In the SQL Server Management Studio right-click on the server that you wish to enable the DatabaseMail feature. 2. Select Facets from the menu 3. On the Facets screen select Surface Area Configuration from the Facets drop down. 4. Locate the DatabaseMail feature and change False to True and then click on the OK button. Your screen will look like Figure . Managing Security Chapter 4 153 Figure Enabling the DatabaseMail Feature Security and SQL Agent SQL Server job steps often need to do more than just execute Transact-SQL. In order to perform tasks such as operating system commands CmdExec executing Integration Services packages and PowerShell scripts various credentials often associated with Windows logins are necessary. SQL Server Agent Proxies mapped to the appropriate credentials necessary can be created and associated with one or more SQL Server Agent subsystems. You can associate one or more proxies with the available SQL Server Agent subsystems. See Figure for the SQL Server Agent subsystems that you can associate to proxies. 154 Chapter 4 Managing Security Figure SQL Agent Proxies Exam Warning VMake sure that you understand how the SQL Server Agent uses Proxies and how the credentials used need to have sufficient permissions to perform the required task but not in excess of what is needed. EXERCISE Create a SQL Server Agent Proxy You need to set up a Proxy so that SQL Server Agent can create a file in a Windows directory. We need to set up a credential for the