Rediger

Del via


Configure Advanced Settings for DQS Log Files

Applies to: SQL Server

This topic describes how to configure advanced settings for Data Quality Server and Data Quality Client log files, such as set the rolling file size limit of the log files, set the time stamp pattern of the events, and so on.

Note

These activities cannot be performed using Data Quality Client, and is intended for advanced users only.

Before You Begin

Security

Permissions

  • Your Windows user account must be a member of the sysadmin fixed server role in the SQL Server instance to modify configuration settings in the A_CONFIGURATION table in the DQS_MAIN database.

  • You must be logged on as a member of the Administrators group on the computer where you are modifying the DQLog.Client.xml file to configure the Data Quality Client logging settings.

Configure Data Quality Server Log Settings

The Data Quality Server log settings are present in an XML format in the VALUE column of the ServerLogging row in the A_CONFIGURATION table in the DQS_MAIN database. You can run the following SQL query to view the configuration information:

select * from DQS_MAIN.dbo.A_CONFIGURATION where NAME='ServerLogging'  

You must update the appropriate information in the VALUE column of the ServerLogging row to change the configuration settings for Data Quality Server logging. In this example, we will update the Data Quality Server log settings to set the rolling file size limit to 25000 KB (the default is 20000 KB).

  1. Start Microsoft SQL Server Management Studio, and connect to the appropriate SQL Server instance.

  2. In Object Explorer, right-click the server, and then click New Query.

  3. In the Query Editor window, copy the following SQL statements:

    -- Begin the transaction.  
    BEGIN TRAN  
    GO  
    -- set the XML value field for the row with name=ServerLogging  
    update DQS_MAIN.dbo.A_CONFIGURATION   
    set VALUE='<configuration>  
      <configSections>  
        <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=e44a2bc38ed2c13c" />  
      </configSections>  
      <loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="" logWarningsWhenNoCategoriesMatch="true">  
        <listeners>  
          <add fileName="###REPLACE_THIS_WITH_SQL_SERVER_INSTANCE_LOG_FOLDER_NAME###DQServerLog.###REPLACE_THIS_WITH_SQL_CATALOG_NAME###.log" footer="" formatter="Custom Text Formatter" header="" rollFileExistsBehavior="Increment" rollInterval="None" rollSizeKB="25000" timeStampPattern="yyyy-MM-dd" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=e44a2bc38ed2c13c" traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=e44a2bc38ed2c13c" name="Rolling Flat File Trace Listener" />  
        </listeners>  
        <formatters>  
          <add template="{timestamp(local)}|[{threadName}]|{dictionary({value}|)}{message}" type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=e44a2bc38ed2c13c" name="Custom Text Formatter" />  
        </formatters>  
        <logFilters>  
          <add enabled="true" type="Microsoft.Practices.EnterpriseLibrary.Logging.Filters.LogEnabledFilter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=e44a2bc38ed2c13c" name="LogEnabled Filter" />  
        </logFilters>  
        <categorySources />  
        <specialSources>  
          <allEvents switchValue="All" name="All Events" />  
          <notProcessed switchValue="All" name="Unprocessed Category" />  
          <errors switchValue="All" name="Logging Errors & Warnings">  
            <listeners>  
              <add name="Rolling Flat File Trace Listener" />  
            </listeners>  
          </errors>  
        </specialSources>  
      </loggingConfiguration>  
    </configuration>'  
    WHERE NAME='ServerLogging'  
    GO  
    -- check the result  
    select * from DQS_MAIN.dbo.A_CONFIGURATION where NAME='ServerLogging'  
    
    -- Commit the transaction.  
    COMMIT TRAN  
    
    
  4. Press F5 to execute the statements. Check the Results pane to verify that the statements have executed successfully.

  5. To apply changes done to the Data Quality Server logging configuration, you must run the following Transact-SQL statements. Open a new Query Editor window, and paste the following Transact-SQL statements:

    USE [DQS_MAIN]  
    GO  
    DECLARE @return_value int  
    EXEC @return_value = [internal_core].[RefreshLogSettings]  
    SELECT 'Return Value' = @return_value  
    GO  
    
    
  6. Press F5 to execute the statements. Check the Results pane to verify that the statements have executed successfully.

Note

The Data Quality Server logging settings configuration is dynamically generated and stored in the DQS_MAIN.Log file, which is typically available at C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log if you installed the default instance of SQL Server. However, changes done directly in this file do not hold, and are overwritten by the configuration settings in the A_CONFIGURATION table in the DQS_MAIN database.

Configure Data Quality Client Log Settings

The Data Quality Client log setting configuration file, DQLog.Client.xml, is typically available at C:\Program Files\Microsoft SQL Server\130\Tools\Binn\DQ\config. The contents of the XML file is similar to the XML file that you modified earlier for the Data Quality Server log configuration settings. To configure the Data Quality Client log settings:

  1. Run any XML editing tool or notepad as an administrator.

  2. Open the DQLog.Client.xml file in the tool or notepad.

  3. Make the required changes, and save the file to apply the new logging changes.

See Also

Configure Severity Levels for DQS Log Files