Click for more info on: Azure SQL Database.
Part 1 - Prerequisites
- An Azure subscription and an existing resource group and virtual network for Spotfire resources.
- A Spotfire Server installation kit (you need the database scripts folder)
- You have downloaded and installed SQL Server Management Studio on your laptop or on a server within the Azure virtual network for Spotfire.
Part 1 - Instructions
Create a new Azure SQL Database
- Select your Resource group, and then click Add.
- From the resulting list, select Databases and click SQL Database.
- Under the Basics tab, within the Project Details, make sure your server is created under the correct Subscription and Resource group.
- Under Database details, provide a Database name.
- For Server, click Create new.
- Provide the server details. Make sure you select the correct entry under Location. Click OK. (image 1)
- Click Review + create, review the settings and click Create. (image 2)
- The deployment starts and the message "Your deployment is underway" is displayed. After some seconds, Deployment succeeded is displayed and you can click on Go to resource.
Image 1
image 2
Configure database connection security
-
From the created database resource, click Set server firewall.
Example:
- Set Minimal TLS Version to 1.2.
-
Under Virtual networks, click Add existing virtual network, and then select the vnet that you created as part of your resource group. Click OK.
Example:
- Within Firewall rules, add a rule, if needed, for the client where you have the Spotfire database configuration scripts and installed SQL Server Management Studio.
- Click Save to apply changes
Configure the Spotfire database
- From the Windows Start menu, start SQL Server Management Studio and connect to the Azure SQL server you created. For example:
Now we continue with instructions on part 2.
Note the hostname and Identifier to use during the bootstrap configuration steps described.
Part 2 - Prerequisites
- You have access to a SQL database on Microsoft Azure.
- You have downloaded and installed SQL Server Management Studio (SSMS) on your computer.
- You have downloaded the Spotfire Server installation kit from the TIBCO eDelivery web site and extracted the files.
Important: Use the Microsoft JDBC Driver for SQL Server for the database connection (not the DataDirect driver).
Part 2 - Instructions
-
Open Microsoft SQL Server Management Studio (SSMS).
-
In the Connect to Server dialog, select Database Engine for Server Type, enter the name of the Azure SQL database and your authentication type and credentials and then click Connect.
If SSMS cannot connect because of firewall rules, a New Firewall Rule message is displayed.
-
If you are not signed in to Azure, a Sign In button is available. Click it and sign in to Azure.
-
Click OK in the New Firewall Rule dialog.
-
In the Object Explorer pane of SSMS, expand Databases > System Databases, right-click on the master database, and then click New Query.
A blank query pane opens.
-
Create the Spotfire database by entering the following text in the query pane, replacing SERVERDB_NAME with the name of the Spotfire database that will be created:
CREATE DATABASE SERVERDB_NAME GO
-
Click Execute.
Result: "Commands completed successfully" appears in the Messages pane.
Note: This result text should appear each time you click Execute in SSMS.
-
In the query pane, replace the previous command with the following text, replacing SERVERDB_USER with the name of the user that will be created to set up the Spotfire database, and SERVERDB_PASSWORD with the password for that user:
CREATE LOGIN SERVERDB_USER WITH PASSWORD=N'SERVERDB_PASSWORD' GO
-
Click Execute.
-
In the query pane, replace the previous command with the following text, replacing SERVERDB_USER with the name of the user that was created in the previous step:
ALTER LOGIN SERVERDB_USER ENABLE GO
-
Click Execute.
-
In the Object Explorer pane, refresh the database view. The newly created database should be visible.
-
To finish setting up the Spotfire database user, right-click the newly created database, and then click New Query.
-
In the new query pane, enter the following text, replacing SERVERDB_USER with the name of the user that was created in step 9:
CREATE USER SERVERDB_USER GO
-
Click Execute.
-
In the query pane, replace the previous command with the following text, again replacing SERVERDB_USER with the name of the user that was created in step 9:
GRANT CONTROL TO SERVERDB_USER GO
-
Click Execute.
-
Open the <Spotfire server installation kit dir>\scripts\mssql_install\create_server_db.sql file in a text editor.
-
In the SSMS query pane, replace the previous command with all the text from the create_server_db.sql file.
-
In the query pane, delete all the text before the following line:
create table "SN_VERSION" (
-
Click Execute.
-
Open the <Spotfire Server installation kit dir>\scripts\mssql_install\populate_server_db.sql file in a text editor.
-
In the SSMS query pane, replace the previous commands with all the text from the populate_server_db.sql file.
-
In the query pane, delete all the text before the following line:
insert into SN_VERSION (SPOTFIRE_VERSION, SCHEMA_VERSION) values ('51.0', '353');
- Click Execute.
Result
You now have a working Spotfire database in your Azure SQL database.
To view the JDBC URL for connecting the Spotfire Server to this database:
-
In Azure, go to the Overview page of your database.
-
In the upper-right area of the page, click Show database connection strings.
The URL will resemble this:
Server=tcp:Example_SQLServerName.database.windows.net,1433;Initial Catalog=Example_DBName;Persist Security Info=False;User ID=(your_username);Password=(your_password);MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
To enter the database connection information on the Bootstrap page of the Spotfire Server configuration tool
Use the information from the JDBC URL:
-
In the Hostname field of the Bootstrap page, enter the text that appears in place of 'Example_SQLServerName'.
-
In the Identifier field, enter the text that appears in place of 'Example_DBName'.
Recommended Comments
There are no comments to display.