Skip to content

Instantly share code, notes, and snippets.

@HainanZhao
Last active January 19, 2021 04:02
Show Gist options
  • Save HainanZhao/3e1192ade21592d8975edddace9a1fa6 to your computer and use it in GitHub Desktop.
Save HainanZhao/3e1192ade21592d8975edddace9a1fa6 to your computer and use it in GitHub Desktop.
Sybase SQL Anywhere check Data, DB File, Log File size
--Table Size
SELECT sum((((table_page_count * DB_PROPERTY('PageSize')) / 1024) / 1024)) as TableSize FROM SYSTAB
--DB File Size
SELECT db_property('filesize') * DB_PROPERTY('PageSize') / 1024 / 1024 as FileSize
--Log File Size
select db_extended_property('FileSize', 'TransLog') * db_property('PageSize') / 1024 / 1024 as LogSize
--Reference
--http://dcx.sap.com/index.html#sqla170/en/html/81f67d7b6ce21014b742d395f1fcfac5.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment