If a database does not exist at the point that it is required, it is created on-the-fly; this can be slow for certain RDBMS types, and so we recommended that you create any required databases ahead of time, using SQL scripts.
dbfhadmin -script -type:region -provider:az -name:<es-name> [-db|existdb:<database-name>] [-file:<script-name.sql>]
where <es-name> is the name of the enterprise server region that will use the region database; <database-name> is the name of a new database (-db) or existing database (-existdb) that can house multiple datastores\regions, and a cross-region database - if you omit either option, a new database called <es-name> will be created for the region database.
Parameter | Value |
---|---|
EDITION | standard |
MAXSIZE | 1GB |
SERVICE_OBJECTIVE | S0 |
If you require the database to be created with different characteristics, you must edit the script directly.
dbfhadmin -script -type:crossregion -provider:az [-db|existdb:<database-name>] [-file:<script-name.sql>]
where <database-name> is the name of a new database (-db) or existing database (-existdb) that can house multiple datastores\regions, and a cross-region database - if you omit either option, a new database called _$XREGN$ will be created for the cross-region database
dbfhadmin -createdb <database-address> -file:<script-name.sql> -type:region -provider:az -name:<ES-name> -user:<user> -password:<pass>
where <database-address> is the fully qualified database and server name (for example: tcp:mydbinst.database.windows.net), <script-name.sql> is the name of the script file that was created in an earlier step, <ES-name> is the name of the enterprise server region to operate as the region database, and <user> and <pass> are valid logon credentials for the database.
dbfhadmin -createdb tcp:<database-address> -provider:az -type:crossregion -file:<script-name.sql> -user:<user> -password:<pass>
see previous command for descriptions.
Now that the region and cross-region databases have been created, you can configure the database configuration file to use them.