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