Create a procedure called droplogins in this procedure


Question: 1. Create a procedure called "dropLogins". In this procedure, include the following code

Declare @Roles Table(DbRole varchar(20), MemberName varchar(50), MemberSID varchar(50));

insert into @Roles EXEC sp_HelpRoleMemberCustomerRole

The procedure sp_HelpRoleMember returns a table of users for the CustomerRole (see note below). The table is then inserted into a table variable called @Roles.

Declare a cursor for "select MemberName from @Roles" where MemberName has all the logins. Using the cursor and dynamic SQL, drop the member from the CustomerRole, drop the user and then drop the login.

Request for Solution File

Ask an Expert for Answer!!
Database Management System: Create a procedure called droplogins in this procedure
Reference No:- TGS02269500

Expected delivery within 24 Hours