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.

How can I confirm that server option max_query_tasks is set to the desired value? I am using SA 11.0.1.2472 and I don't see that setting when I run sa_eng_properties, or SELECT PROPERTY('max_query_tasks'). It does appear if I just do SET in DBISQL, but it seems that the value retrieved by that method may be the connection value rather than the global one -- the value that comes up with SET doesn't always match what I just entered with SET OPTION PUBLIC.max_query_tasks, so I would like another way to confirm the setting, or to be able to query it from within my applications.

asked 19 Nov '10, 20:14

SethKrieger's gravatar image

SethKrieger
88116
accept rate: 100%

edited 15 Mar '13, 18:30

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297


Try this:

select "setting" 
from sysoptions 
where "option" = 'max_query_tasks' and "user_name" = 'public';

See more detailed info on this at this page on DCX: http://dcx.sybase.com/index.html#1101en/dbadmin_en11/finding-introduction-dboptions.html

permanent link

answered 19 Nov '10, 21:05

Chris%20Kleisath's gravatar image

Chris Kleisath
3.3k93037
accept rate: 37%

Comment Text Removed

Perfect. Also thanks for the DCX link. I did not know it existed!

(20 Nov '10, 00:22) SethKrieger

Although there is much overlap between options and properties, they are two different things.

The max_query_tasks property is a connection property, not a server or database property.

The max_query_tasks option may be defined at the PUBLIC, user id and current connection levels (this contradicts the 11.0.1 Help which says only PUBLIC and current connection).

Here is some SQL code which may answer your question, as well as shedding light on the difference between option and property...

SET OPTION PUBLIC.max_query_tasks = '11';
SET OPTION DBA.max_query_tasks = '22';

-- Disconnect / reconnect as DBA.

SELECT CONNECTION_PROPERTY ( 'max_query_tasks' );

/*

CONNECTION_PROPERTY('max_query_tasks')
'22'

*/

SET TEMPORARY OPTION max_query_tasks = '33';

SELECT USER_NAME ( SYSOPTION.user_id ) AS user_id,
       SYSOPTION."option",
       SYSOPTION.setting
  FROM SYS.SYSOPTION
 WHERE SYSOPTION."option" = 'max_query_tasks';

SELECT CONNECTION_PROPERTY ( 'max_query_tasks' );

/*

user_id,option,setting
'PUBLIC','max_query_tasks','11'
'DBA','max_query_tasks','22'

CONNECTION_PROPERTY('max_query_tasks')
'33'

*/
permanent link

answered 19 Nov '10, 21:07

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

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:

×24
×14
×3

question asked: 19 Nov '10, 20:14

question was seen: 3,939 times

last updated: 15 Mar '13, 18:30