Example script: Microsoft SQL database on Azure using create-db command
The following example shows planning for and creating a Spotfire database schema for a Microsoft SQL database on Azure.
Use the
following code template to plan and create a database schema with the command
create-db
.
See
Creating a Spotfire database using the command create-db
for instructions.
Microsoft SQL database on Azure:
config create-db
--driver-class="com.microsoft.sqlserver.jdbc.SQLServerDriver"
--database-url="jdbc:sqlserver://{{database-host}}:{{database-port}}"
--admin-username="{{admin-user}}"
--admin-password="{{admin-password}}"
--spotfiredb-dbname="{{spotfire-database}}"
--spotfiredb-username="{{spotfiredb-user}}"
--spotfiredb-password="{{spotfiredb-password}}"
--variant="azure"
For each option shown in the above example,
replace the placeholder variable with your own value. The following example
shows example values to pass to the command
create-db
.
Option | Example value |
---|---|
--driver-class
|
"com.microsoft.sqlserver.jdbc.SQLServerDriver"
|
--database-url
|
"jdbc:sqlserver://myservername:5432"
|
--admin-username
|
"sqladmin"
|
--admin-password
|
"sqladmin"
|
--spotfiredb-dbname
|
"myspotfiredb"
|
--spotfiredb-username
|
"sfdbuser"
|
--spotfiredb-password
|
"sfdbuser"
|
--variant
|
"azure"
|
For Microsoft SQL, you must specify the variant. See create-db for more information about the values to specify.
In the following code, we have
replaced the template variables with the example values. The command is ready
to run to create the database schema. Your values will differ.
Note: This example has line breaks to make it easier to read the assigned
values. To use this example, you must copy it to a text editor, provide your
own values, and remove the line breaks first.
config create-db
--driver-class="com.microsoft.sqlserver.jdbc.SQLServerDriver"
--database-url="jdbc:sqlserver://myservername:5432"
--admin-username="sqladmin"
--admin-password="sqladmin"
--spotfiredb-dbname="myspotfiredb"
--spotfiredb-username="sfdbuser"
--spotfiredb-password="sfdbuser"
--variant="azure"
Parent topic: Examples for cloud database deployments
Related information
- Example script: PostgreSQL database on AWS using create-db command
- Example script: PostgreSQL database on Google Cloud using create-db command
- Example script: PostgreSQL database on Azure using create-db command
- Example script: Microsoft SQL database on AWS using create-db command
- Example script: Microsoft SQL database on Google Cloud using create-db command
- Example script: Oracle database on AWS using create-db command