Get the Page size in Sybase
sept 26th, 2007 by Prune
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
goYou 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"