I've got an app that connects to a 12.0.1.3942 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.

 jdbc:sybase:Tds:myservername:2638/?APPLICATIONNAME=JDBC.exe&SERVICENAME=mydatabasename&user=myusername&password=mypassword

Any help appreciated.

asked 14 Jan '14, 11:52

lstavinoha's gravatar image

lstavinoha
71228
accept rate: 0%


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.

permanent link

answered 14 Jan '14, 12:17

Karim%20Khamis's gravatar image

Karim Khamis
5.6k53870
accept rate: 40%

edited 14 Jan '14, 12:37

Graeme%20Perrow's gravatar image

Graeme Perrow
8.5k371108

Is the server started with -z in the start parameters?

The -z database server option logs TDS messages to the console log.

permanent link

answered 14 Jan '14, 12:16

Mikel%20Rychliski's gravatar image

Mikel Rychliski
2.1k1641
accept rate: 30%

The -z parameter is why it was showing up in my specific case. I can make the change that Karim suggested to suppress it though. Thanks.

(14 Jan '14, 12:32) lstavinoha
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×5
×4

question asked: 14 Jan '14, 11:52

question was seen: 470 times

last updated: 14 Jan '14, 12:37