Skip to content

Create databases

Last updated on

In order to follow the steps described on this page, the following conditions need to be met:

Considerations for Creating Databases on SQLServer Flex

Section titled “Considerations for Creating Databases on SQLServer Flex”
  • Database naming:
    Database names can only contain alphanumeric characters (a-z, A-Z, 0-9 without umlauts)
    together with “_”, other special characters or space are not allowed.
    Database names should not be longer than 80 characters.

  • Database options / parameters:
    The creation of databases is currently supported by specifying the database name, the owner, the compatibility level and the collation as parameters.

  • Database initial:
    When creating databases via Portal or API, the databases are being created with two files only (1 data file and 1 log file).
    When creating databases using Transact SQL (T-SQL), you can set up the databases yourself.
    However, the files should only be created in certain locations, whereby the following recommendations apply for better hard disk management:

    • Data files must be created in the following location: /var/opt/mssql/custdata/.
    • Log files must be created in the following location: /var/opt/mssql/custlog/.
    • It is best not to enter any path information when creating (on PRIMARY / LOG on).

    Databases can not be created with files less than:

    • 128 MB for data files with auto-growth of 64 MB.
    • 64 MB for log files with auto-growth of 64 MB.
  • Database collation:
    Databases can be created with any customized collation value.
    However please keep into consideration that the server collation value is fixed at the current release with value: SQL_Latin1_General_CP1_CI_AS,
    so the tempdb collation will always be SQL_Latin1_General_CP1_CI_AS.

  • Database compatibility level:
    The Database Compatibility Level sets the Database in the proper feature level mode for the SQLServer.
    This means, that the SQL Server will run this Database with the features developed for the defined compatibility level.

  • Database recovery model:
    Databases should always be in FULL recovery model in order to guarantee the RPO level defined in SLA.

  1. Navigate to SQLServer Flex and select the database server on which you want to create a database.
  2. Create the database user for your new database.
    See: Create Logins and Users in SQLServer Flex Instances
  3. Select Databases from the menu.
  4. Click Create Database.
  5. Enter the database details in the form.
    See: Considerations for Creating Databases on SQLServer Flex
  6. Click Create.