What's the real difference between this 2 connection parameter?

asked 10 Nov '09, 11:00

Zote's gravatar image

Zote
1.7k364050
accept rate: 43%

edited 15 Nov '09, 10:54

Breck%20Carter's gravatar image

Breck Carter
27.0k424582831


The SQL Anywhere engine initializes APP (or AppInfo) to a long string full of interesting and sometimes helpful information, whereas CON (or ConnectionName) starts out empty.

When you give values for APP and CON in your connection string, your APP value gets appended to the initial string, whereas your CON becomes the entire new value:

"%SQLANY11%\bin32\dbisql.com" -c "ENG=ddd11;DBN=ddd11;UID=dba;PWD=sql;
CON=ddd11-3;APP=ASDFASF"

SELECT CONNECTION_PROPERTY ( 'AppInfo' ),
       CONNECTION_PROPERTY ( 'Name' );

CONNECTION_PROPERTY('AppInfo'),CONNECTION_PROPERTY('Name')
'IP=192.168.1.105;HOST=PAVILION2;OSUSER=bcarter;OS=''Windows XP 
Build 2600 Service Pack 3'';EXE=''C:\\Program Files\\SQL Anywhere 
11\\bin32\\dbisql.exe'';PID=0xbd4;THREAD=0xe08;VERSION=11.0.1.2276;
API=iAnywhereJDBC;TIMEZONEADJUSTMENT=-300;APPINFO=ASDFASF','ddd11-3'

Personally, I haven't used APP much but I know people who do. However, I use CON all the time so I can tell connections apart, especially when every connection is using the same user id... not just connection pools, but a lot of classic embedded and other applications.

SQL Anywhere utilities, events and CREATE SERVICE web services set CON values; I don't have a complete list handy. Some of them are meaningful, some of them not so much: SQL_DBC_c657ef0

FWIW, the Foxhound database monitor does not display APP, either for its own connection or for any other connection, but it always shows CON... APP is on the future feature list but only as a "possible"... it takes up a lot of bandwidth for little (IMO) value, especially when you are monitoring 1000 connections. CON, on the other hand, can save your sanity.

BTW, that comment about bandwidth ONLY applies to Foxhound, not normal usage. And I think the built-in SQL Anywhere Monitor is the same but I would have to look.

Other than that, they might be the same: input parameters provided by the client side, available to application code via SELECT INTO, and to stored procedure logic via SELECT INTO or just simple function references: SET @variable = CONNECTION_PROPERTY ( 'AppInfo' );

permanent link

answered 10 Nov '09, 14:07

Breck%20Carter's gravatar image

Breck Carter
27.0k424582831
accept rate: 21%

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:

×124
×31
×14

question asked: 10 Nov '09, 11:00

question was seen: 1,531 times

last updated: 15 Nov '09, 10:54