Spotfire Server and Environment - Quick Start

Setting up the Spotfire database (SQL Server with Integrated Windows authentication)

If you plan to use Integrated Windows authentication between Spotfire Server and the Spotfire database in SQL, follow these steps.

About this task

Note: Alternatively, you can create a Spotfire database using the CLI command create-db. To use the create-db command, you must first have installed the Spotfire Server. Also note that when using SQL Server from a cloud database provider, additional parameters and configuration is required.

Before you begin

  • Download and unzip the Spotfire Server installation kit from the Spotfire Download site. For instructions, see Downloading installation software.
  • You must have access to a SQL server database server.
  • The following settings must be configured on the SQL Server:
    • TCP/IP communication listening on a port (the default is 1433).
    • Case-insensitive collation (at least for the Spotfire database).
      Note: If your installation of SQL Server uses a case-sensitive collation by default, or your data uses a different collation than Latin1_General_CI_AS, you must edit the create_server_db.sql script before running the create_databases_ia.bat script. See Defining the SQL Server collation for details.
    • The command-line database tool sqlcmd must be installed in the system you are going to use to configure the database server.
Note: Set up your database server for encrypted connections, with a valid, not self-signed, server certificate. For more information see Fixing Microsoft SQL Server JDBC driver-related issues.

About this task

With this type of configuration, the Spotfire database will use Windows accounts for authentication. The current user who is running the scripts to create the database must have administrative privileges on the database server, but the Spotfire process should run as a different user when connecting at runtime. Therefore, the scripts have been designed to set up the database using a different Windows account than the one the Spotfire Server will use to access the database. This user is assigned to the variable WINDOWS_LOGIN_ACCOUNT. Note that the user who runs the scripts to create the database will get database owner permissions (dbo) to the database and will be able to administer the Spotfire database using integrated authentication.

If the user assigned to the WINDOWS_LOGIN_ACCOUNT variable already exists as a login on the database server, the create_server_user_ia.sql script must be edited. The following rows should then be commented out:

use master 
GO 
CREATE LOGIN [$(WINDOWS_LOGIN_ACCOUNT)] FROM WINDOWS WITH 
DEFAULT_DATABASE=[$(SPOTFIREDB_DBNAME)],DEFAULT_LANGUAGE=[us_english] 
GO 
ALTER LOGIN [$(WINDOWS_LOGIN_ACCOUNT)] ENABLE 
GO 
DENY VIEW ANY DATABASE 
TO [$(WINDOWS_LOGIN_ACCOUNT)]

As mentioned above, for security reasons, the Spotfire server process should connect as a different user than the user that runs this script. If you really want to use the same account then you must comment out the following lines from create_server_user_ia.sql:

CREATE USER [$(SPOTFIREDB_USERNAME)] FOR LOGIN [$(WINDOWS_LOGIN_ACCOUNT)]
GO

Procedure

  1. Optionally, if you want to set up Spotfire Server to authenticate with a SQL Server database instance using Kerberos, there is additional preparation needed. See Running the database preparation scripts for Kerberos configuration.
  2. Go to the scripts/mssql_install directory in the downloaded installation kit and locate the create_databases_ia.bat script.
    For details about the available scripts, see The Spotfire database scripts.
  3. The script supports the variables described in the table below. The script will prompt you for any required variable that is not set in your environment or in the script.
    If desired, you can also provide the variables using one of these methods:
    1. Set the variables as environment variables.
    2. Open and edit the script to define the variables in the section under Uncomment to set variables.
    Variable Description
    DBSERVER_CONNECTIDENTIFIER Replace <SERVER> with the name of the server running the SQL Server instance, and replace <MSSQL_INSTANCENAME> with the name of the SQL Server instance.
    Note: The default installation of SQL Server creates an unnamed instance of the SQL Server. If your SQL Server is a new installation, delete the "MSSQL_INSTANCENAME" part of the line and enter only the SERVER name. The connection will be made to the unnamed instance.
    WINDOWS_LOGIN_ACCOUNT The Windows Login Account that should be created as a login on the database server. The server process must run as this user.
    SPOTFIREDB_DBNAME Name of the Spotfire database that will be created; spotfire_server is the default.
    SPOTFIREDB_USERNAME Name of the user that will be created for the Spotfire database, associated with the WINDOWS_LOGIN_ACCOUNT.
  4. Save the file and run the script create_databases_ia.bat.

Results

The required Spotfire user and database table schemas are created in your database.

The log file log.txt file is created in the working directory. If the execution should fail, then the log file contains information about the failure. If the execution succeeds, then information about the changes made to the database is available in the log file.

Important: The scripts contain sensitive information so remove them after your Spotfire environment is installed.

What to do next

Install Spotfire Server, or if you have done that already, proceed to Initial configuration.