292,178 views
44 votes
44 votes
Write a script that creates a user-defined database role named paymententry in the ap database. give update permission to the new role for the vendors and invoices table, update and insert permission for the invoicelineitems table, and select permission for all user tables.

User Raees Iqbal
by
2.9k points

1 Answer

13 votes
13 votes

Answer:

USE AP CREATE ROLE PaymentEntry

GRANT UPDATE, DELETE ON Invoices TO PaymentEntry

GRANT UPDATE, INSERT ON InvoiceLineItems TO PaymentEntry

EXEC sp_AddRoleMember db_datareader, PaymentEntry

Write a script that creates a user-defined database role named paymententry in the-example-1
User All Blond
by
3.2k points