Blocking users from accessing a database

  • hello Gurus

    I have an issue where a proc is being executed in dts package and this requires that all users be blocked from accesses that database.

    Is there a statement that will block the users from logging into the database.

     

     

  • ALTER DATABASE <Database Name>

    SET RESTRICTED_USER

    This will set the database such that only sysadmins, db_owners, and dbcreators can access the database. To revert it back:

    ALTER DATABASE <Database Name>

    SET MULTI_USER

    K. Brian Kelley
    @kbriankelley

  • Thanks.  I must have had a brain fart.  I was thinking way to complicated

Viewing 3 posts - 1 through 2 (of 2 total)

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