How to enable debug logging for BCP(Bulk Copy Program) with SQL Server in TIBCO Data Virtualization?

How to enable debug logging for BCP(Bulk Copy Program) with SQL Server in TIBCO Data Virtualization?

book

Article ID: KB0070205

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization All supported versions

Description

This article provides debug properties to include in the log4j2.properties file for the BCP(Bulk Copy Program) with SQL Server in TIBCO Data Virtualization. 

Issue/Introduction

How to enable debug logging for BCP(Bulk Copy Program) with SQL Server in TIBCO Data Virtualization?

Environment

All supported Operating Systems

Resolution

Follow below steps: 
(1)   Back up the file <TDV_SERVER>/conf/server/log4j2.properties. 
(2)   Append the following lines to the original 'log4j2.properties' file, which will enable debug logging specifically for BCP utility: 

 logger.cdms_datasource.name=com.compositesw.cdms.ds.mssql.SqlServerTableWriter logger.cdms_datasource.level=DEBUG logger.server_cache.name=com.compositesw.server.cache.CacheRefreshThread logger.server_cache.name.level=DEBUG

Save changes to the file. 

(3)  To activate the debug trace, you should restart the TDV Server. However, if you prefer not to restart it, you can use an alternative approach:

  • Navigate to Studio > Administration > Configuration > Server > Configuration > Debugging > Debug Output Enabled.

  • Change the value to “True”.

  • Click “Apply” but don’t close the window.

  • Immediately change the value back to “False”.

  • Click “Apply” and close the window.

User-added image

(4)  Once debugging is enabled, you can proceed to reproduce the issue you're troubleshooting. The debug entries will be reflected in the 'cs_server.log' file. 
      Sample Entries:

 DEBUG [CacheWriterStage - /shared/SQL Server Test/TDV/dbo/Cases_cache[3004]1] 2024-02-14 15:39:29.650 -0500 SqlServerTableWriter - Using file buffer: C:\Program Files\TIBCO\TDV Server 8.6.1-9950\tmp\cacheloading\sqlserver\buffer5683708391178377771.tmp DEBUG [CacheWriterStage - /shared/SQL Server Test/TDV/dbo/Cases_cache[3004]1] 2024-02-14 15:39:29.657 -0500 SqlServerTableWriter - Launching BCP utility: [C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\bcp.exe, [TDV].[dbo].[Cases_cache], in, C:\Program Files\TIBCO\TDV Server 8.6.1-9950\tmp\cacheloading\sqlserver\buffer5683708391178377771.tmp, -w, -t, |, -r, ^CRLF^, -b, 2000, -k, -h, TABLOCK, -U, sa, -P, ******, -S, GUEDSPESF1401, -R, -e, C:\Program Files\TIBCO\TDV Server 8.6.1-9950\tmp\cacheloading\sqlserver\errorfile_buffer5683708391178377771.tmp]

(5) To disable debug logging, comment the .level=DEBUG lines in the log4j2.properties / remove all lines added in step(2). Carry out Step (3) once more to reload the log4j2 file to disable debug.