You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Table of contents 

Description

This Tracing SQL Store Component contains a Trace DAO implementation that can be used by the trace engine to store trace messages in a database.

The configuration options are found below in this document.

Requirements

This component persists data in a database, that must be provided. See platform support for the supported databases.

Installation

In order to use this component, the trace-sql-store profile must be active. More information on how to configure the application using Spring Profiles can be found here : Component configuration with Spring Profiles.

In order to use this component, make sure to have the BlueriqComponentTracing.dll in the /bin directory of your .NET webapp installation

Configuration

Database

Scripts to create the required database content are provided for the following databases:

 

For customers that are upgrading an existing version of Blueriq, database upgrade scripts are provided in the Upgrade Instructions when applicable.

Use the following steps to configure the component datasource:

  1. If necessary, create a new datasource. See Configuring JDBC database drivers for information on how to do this.

  2. The Trace SQL Store component is using the trace datasource to store data.The trace datasource can be configured using JDBC or JNDI.
    1. Using JDBC datasource:
      This can be configured in the application-externaldatasources.properties file. When configuring external datasources, the externaldatasources profile should be enabled.

      Example configuration:

      application-externaldatasources.properties
      blueriq.datasource.trace-sql-store.url=jdbc:sqlserver://<database_url>:<port>;databaseName=bq_main;instance=SQLEXPRESS
      blueriq.datasource.trace-sql-store.username=<username>
      blueriq.datasource.trace-sql-store.password=<password>
      blueriq.datasource.trace-sql-store.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
      blueriq.hibernate.trace-sql-store.hbm2ddl.auto=validate
      blueriq.hibernate.trace-sql-store.dialect=org.hibernate.dialect.SQLServerDialect


    2. Using JNDI datasource : this can be configured in the  application-jndidatasources.properties file When configuring JNDI datasources the jndidatasources profile should be enabled.

      Example configuration:

      application-jndidatasources.properties
      blueriq.datasource.trace-sql-store.jndiName=java:/comp/env/jdbc/main
      blueriq.hibernate.trace-sql-store.hbm2ddl.auto=validate
      blueriq.hibernate.trace-sql-store.dialect=org.hibernate.dialect.SQLServerDialect
  3. Configuring the datasource from the Development Dashboard
    Go to Settings Widget → Datasources tab → On the left side menu : select Trace SQL Store datasource. The same properties are available for configuration as from the properties file.  Make sure the corresponding profile is enabled (externaldatasources or jndidatasources)

  4. Hibernate settings
    These settings are done for each datasource type in the corresponding properties file, as in the examples above.

 

Configuring the database connection for the Tracing SQL store component in .NET is done by adding a connection configuration to the 

Unable to render {include} The included page could not be found.
 file.

Example configuration:

.NET database configuration example
<hibernate-configuration>
  <session-factories>
    <session-factory name="TraceDao">
      <properties>
        <property name="connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
        <property name="dialect" value="NHibernate.Dialect.MsSqlCeDialect" />
        <property name="connection.driver_class" value="NHibernate.Driver.SqlServerCeDriver" />
        <property name="connection.connection_string" value="Data Source=|DataDirectory|\LocalDB\TraceDB.sdf" />
        <property name="show_sql" value="false" />
        <property name="current_session_context_class" value="Aquima.WebApplication.WebPersistenceUtility.Session.CurrentHibernateSessionContext, WebPersistenceUtility" />
      </properties>
    </session-factory>
  </session-factories>
</hibernate-configuration>

For more information about configuring database connections, see Configuring database connections in .NET webapp.

The Tracing SQL store component looks for a database connection named "TraceDao" so make sure that this name is used in order to configure the Trace SQL Store properly.

All necessary DLL files the Trace SQL Store component depends on can be found in the /bin directory of the .NET webapp ZIP file.

Performance

The performance impact of the Trace SQL Store is minimal when used normally: to write trace messages to the database.

It is also possible to use the Trace SQL Store to query the trace engine database, like the timeline container does. The Trace SQL Store offers good performance as long as the result set is limited. For large scale analysis, when summaries or aggregates are desired, the Trace SQL Store is not recommended because it is primarily designed to return a list of trace entries. For these scenarios it is recommended to use SQL (or HQL) to query the database.

  • No labels