User Setup on SQL Server

Last modified: August 19, 2024

Description

This document describes how to configure the users of a SQL server to create a secure environment for a Mendix based application. To create a secure environment it is important to make a clear distinction between an user with an administrator role and a regular user of the application.

Instructions

  • Create an administrator: Create a user with the administrator role, for example ‘MendixAdmin’.

  • Set the server roles for the administrator: Depending on the tasks this user has to execute the administrator role should be connected to the following database roles:

    Create Databases Create Users Database Maintenance Complete Maintenance
    dbcreator X
    diskadmin X
    processadmin
    securityadmin X
    serveradmin X
    setupadmin
    sysadmin X
  • Define the user mapping for the administrator: Associate all the databases related to Mendix with the administrator. The template for these databases should be dbo and the role of the administrator should be: db_owner.

  • Create (a) database user(s) for each Mendix application: Each Mendix application should have its own database user (or users).

  • Set the server role for each user: Associate each user with the role public.

  • Define the user mapping for each user: Associate all the databases related to Mendix with their respective user (or users). The template for these databases should be: dbo and the roles for each corresponding user should be: db_datareader and db_datawriter. Additionally, the user should be granted the view definition permission.

On this page you can find a step by step instruction on how to: Set up the database user

Read More