I've got an app that connects to a 18.104.22.16842 db using JDBC. The database has Console Logging redirected to a file using dbsrv12 -o. Every time the jdbc connection runs a query, the results are written to the console log. Is there a way to prevent the jdbc connection from sending the results to the console log?
Examples: I. 01/14 08:36:31. TDS 2530: result row: 'DATA_REMOVED_FOR_FORUM0',... I. 01/14 08:36:31. TDS 2530: result row: 'DATA_REMOVED_FOR_FORUM1',... I. 01/14 08:36:31. TDS 2530: result row: 'DATA_REMOVED_FOR_FORUM2',...
The connection string the app uses is similar to this.
Any help appreciated.
asked 14 Jan '14, 11:52
There are two ways you can eliminate the TDS logging.
First, is there a specific reason you are using jConnect for your JDBC application? If you have not considered it yet, you might want to give the SQL Anywhere JDBC Driver a try since it may perform much better for you in a variety of situations and will give you more SQL Anywhere like behaviour. If you switch to the SQL Anywhere JDBC Driver, then you will not receive any TDS logging since the SQL Anywhere JDBC Driver is not TDS based.
Second, the above suggestion to switch drivers is primarily for performance and behaviour purposes and does not actually answer your specific question. If you do in fact want to (or perhaps have to) stick with jConnect, then change your application to execute:
SET TEMPORARY OPTION SUPPRESS_TDS_DEBUGGING = 'ON'
immediately after establishing the connection.