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.

Hi,

I am new to sybase and using Sybase ASE 15.7 in Linux.

I would like to list the highwater number of open objects, and googled a lot and no luck.

Would be glad for any assistance.

I used

dbcc monitor ('sample', 'all', 'on')
go
dbcc monitor ('sample', 'spinlock_s', 'on')
go
dbcc monitor ('sample', 'appl', 'on')
go
dbcc monitor ('select', 'all', 'on')
go
dbcc monitor ('select', 'spinlock_s', 'on')
go
dbcc monitor ('select', 'appl', 'on')
go
select * into #tempsysmon_base from master..sysmonitors
go
dbcc monitor ('sample', 'spinlock_s', 'off')
go
dbcc monitor ('sample', 'appl', 'off')
go
dbcc monitor ('sample', 'all', 'off')
go
dbcc monitor ('select', 'spinlock_s', 'on')
go
dbcc monitor ('select', 'all', 'on')
go
select * into #tempsysmon from master..sysmonitors where 1=2
go
insert into #tempsysmon
select s.field_name,
s.group_name,
s.field_id,
case
when (s.value >= b.value)
then
case
when ((convert(numeric, s.value) - convert(numeric, b.value)) >= convert(numeric, 2147483648))
then (-1)
else
(s.value - b.value)
end
else
case
when ((convert(numeric, b.value) - convert(numeric, s.value)) < convert(numeric, 2147483648))
then (-1)
else
(convert(int, (4294967295 - (convert(numeric, b.value) - convert(numeric, s.value)))))
end
end as value,
s.description, s.nodeid
from master..sysmonitors s holdlock,
#tempsysmon_base b
where b.group_name = s.group_name
and b.field_id = s.field_id
and b.group_name not in ('config', 'resource_stats', 'control')
and s.field_name not like "max%"
and s.field_name not like "%hwm"
go
insert into #tempsysmon
select * from master..sysmonitors
where group_name in ('config', 'resource_stats', 'control')
or field_name like "max%"
or field_name like "%hwm"
go

To total objects:
select "Open Objects" = value from master..syscurconfigs where config = 107

List highwater number of objects:
select value from #tempsysmon where group_name like 'metadata_cache%' and field_name = "hwm_open_objects"
But this last query always returns zero and when checked the #trempsysmon table i found that under group_name column there was no "metadata_cache" value and neither field_name has "hwm_open_objects" value

Also provide the logical flow.

thanks

asked 18 Feb '14, 02:13

steve123's gravatar image

steve123
0111
accept rate: 0%

closed 18 Feb '14, 09:12

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297

Note, this forum is on SQL Anywhere, not on Sybase ASE which is a completely different product from SAP Sybase... - cf. the according entry in this FAQ

(18 Feb '14, 03:18) Volker Barth

The question has been closed for the following reason "Question is off-topic or not relevant" by Mark Culp 18 Feb '14, 09:12

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:

×128
×53
×41

question asked: 18 Feb '14, 02:13

question was seen: 2,108 times

last updated: 18 Feb '14, 09:12