When using TIBCO Spotfire 7.9 or higher configured to use a Microsoft SQL Server as the application database, you may experience various performance issues or database deadlock errors in TIBCO Spotfire when performing actions which interact with the TIBCO Spotfire Server application database. This may manifest in a few ways, but some common scenarios are:
- Slowness when opening or using the Library browser in the TIBCO Spotfire Analyst client or web interface
- Slowness when opening and using the Information Designer, Administration Manager, or Library Administration tools from the TIBCO Spotfire Analyst client
- Long delays in startup of the TIBCO Spotfire Server
- Continuous database deadlock errors in the logs preventing users from opening analysis files stored in the library
- Inability to save analysis files to the library
The effects of this issue are seen most on installations with large Spotfire libraries (large numbers or users, groups, files stored in the database)
While there may be many other contributors to poor performance (insufficient resources, incorrect configuration, network bandwidth or latency issues, etc), this article describes one known defect originally introduced in version 7.9 which causes the connection-properties settings for the Spotfire database data source in the TIBCO Spotfire Server configuration to not be used. These settings from the configuration.xml are ignored:
<connection-properties> ... <connection-property> <key>sendStringParametersAsUnicode</key> <value>false</value> </connection-property> <connection-property> <key>StringInputParameterType</key> <value>varchar</value> </connection-property> </connection-properties>
Most Java drivers pass string parameters to SQL Server as Unicode, by default. The problem here is, with that setting ignored, the Unicode parameters reference the VARCHAR key columns in an index, and the SQL Server engine will not use the appropriate index for query resolution, thereby increasing the unwanted table scans.
When these database connection properties 'StringInputParameterType=varchar' and sendStringParametersAsUnicode=false' are ignored, this can be seen in server.log TRACE entries like below, where it says "properties={}" which means the properties are empty (whereas the expected result is that the configured properties are listed towards the end after "properties=").
TRACE 2018-08-14T00:47:00,298-0700 [*Watchdog*] util.sql.PoolingDataSource: Created new database connection for data source server.default[driverClass=tibcosoftwareinc.jdbc.sqlserver.SQLServerDriver, url='jdbc:tibcosoftwareinc:sqlserver://tpawinappp027.enterprisenet.org:1433;DatabaseName=Spotfire_76_intdev', username='sp712int', password=[NOT SHOWN], kerberosLoginContextName=null, refreshTGT=false, initialized=true, destroyed=false, active=true, size=8, idleCount=1, activeCount=7, mostActiveCount=7, errorCount=0, timeoutCount=0, minConnections=5, maxConnections=60, connectionTimeout=6000, poolingScheme=WAIT, loginTimeout=40, autoCommit=true, readOnly=false, mBeanEnabled=true, properties={}]