Setting Sage 500 database to restricted user mode

Less than one minute read time.

If you need to have an archived Sage 500 database you probably want to limit the access to that database by general users. In this situation restricted access mode can be employed to limit connections to high-level users only.
SQL Server's restricted access option provides a special access mode that permits multiple connections by users of specific groups. These are users with either of the "sysadmin" or "dbcreator" server roles, or users with the "db_owner" role for the database being modified. Any other users that attempt to connect to the database receive an error "Cannot open database "Sage500_app" requested by the login. The login failed."
The simplest method to set a database into restricted user mode is to use the following statement:

ALTER DATABASE database-name SET RESTRICTED_USER

Example: ALTER DATABASE Sage500_app SET RESTRICTED_USER


The above command immediately prevents new connections being made to the database by users who do not have the appropriate roles assigned.