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.
  2. Log in to SSMS with the MGDBCreator account, and create these user accounts:
    • MGMinPermissions
    • MGDev
  3. Assign these users to all databases for your application.
  4. In SSMS, create the custom role MG_Executor with execute permissions for all databases.
  5. Assign these permissions to the MGMinPermissions user account:
    • For all databases:
      • db_datareader
      • db_datawriter
    • For the Application database only, add mg_executor permissions.
  6. Assign these permissions to the MGDev user account for all databases:
    • db_reader
    • db_writer
    • mg_executor
    • db_ddladmin
  7. 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.

  8. Verify that everything works as expected.