Sybase Space Checks
Schema space listing
To get a schema wise listing of the space usage on Sybase database , you can use the below command.sp_dba_DBS
Table wise listing
To get a table wise listing of the space consumed by various tables in a DB schema , use the below query.
select convert(varchar(30),o.name) as table_name,
row_count(db_id(),o.id) as row_count,
data_pages(db_id(),o.id, 0) as pages,
data_pages(db_id(),o.id, 0) * (@@maxpagesize/1024) as kbs
from sysobjects o
where type = 'U'
order by kbs desc
Total space in schema
sp_spaceused
Total space occupied by table
sp_spaceused <table name>
Total space occupied by table with breakup for indexes.
sp_spaceused <table name> , 1
Comments
Post a Comment