Zum Inhalt springen

Create Logins and Users in SQLServer Flex Instances

Diese Seite ist noch nicht in deiner Sprache verfügbar. Englische Seite aufrufen

Creating first login after creating a new SQLServer Flex instance

Section titled “Creating first login after creating a new SQLServer Flex instance”

Creating the first login is the first step after setting up a new SQLServer Flex instance. Without this login there is no possibility to access the instance and perform any operation there. The first login is the customer main account to perform database administrative tasks.

When setting up the login, the following requirements must be met:

  • There is no fixed name for the login, you can choose whatever you want.
    The password to this account, however, must adhere to SQL Server password policy, which includes the following rules:
    • Password does not contain the account name of the user.
    • Password is at least six characters long.
    • Password contains characters from three of the following four categories: uppercase letters, lowercase letters, base 10 digits, and symbols.
    • Password expires 90 days after the login creation or after the last password change.
    • User must change password at next login.
  • The login has to be assigned the SQL Server server role**##STACKIT_LoginManager##** in order to be able to create other logins.
    Using this account, you can create other logins with the same level of administrative permissions as the main administrative login, as well as other logins with normal permissions.
  • Also, the login needs the SQL Server server role **##STACKIT_DatabaseManager##** in order to be able to create databases.
    Any databases created by this login are owned by this account by default.

The login can be created via the following methods:

  1. Navigate to SQLServer Flex and select the database server on which you want to create a database.
  2. Select Users from the menu.
  3. Click Create User.
  4. Enter the username and select the roles for this user.
    See: Creating first login after creating a new SQLServer Flex instance.
  5. Select the default database for this user.
    If you do not select a database or there is none to select, the user will be assigned tempdb as default database.
  6. Click Create.
  7. Copy and save the created credentials in a safe place.
    These credentials cannot be retrieved later!
  8. Click Done.

The user is now available and can be used to create a new database. (See: Create Databases in SQLServer Flex Instances).

  • Click the username in the user list to see the details of a user.

Creating Database Users in SQLServer Flex Instance

Section titled “Creating Database Users in SQLServer Flex Instance”

After creating a normal server login, a database user has to be created to make this login able to connect to the database itself. The process of creating database users in SQLServer Flex instance is similar to the process of creating users in on-premises SQL Server.

The following methods can be used:

Database users can be created by connecting to one of SQL Server client tools, e.g. SQL Server Management Studio, Azure Data Studio or any other client tool that supports connection to SQL Server.

  1. Connect to the SQL Server Flex instance.
  2. Navigate to Databases → [database name] → Security → Users.
  3. Right-click on Users and select New User.
  4. In the window Database User - New go to the page General.
  5. Enter the user name for the database user.
  6. Select the server login name that will be mapped to the database user by clicking on … next to the input field.
  7. Optional, but recommended: Define the default schema for the database user.
  8. Go to the page Membership and add the necessary permissions. In the following example the database user receives the permission db_owner which lets him perform all required activities against the database.