How to decrease CA Directory database file size
search cancel

How to decrease CA Directory database file size

book

Article ID: 46676

calendar_today

Updated On:

Products

CA Directory CA Identity Manager

Issue/Introduction

I tried to change the dxgrid-db-size to a smaller value with CA Directory dxextenddb tool but it failed with below error message.

“New size smaller than old size”

How can I change it?

Environment

Release 14.1
Component: CA Directory

Resolution

The dxextenddb tool is used to increase the size of a data store file size, but it cannot be used to decrease its size.

To decrease the size, you would need to create a new data store file and migrate its data back into it. Instructions below:

  1. Shutdown the DSA

    Since this will stop the service the DSA is offering, one will need to handle it with the service failover in mind. If a multi-write is configured for the said DSA to participate, it will work better when there is nothing in its multi-write queue waiting to write to other multi-write partners. When it is down, the other partner DSAs, however, will naturally queue any updates that need to come to this DSA and hence those updates will be just coming in once the DSA is restarted.
  2. Export the current data to a LDIF file using the dxdumpdb.
    dxdumpdb -f ldif-file DSA_Name
  3. Delete dsaname.db file, usually under <DXHOME>/data/DSAname.

    It is actually configured through the "set dxgrid-db-location" in the dsaname.dxi file under <DXHOME>/config/servers.

  4. Modify dxgrid-db-size to the new(smaller) value, usually in the same dsaname.dxi file.

  5. Create an empty data store with dxnewdb
    dxnewdb DSA_Name
  6. Import the LDIF file in the new data store.
    dxloaddb DSA_Name ldif-file
  7. Restart the DSA

 


 

 

Additional Information

For more information regarding dxextenddb, see the following documentation link:

DXextenddb Tool -- Increase the Size of a Datastore

The need to shrink a data store is usually uncommon. You can avoid this scenario by allocating a small DB size to your DSA initially. There are a few ways one can monitor the growth of a DSA:

  1. Monitor the growth of your DSA via alarm logs, there will be alarms triggered when the growth reachs beyond 60%
  2. Monitor the alarm log messages when a DSA starts, there will be messages show the percentage of the file usage.
  3. Use 'get cache;' through dxconsole command 'get cache;' to get this information

You can then extend the DB size when necessary.