Administering a SQL Database Infrastructure — Question 171
You have two databases named DB1 and DB2 that are located on the same server.
You plan to create a stored procedure named SProc1 in DB1. SProc1 will query a table named Table2 in DB2. You need to recommend a solution to ensure that
SProc1 can access Table2 without granting users direct access to Table2.
What should you include in the recommendation? More than one answer choice may achieve the goal. Select the BEST answer.
Answer options
- A. Contained databases
- B. Application roles
- C. Cross-database ownership chaining
- D. Digital certificates
Correct answer: B
Explanation
The correct answer is B, as application roles allow you to define a set of permissions that can be activated by the stored procedure, thus limiting user access to the underlying tables. The other options do not effectively restrict user access to Table2 while allowing SProc1 to access it as needed.