What should you do to allow the members of the Role_Admin role to update the Accounts table with the leastadmi
You are the database administrator for a banking firm and maintain all the SQL Server 2008 databases of thefirm.
You create the Accounts table in the Sales schema of the database to store all information regarding thefirm’s customers.
To update the account details of a customer’s account, you instruct another databaseadministrator, Michelle, to create a stored procedure named Upd_account_details in the Sales schema in thedatabase. Michelle runs the following script to create the Upd_account_details procedure:
CREATE PROC Upd_account_details
@AccountName nvarchar(40)
@Address1 nvarchar(40)
@Address2 nvarchar(40)
@City nvarchar(25)
@State nvarchar(2)
@Phone nvarchar(20) AS
INSERT INTO Accounts VALUES
(@AccountName, @Address1, @Address2, @City, @State, @Phone) GO
ALTER AUTHORIZATION ON OBJECT::Upd_account_details TO Michelle; GO
You want to assign permissions on this procedure to the members of the Role_Admin role. You issue the following statement:
GRANT ALL ON OBJECT::Sales.Upd_account_details to Role_Admin
When John, a member of the Role_Admin role, attempts to update a record with the Upd_account_details stored procedure, he receives an error and is unable to update the record.
What should you do to allow the members of the Role_Admin role to update the Accounts table with the leastadministrative effort?
