Skip to Content
SAP Mobile Platform

When to Reclaim CDB space in SUP 2.x

Tags:

This technical document explains how to figure out if the CDB in SUP needs to be rebuild to reclaim the space.

Required Software

1.    SUP 2.x.x or higher

Solution

How to verify if the database needs to be unloaded to reclaim space?

  1. Open a command prompt as administrator
  2. Issue this command against the database you want to check. In our case we are executing the command against the default.db

    

 

C:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\BIN64

\

C:\Sybase\UnwiredPlatform\Servers\SQLAnywhere12\BIN64\dbinfo.exe -u -c "uid=dba;pwd=sql;dsn=default-cdb"

  1. You should see something like that:

SQL Anywhere Information Utility Version 12.0.1.3810

Database  : C:\Sybase\UnwiredPlatform\Servers\UnwiredServer\data\default.db

Log file  : C:\Sybase\UnwiredPlatform\Servers\UnwiredServer\data\default.log

Log mirror: none

Free pages: 5

Page size : 4096

Encrypted : No

Strings padded with blanks for comparisons: Yes

CHAR collation sequence: UTF8(CaseSensitivity=Ignore)

CHAR character set encoding: UTF-8

NCHAR collation sequence: UTF8(CaseSensitivity=Ignore)

NCHAR character set encoding: UTF-8

Database checksums enabled: Yes

Encrypted tables supported: No

     Table   Table            Index           Percent  Name

      id     Pages    %used   Pages    %used  of File

     -----  --------  -----  --------  -----  -------  ----

         1        12  ( 91)        11  ( 43)      1    ISYSTAB

         2        41  ( 92)        18  ( 62)      4    ISYSTABCOL

         3         8  ( 88)        17  ( 57)      2    ISYSIDX

         4        15  ( 87)         3  ( 55)      1    ISYSPHYSIDX

         5         6  ( 77)        16  ( 52)      1    ISYSIDXCOL

         6         2  ( 57)         2  ( 54)      0    ISYSFKEY

         7         1  (  1)         2  (  8)      0    ISYSDBSPACE

         8         1  ( 16)         1  (  9)      0    ISYSDOMAIN

         9         2  (  6)         4  ( 10)      0    ISYSUSER

        10         2  ( 74)         6  ( 28)      0    ISYSTABLEPERM

        11         0  (  0)         4  (  7)      0    ISYSCOLPERM

        12         2  ( 61)         4  ( 31)      0    ISYSOPTION

        13         1  (  3)         3  (  9)      0    ISYSGROUP

        14        99  ( 62)        14  ( 46)      9    ISYSPROCEDURE

        15        30  ( 93)        14  ( 63)      3    ISYSPROCPARM

        16         2  ( 36)         7  ( 11)      0    ISYSTRIGGER

        17         1  ( 75)         3  ( 50)      0    ISYSPROCPERM

        18         0  (  0)         4  (  7)      0    ISYSPUBLICATION

        19         0  (  0)         3  (  7)      0    ISYSARTICLE

                                    :

                                    :

            ========         ========

Total:           541 table +      650 index + 5 free + 0 bit map + 11 other = 1207 pages

  1. We are interested in the Total:  notice “5 free”. This is the free pages in your database. That means most pages in the database are utilized so no space lost.

Summary

Use dbinfo utility to figure out if the SUP CDB default database needs to be unloaded in order to reclaim the space.