dbTalk Databases Forums  

Identifying open objects

comp.databases.sybase comp.databases.sybase


Discuss Identifying open objects in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Matt McLeod
 
Posts: n/a

Default Identifying open objects - 02-18-2009 , 11:10 PM






I have a need to see which objects are open on an ASE 12.5.3
instance. We have NORAD Surviellance running on a bunch of other
ASE systems and that can dig this info out, but naturally it
isn't configured to talk to this particular Sybase instance and
would require an ASE restart, and we want to see what's going on
as it is right now.

Haven't been able to find anything in the documentation. It appears
that sysobjects doesn't have this data. Is there some way to extract
what I need without restarting ASE?

Matt

--
* Matt McLeod | mail: matt (AT) boggle (DOT) org | blog: http://abortrephrase.com/ *
--- People can do the work, so machines have time to think ---

Reply With Quote
  #2  
Old   
Bret_Halford
 
Posts: n/a

Default Re: Identifying open objects - 02-20-2009 , 01:13 PM






On Feb 18, 10:10*pm, Matt McLeod <m... (AT) boggle (DOT) org> wrote:
Quote:
I have a need to see which objects are open on an ASE 12.5.3
instance. *We have NORAD Surviellance running on a bunch of other
ASE systems and that can dig this info out, but naturally it
isn't configured to talk to this particular Sybase instance and
would require an ASE restart, and we want to see what's going on
as it is right now.

Haven't been able to find anything in the documentation. *It appears
that sysobjects doesn't have this data. *Is there some way to extract
what I need without restarting ASE?

Matt

--
* Matt McLeod | mail: m... (AT) boggle (DOT) org | blog:http://abortrephrase.com/*
* * *--- People can do the work, so machines have time to think ---

The output is pretty raw, but dbcc des will display the object
descriptor for
every open object (serverwide or db-specific).

dbcc traceon(3604)
go
dbcc des(dbname)
go

The first few lines of output for each DES give the dbid, object name,
and object id

DES at 0x2138A46C

ddbid=1
OBJECT structure at: 0x2138A484
objname=sysencryptkeys dol_rowno=0 dol_vattcnt=7 dol_status:
0x00: (0x0000)

dobjstat.objid=98 sysencryptkeys dobjstat.objuserstat=0x0

Note: I do wonder if "open" means the same thing to you as it does to
me. In ASE
an object is opened when it is first accessed and it remains open
until dropped or
ASE runs out of descriptors, in which case an object descriptor that
is open but not
in use can be scavanged.

-bret


Reply With Quote
  #3  
Old   
ThanksButNo
 
Posts: n/a

Default Re: Identifying open objects - 02-22-2009 , 02:45 PM



On Feb 18, 9:10 pm, Matt McLeod <m... (AT) boggle (DOT) org> wrote:
Quote:
I have a need to see which objects are open on an ASE 12.5.3
instance.
sp_lock will give you the sysobjects.id of any object that
is being locked or intended to be locked, including shared
read locks. I don't know if that's good enough for your needs.

/:-/


Reply With Quote
  #4  
Old   
Matt McLeod
 
Posts: n/a

Default Re: Identifying open objects - 02-22-2009 , 04:21 PM



In <aede7b68-be99-4e10-99da-491011af8199 (AT) x10g2000yqk (DOT) googlegroups.com>, Bret_Halford wrote:
Quote:
Note: I do wonder if "open" means the same thing to you as it does to
me. In ASE
an object is opened when it is first accessed and it remains open
until dropped or
ASE runs out of descriptors, in which case an object descriptor that
is open but not
in use can be scavanged.
Thanks for the info. I'd assumed "open" meant "currently open" rather
than merely "has been opened at some time since ASE started" so we were
getting pretty alarmed when the number of open objects kept growing,
even after resetting all client connections.

Matt

--
* Matt McLeod | mail: matt (AT) boggle (DOT) org | blog: http://abortrephrase.com/ *
--- People can do the work, so machines have time to think ---


Reply With Quote
  #5  
Old   
mpeppler@peppler.org [Team Sybase]
 
Posts: n/a

Default Re: Identifying open objects - 02-23-2009 , 06:25 AM



On Feb 22, 11:21*pm, Matt McLeod <m... (AT) boggle (DOT) org> wrote:
Quote:
In <aede7b68-be99-4e10-99da-491011af8... (AT) x10g2000yqk (DOT) googlegroups.com>, Bret_Halford wrote:
Note: *I do wonder if "open" means the same thing to you as it does to
me. *In ASE
an object is opened when it is first accessed and it remains open
until dropped or
ASE runs out of descriptors, in which case an object descriptor that
is open but not
in use can be scavanged.

Thanks for the info. *I'd assumed "open" meant "currently open" rather
than merely "has been opened at some time since ASE started" so we were
getting pretty alarmed when the number of open objects kept growing,
even after resetting all client connections.
When an object is opened it remains so until its descriptor needs to
be reused. As closing an object requires flushing any pages relating
to the object that are currently in cache this is quite an expensive
operation, so you normally configure the "number of open objects"
parameter to be large enough to avoid reuse.

So yes, you will see the number of open objects grow over time, and
this is of course not really related to the objects in use at any
given time.

Michael


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.