Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do we check the locking scheme for a specific table?

2,915 views
Skip to first unread message

linnichole

unread,
Aug 13, 2008, 4:14:45 AM8/13/08
to
How do we check the locking scheme for a specific table? Is
there a SQL command we can run? Or is there a system table
that contains this information?

Thank you,

Nichole L.

ThanksButNo

unread,
Aug 13, 2008, 4:27:27 AM8/13/08
to

sp_help {tablename}
go

linnichole

unread,
Aug 13, 2008, 4:38:35 AM8/13/08
to
Okay, that was simple. Now I feel kinda dumb for not
knowing that. :)

Many thanks! :)

Bret Halford

unread,
Aug 13, 2008, 11:54:11 AM8/13/08
to
Lin Nichole wrote:
> Okay, that was simple. Now I feel kinda dumb for not
> knowing that. :)
>
> Many thanks! :)
>

You can also get the information using a simple query against
sysobjects. Allpages tables that were created prior to 11.9.x
don't have any of the three bits set, thus '0'.

select case (sysstat2 & 57344)
when 0 then 'Allpages'
when 8192 then 'Allpages'
when 16384 then 'Datapages'
when 32768 then 'Datarows'
end as 'Lock Schema'
from sysobjects where type='U'
and name = "Mytable"

Sherlock, Kevin

unread,
Aug 13, 2008, 2:08:17 PM8/13/08
to
Or use the "lockscheme()" builtin as in:


select lockscheme(id)
from sysobjects
where type = "U"
and ...

"Bret Halford" <br...@sybase.com> wrote in message
news:48a303a3$1@forums-1-dub...

ThanksButNo

unread,
Aug 13, 2008, 8:20:34 PM8/13/08
to
On Aug 13, 1:38 am, Lin Nichole wrote:
> Okay, that was simple. Now I feel kinda dumb for not
> knowing that. :)

Don't feel dumb. That's why we come to these forums, to learn stuff.

linnichole

unread,
Aug 14, 2008, 1:06:32 AM8/14/08
to
Thank you! :)

linnichole

unread,
Aug 14, 2008, 1:47:43 AM8/14/08
to
Bret,

Thank you for the below SQL statement. The below SQL is
very helpful and want to send our many thanks for your help.

Thank you,

Nichole L.

linnichole

unread,
Aug 14, 2008, 1:51:21 AM8/14/08
to
Kevin,

Thank you for providing the below Sybase function
information / recommendation. It has turned out to be a
great way to get back results quickly for all tables.

Many Thanks!

Nichole L.

0 new messages