Creating SQL Server logins

This topic presents the recommended process to create SQL Server logins that satisfy the minimum requirements to create and use SQL databases for Mongoose-based applications. These are not requirements, and you are free to alter the process and permissions according to your own needs.

  1. In SQL Server Management Studio (SSMS), create a user account named MGDBCreator and assign it the db_creator and sysadmin roles.

    This user account is used only by the Configuration Wizard.

  2. Use the Configuration Wizard with the MGDBCreator user account to create the databases for your application.
  3. Log in to SSMS with the MGDBCreator account, and create these user accounts:
    • MGMinPermissions
    • MGDev
  4. Assign these users to all databases for your application.
  5. In SSMS, create the custom role MG_Executor with execute permissions for all databases.
  6. Assign these permissions to the MGMinPermissions user account:
    • For all databases:
      • db_datareader
      • db_datawriter
    • For the Application database only, add mg_executor permissions.
  7. Assign these permissions to the MGDev user account for all databases:
    • db_reader
    • db_writer
    • mg_executor
    • db_ddladmin
  8. Use the Configuration Manager utility to create these configurations:
    • A run-time configuration with the MGMinPermissions SQL user account to all databases for this configuration.
    • A development configuration with its own development application

      Assign the MGDev SQL user account to all databases for this configuration.

  9. Verify that everything works as expected.