Table of Contents | ||||
---|---|---|---|---|
|
See Database Users, Roles, and Passwords for a general database setup for Datical DB.
Create a Login User
Create a login user (datical_login
) for databases under Datical DB management.
Step 1: Identify the appropriate permissions for the Datical Login User
You must have the VIEW SERVER STATE
permission, which is required for all environments and Datical operations. The permission allows reading data from dynamic management views scoped to the server.
You can use the VIEW SERVER STATE
permission to monitor the health of a server instance, tune performance, or diagnose problems.
Step 2: Grant the appropriate permissions to the Datical Login User
Make sure that you are connected to the master database and the user you will create has access to read the metadata.
Code Block |
---|
USE [master]
GO
CREATE LOGIN [datical_login] WITH PASSWORD=N'password_goes_hereN'
GO
GRANT VIEW SERVER STATE to [datical_login]
GO |
Info |
---|
The default Azure password complexity rules are the following: minimum length of 8 characters, minimum of 1 uppercase character, minimum of 1 lowercase character, minimum of 1 number. |
Create a Database User
Create a user (datical_user
) for databases under Datical DB management and assign the needed roles to the user:.
Step 1: Identify the appropriate permissions for the Datical User
Datical permissions , which that are needed required for all environments.:
Info |
---|
Some of the permissions are optional depending on the criteria shown in the table. |
Role/Permission | When is this required? | PermissionsDescription |
---|---|---|
db_owner | This The role is required if you need to perform all configuration configurations and some maintenance activities on the database. | Manage Manages fixed-database role membership, configuration, and maintenance activities. |
db_ddladmin | This The role is required if you do not connect as the a database owner. | Run Runs any Data Definition Language (DDL) command in a database. |
db_datawriter | This The role is required if you do not connect as the a database owner. | AddAdds, deletedeletes, or change changes data in all user tables. |
db_datareader | This The role is required if do not connect as the a database owner. | Read Reads all data from all user tables. |
VIEW DATABASE STATE | This The permission is required for Datical operations. | Read Reads data from dynamic management views scoped to the database. |
Datical packager permissions, which are Packager permission that is required on reference database environments only. These permissions are :
Info |
---|
This permission is additional to the |
Role | When is this required? | PermissionsDescription |
---|---|---|
dbcreator | This The role is required to create an ephemeral copy of the database. | Can create and delete databases. A member of the Also, a user with the If the database being restored does not exist, the user must have
|
...
|
Step 2: Grant the appropriate permissions as defined to the Datical User
Info |
---|
Additional permissions are typically added to the reference database environments. |
Example See the script example to assign roles to datical_user
.:
DATICAL_USER
|
Example script to To assign the additional roles role to datical_user
for the reference database environments and packaging only:DATICAL_USER, you can use the following example:
|
...