70 Appendix•SelfTestAppendix break the linked server you created for secured access to Oracle. Answer D is incorrect because you already have linked server, and while linked servers provide an alternative to distributed ad hoc distributed, they don’t prevent distributed ad hoc queries. 9. You need to write a query that joins data from your local SQL Server Instance with data from an Oracle instance. You need to be able to submit specific syntax to the Oracle instance to get the correct results by using a pass-through query. No linked servers currently exist for the remote Oracle instance. You are not an administrator on the system. Which one of the following choices meets your needs? A. Use OPENQUERY( ) B. Use OPENDATASOURCE( ) C. Use OPENROWSET( ) D. Create a Linked Server Correct Answer and Explanation: C. Answer C is correct becauseOPEN- ROWSET( ) allows you to submit pass-through queries to a remote system, and it does not require that you be an administrator as long as an administrator has allowed ad hoc distributed queries and enabled the required provider for ad hoc access. Incorrect Answers and Explanations: A, B, and D. Answer A is incorrect because OPENQUERY requires that you have a linked server definition in order to use it. Answer B is incorrect because the OPENDATASOURCE( ) function does not support pass-through queries. Answer D is incorrect because you are not an administrator, and don’t have the privilege to create linked servers on the SQL Server instance. 10. You need to provide support for distributed queries to a remote SQL Server instance, but you need to allow it only for selected users. Which one of the following solutions meets the requirements? A. Grant execute permissions on the OPENROWSET function to the selected users. B. Create a linked server and assign the selected users credentials to use when connecting to the remote instance C. Enable the “disallow adhoc access” on the SQL Server OLE DB to prevent ad hoc access SelfTestAppendix•Appendix 71 D. Use sp_configure to set the “Ad Hoc Distributed Queries” to 1 Correct Answer and Explanation: B. Answer B is correct because Linked servers allow you to create specific login details for individual users to remote databases. Incorrect Answers and Explanations: A, C, and D. Answer A is incorrect because you can not grant specific permissions to system functions. OPENROWSET is a system function. Answer C is incorrect because disallowing ad hoc access on the provider would affect all users, not just specific users. Answer D is incorrect because it allows all users, not just specific users, to perform distributed ad hoc queries. 11. Developers complain that they are receiving errors when trying to perform ad hoc distributed queries against Oracle, although they are able to run distributed ad hoc queries against SQL Server. What must you do to solve the problem? A. Install the Oracle client libraries on the developer workstations. B. Use sp_configure to set the “Ad Hoc Distributed Queries” to 1 C. Enable the “disallow adhoc access” property on the Oracle OLE DB provider D. Disable the “disallow adhoc access” property on the Oracle OLE DB provider Correct Answer and Explanation: D. Answer D is correct. Because developers can run ad hoc queries against other database engines, the problem must be specifically with the Oracle provider. Disabling the “disallow adhoc access” property on the Oracle provider would solve the problem. Incorrect Answers and Explanations: A, B, and C. Answer A is incorrect because distributed queries rely on the providers available on the server, not on the client workstations. Answer B is incorrect because developers can already run ad hoc queries against other SQL Servers. The option must already be turned on for the query to be true. Answer C is incorrect because enabling the “disallow adhoc access” property on the provider actually prevents its use in ad hoc queries. 12. You need to transfer a database to another server for testing purposes. You want to ensure that you get the entire database as well as any logins and SQL Server Agent Jobs related to the database. You want to perform the transfer as easily as possible. Which one of the following tools best meets your needs? A. Import and Export Wizard B. Copy Database Wizard 72 Appendix•SelfTestAppendix C. Business Intelligence Development Studio D. BCP Correct Answer and Explanation: B. Answer B is correct because the Copy Database wizard makes it easy to transfer an entire database, as well as environmental values like Logins and SQL Server Agent jobs between two instances of SQL Server. Incorrect Answers and Explanations: A, C, and D. Answer A is incorrect. Although you could use the Import and Export Wizard to transfer each and every table in the source database, you would not be able to transfer the other database objects like stored procedures and functions, nor the metadata. Answer C is incorrect because it isn’t the easiest way to accomplish the task. BIDS does make it possible to create packages that meet our needs, but it would involve much more effort to create and deploy the package than is required by the Copy Database Wizard. Answer D is incorrect because BCP could help move only the data itself, not the object definitions and metadata, nor the external objects like logins and SQL Server Agent Jobs. 13. You need to import data from an Access database into a database in SQL Server. You want to perform the import as simply as possible. Which one of the following options best meets the requirements? A. Import and Export Wizard B. Copy Database Wizard C. Business Intelligence Development Studio D. BCP Correct Answer and Explanation: A. Answer A is correct. The Import and Export Wizard makes it simple to directly export data from an Access database and import it into SQL Server. Incorrect Answers and Explanations: B, C, and D. Answer B is incorrect because it requires the source and destination both be SQL Server. Answer C is incorrect because while BIDS would allows us to create a package that meets our needs, it would not be as simple as the Import and Export Wizard. Answer D is incorrect because BCP import from flat files into SQL Server. 14. You need to deploy an SSIS package to a production server. You want to use package roles to control access to the packages. When the developer creates the package, which protection level should they use? SelfTestAppendix•Appendix 73 A. Encrypt sensitive with password B. Encrypt all with user key C. Rely on server storage and roles for access control D. Encrypt all with password Correct Answer and Explanation: C. Answer C is correct. To use the package roles, the package must be stored in the MSDB database, and be saved with the “Rely on server storage and roles for access control” protection level. Incorrect Answers and Explanations: A, B, and D. Answers A, B and D rely on passwords or a key unique to the package creator for access rather than package roles. 15. Your company implements formal development, test, and production environ- ments. Packages are using servers in the development environment, tested on servers in the test environment, and finally run in the production environment. You need to point the packages to the correct servers depending on the envi- ronment without having to edit the packages themselves. Which of the fol- lowing options best supports changing the properties of a package at runtime? A. Package Configurations B. DTExec command line options C. “SQL Server Integrations Services Packages” step in a job. D. DTExecUI options Correct Answer and Explanation: A. Answer A is correct. Package Configurations make it possible to store the various properties needed in the different environments in XML files, SQL tables or other locations. Package configurations can be assigned at run-time to easily change the properties of a package. Incorrect Answers and Explanations: B, C, and D. Answers B, C and D all use the same runtime to run a package. While you can use the options of the commands to manually set properties of packages when you run them, it is much more difficult and repetitive than using package configurations. 16. You receive a data file each day from a business partner. You need to import the file each morning after it is received. Your developers have created a package to properly import the file, and have deployed the package to your SSIS instance. When they saved the package, they used the “Encrypt all with 74 Appendix•SelfTestAppendix Password” protection level. You need to make sure the password can’t be seen in the scheduled job’s definition. What should you do to schedule the package? A. Create a SQL Server Agent job and use an “Operating System (cmdExec)” step to run the DTExec utility B. Create a SQL Server Agent job and use a “SQL Server Integration Services Package” step C. Use the “Scheduled Tasks” in windows to run the DTExec utility nightly D. Use the “Scheduled Tasks” in windows to run the DTExecUI utility nightly Correct Answer and Explanation: B. Answer B is correct. By using the SQL Server Integration Services Package job step, we can securely enter the password needed to open the package, and prevent it from being stored in clear text. Incorrect Answers and Explanations: A, C, and D. Answer A is incorrect because the password to access the package would be easily viewed by anybody who could read the jobs definition. Answer C is incorrect because it too would allow the passwords to be seen by anybody that could read the scheduled task’s definition. Answer D is incorrect because the DTExecUI uses a GUI. You should not schedule GUI programs that require user input. 17. You are a sysadmin on your SQL Server instance. You are trying to manage the package roles on the “Export Product Data” package shown in Figure 8.8, but receive an error. What must you do to allow the package roles to be used? A. Use the “Encrypt all with user key” protection level B. Use the “Encrypt all with password” protection level C. Save the package to the MSDB database rather than the file system. Figure 8.8 Exporting Product Data . queries rely on the providers available on the server, not on the client workstations. Answer B is incorrect because developers can already run ad hoc queries against other SQL Servers. The option. to schedule the package? A. Create a SQL Server Agent job and use an “Operating System (cmdExec)” step to run the DTExec utility B. Create a SQL Server Agent job and use a SQL Server Integration. servers in the test environment, and finally run in the production environment. You need to point the packages to the correct servers depending on the envi- ronment without having to edit the packages