Configuring logging to a Microsoft SQL Server database with the command line

You can configure action logging to write to a Microsoft SQL Server database, and then run the required additional scripts need for logging to a database. Sample scripts are included in the installation kit for Spotfire Server.

This topic describes the steps required to configure the database for action logging, and to run the configuration scripts from the command line. Alternatively, you can enable and configure the action logging and system monitoring from the Configuration Tool. For more information, see the following topics.

Prerequisites

Procedure

  1. Log in to Spotfire Server, and in the file system, browse to the directory containing the installation kit files.
  2. In the installation kit that you downloaded from the TIBCO eDelivery site, browse to the directory containing the scripts to create a new database and schema.
    For Oracle, this directory is /scripts/mssql_install/actionlog.
  3. Using a text editor, open the script file.
    The script file to edit is named create_actionlog_db.bat (or, for Linux, create_actionlog_db.sh) .
  4. In the script file, edit the section containing the database name spotfire_actionlog, setting the variables to reflect your database environment.

    You must provide the database password in this script. If you do not have the password, consult your DBA for assistance.

    Note: If you want to use the information layer, do not change the user and name, unless you use the Redirect dependent elements functionality in Spotfire Analyst Information Designer. See the Spotfire Analyst help topic "Redirecting the Information Model" for more information on this functionality.
  5. Optional: If your database is running on Amazon RDS, also edit the script file create_actionlog_db_rds.bat (or, for Linux, create_actionlog_db_rds.sh), specifying the same information.
  6. Run the script to create the database.
    Information and error logs are written to a file named actionlogs.txt in the directory from where you run the script. If the script takes a very long time, or if it fails, check this text file for more information.
    The database is created on the server.
  7. Log in to the Spotfire Server, and from the Start menu, open a command-line window as administrator.
  8. Browse to <installation dir>\tomcat\bin.
  9. Export the configuration: At the command prompt, type the command config export-config.
    config export-config --force 
    When prompted, supply the tools password. See export-config for more information.
  10. Log in to the Spotfire Server, and from the Start menu, open a command-line window as administrator.
  11. Browse to <installation dir>\tomcat\bin.
  12. At the command prompt, type the command config config-action-log-database-logger, passing in the arguments specifying the details of the database. For example, to specify the Microsoft SQL Server database URL, driver class, user name, and password, provide the following.
    config config-action-log-database-logger --database-url="jdbc:sqlserver://[mycompany]:1433;DatabaseName=[Mydatabase]" 
    --driver-class="com.microsoft.sqlserver.jdbc.SQLServerDriver" --username="spotfire_actionlog" 
    When prompted, supply the tools password. See config-action-log-database-logger for more information.
  13. At the command prompt, type the command config import-config.
    config import-config --comment="adding database configuration for action logging." 
    
    When prompted, supply the tools password. See import-config for more information.
  14. Restart Spotfire Server.

Result

The database is configured.

What to do next

Use the Information Links and sample analysis file from the installation kit to create a visualization from the action logs.