Internet, UNIX, Video, Leisure…
Get the Page size in Sybase
Strange, I wasn’t able to find a way to get the database page size in a Sybase (12.x) server.
Digging in sp_helpdb stored procedure gave me some more informations. To do this, or any stored proc, use this SQL command :
use sybsystemprocs
go
sp_helptext sp_space_segment
go
You will get the stored proc as text.
Finaly, the solution to get the page size is :
select v.low/1024 from master.dbo.spt_values v where v.number = 1 and v.type = "E"
or the page size in octets:
select v.low/1024 from master.dbo.spt_values v where v.number = 1 and v.type = "E"
or how many pages there are in a mega-octet (Mo) :
select (1048576 / v.low)
from master.dbo.spt_values v
where v.number = 1
and v.type = "E"