Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

( this was originally a question "Which database for CONN sa_server_messages()?"

. . . now it's a feature request :)


As far as I can tell, the sa_server_messages().msg_database column is empty when msg_category = 'CONN'.

This means if you have multiple shared memory connections to each of several databases running on one instance of dbsrv17, and you get a "Disconnected" CONN message returned by sa_server_messages(), there is no obvious way to determine which database is the culprit.

How do I determine which database is involved? ...after all, each SQL Anywhere connection only exists within the context of a single database.

Here is a snippet showing 2 sets of "Disconnected" CONN messages from a total of 1000 (10 connections to each of 100 databases):

msg_id,
msg_text,
msg_time,msg_severity,msg_category,msg_database

4429,
Disconnected SharedMemory client's AppInfo: IP=192.168.2.10;HOST=XPS;
   OSUSER=Breck;OS='Windows 8 Build 9200 ';
   EXE=C:\\PROJECTS\\BENCHMARK\\benchmark_SA17\\rrloadtest.exe;PID=0x2104;
   THREAD=0x4084;VERSION=17.0.9.4882;API=ODBC;TIMEZONEADJUSTMENT=-240,
'2019-04-19 16:21:31.665','INFO','CONN',''

4428,
Disconnecting shared memory client, process id not found,
'2019-04-19 16:21:31.665','INFO','CONN',''

4427,
Disconnected SharedMemory client's AppInfo: IP=192.168.2.10;HOST=XPS;
   OSUSER=Breck;OS='Windows 8 Build 9200 ';
   EXE=C:\\PROJECTS\\BENCHMARK\\benchmark_SA17\\rrloadtest.exe;PID=0x2104;
   THREAD=0x44c0;VERSION=17.0.9.4882;API=ODBC;TIMEZONEADJUSTMENT=-240,
'2019-04-19 16:21:31.665','INFO','CONN',''

4426,
Disconnecting shared memory client, process id not found,
'2019-04-19 16:21:31.665','INFO','CONN',''

asked 20 Apr '19, 07:48

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

edited 14 Dec '19, 12:39

Hm, I share the experience that for CONN entries, the msg_database value is empty, which seems unexpected. – A wild guess: Apparently those disconnect entries come from the database server dropping orphaned connections so these connections may be in a state no longer attributed to a particular database?

Of course you could add DISCONNECT events to each database to find out which of them the connection belonged to...

(23 Apr '19, 04:51) Volker Barth
Replies hidden
1

> in a state no longer attributed to a particular database

That makes sense... except for the fact the message text itself contains the CONNECTION_PROPERTY ( 'AppInfo' ) string, so presumably CONNECTION_PROPERTY ( 'DBNumber' ) is also available.

DBNumber would make me happy, but a DISCONNECT event is not available... too bad, since it supports EVENT_PARAMETER ( 'ConnectionID' ).

(23 Apr '19, 09:27) Breck Carter
Be the first one to answer this question!
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:

×2

question asked: 20 Apr '19, 07:48

question was seen: 734 times

last updated: 14 Dec '19, 12:39