Skip to Content
SAP Advantage Database Server

How to findout the stored file size in the ADS memo file ADM?

There are a couple ways to get memo size information. In 11.10.x there is added a system procedure sp_GetTableSizeInfo which will tell the size of the table and memo file. It returns the memo header size, block size, and block count. From these values it can be calculate the total file size.

If the field is a memo field (as opposed to binary) it could be used the LENGTH() scalar in the SQL engine to return the field size. This would only work if they are storing character data, not binary file attachments.

There is an ACE API AdsGetMemoLength that returns the length (size) of a memo/BLOB field for the current record. The user could write a simple application that calls this API for each record to return the sizes of the memo fields (attachments). Note, this would likely cause the client to read each memo from the server - essentially reading the entire memo file from the server.

No comments