How to reduce the size of an eHealth database
search cancel

How to reduce the size of an eHealth database


Article ID: 36206


Updated On:


CA eHealth



            This is how you can reduce the size of an eHealth database



            1. Make whatever changes you believe will reduce the size of the data, such as removing elements or changing the rollup schedule


                A) If changing the rollup schedule, you should also allow time for the rollups to proceed, in order to actually reduce the data size 

                B) If deleting elements, note that elements are soft deleted for 7 days, so you would need to run the following command,
                    to remove them immediately, after deletion 

                nhScrubFsa -fsaTtl 0 -deletedObjectHours 0 


            2. Create an ASCII backup of the database ; $NH_HOME/bin/nhSaveDb -p <path to DBSave> -ascii


            3. Destroy the current database; nhDestroyDb -s EHEALTH (given the DB instance name is EHEALTH) 


            4. Reboot the system and create a database, using the following command 

                     nhCreateDb -s EHEALTH 


             5. Check your latest LCF file, in $NH_HOME/oracle/database, to see if there are additional datafiles that you'd need to create. (Example below)

                  # Database File Layout:


ArchiveLogsDir             1000M       E:/eh_db/oradata/{SID}/ArchiveLogs

CONTROL                    8M          E:/EH_DB/ORADATA/{SID}/CONTROL01.CTL

CONTROL                    8M          E:/EH_DB/ORADATA/{SID}/CONTROL02.CTL

CONTROL                    8M          E:/EH_DB/ORADATA/{SID}/CONTROL03.CTL

FlashLogsDir               500M        E:/eh_db/oradata/{SID}/flashRecoveryArea

NH_CRN                     100M        E:/EH_DB/ORADATA/{SID}/NH_CRN01.DBF

NH_DATA01                  428M        E:/EH_DB/ORADATA/{SID}/NH_DATA01A.DBF

NH_DATA01                  428M        E:/EH_DB/ORADATA/{SID}/NH_DATA01B.DBF

NH_DATA01                  428M        E:/EH_DB/ORADATA/{SID}/NH_DATA01C.DBF   <--------(Do not create this datafile in step 6)

NH_DATA02                  115M        E:/EH_DB/ORADATA/{SID}/NH_DATA02A.DBF

NH_INDEX                   303M        E:/EH_DB/ORADATA/{SID}/NH_INDEX01.DBF

NH_REG01                   460M        E:/EH_DB/ORADATA/{SID}/NH_REG01A.DBF

NH_REG02                   60M         E:/EH_DB/ORADATA/{SID}/NH_REG02A.DBF

NH_REG_INDEX01             460M        E:/EH_DB/ORADATA/{SID}/NH_REG_INDEX01A.DBF

NH_REG_INDEX02             60M         E:/EH_DB/ORADATA/{SID}/NH_REG_INDEX02A.DBF



If you have multiple NH_DATA01 files, as the aboe example, create all but the last one. 

In this example, the freshly created database will have one NH_DATA01 file, named NH_DATA01A. 



6.  Create an additional datafile, as follows, but don't create the 3rd one, with eHealth stopped and Oracle running


nhManageDbSpace -add -newPath <directory> -tablespace NH_DATA01 -size 2000M   


This will create a datafile called "NH_DATA01B", with an initial size of 2GB; which will grow until it reaches 32GB

Also, keep in mind that the directory notation will have "oradata/EHEALH" appended to it

So, if your data files are in /EHDB/data/oradata/EHEALTH/ would just specify /EHDB/data" as the directory


7. Load the ASCII save; 

nhLoadDb -p <the path to *.tdb database save directory> 


Additional Information:

This will reduce the size of your database, to some degree. It's difficult to say exactly how much it will be reduced




Release: LHDEVC99000-6.3-eHealth-Live Health Upgrade Elements