Script to disable particular role of all users of database

  •  

    Hi Guys,

    Consider following details,

    Suppose,

    Database - Test, Users - 100 and

    I have defined two roles - Test_Read and Test_Write and assigned Test_Read role to all users.

    Now I want to remove Test_Read role for  all users at one go. But not got the success till yet.

    If anyone can come up with nice scripts to do so, efforts will be highly appreciable.

    Thanks,

    Vivek

    /**A strong positive mental attitude will create more miracles than any wonder drug**/

  • This may not be at all elegant, but why don't you simply remove all privileges of Test_Read?


    Cheers,
    - Mark

  • Try add Test_Read role as member of db_denydatareader role.

  • I am not satisfied, as this is not working. Users can login and access the application

     

    Vivek

     

    /**A strong positive mental attitude will create more miracles than any wonder drug**/

  • hi,

    after 3 days of pain, i have got the job done. thanks others for their time to look into the problem....

     

    We need people in action to accomplish impossible to possible.

     

    Vivek

     

    /**A strong positive mental attitude will create more miracles than any wonder drug**/

  • can you post your final solution so we can benefit from your work?

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply