INTRODUCTION
This document explains the procedure to destroy, create, and load a database save in eHealth. Use this procedure when problem situations require the database to be reloaded, such as database corruption or other irretrievable errors as instructed by CA Technical Support.
ENVIRONMENT
eHealth 6.2.x and above
All supported platforms
INSTRUCTIONS
In the instructions below, we will use the generic terms NH_HOME and ORACLE_SID. When entering commands you should replace these with the actual values of these variables. If you don't know the values you can look them up with these simple commands:
Windows:
echo %NH_HOME%
echo %ORACLE_SID%
Unix/Linux:
echo $NH_HOME
echo $ORACLE_SID
Part 1: Back Up the Layout Configuration File (LCF)
If you are a Windows user please be logged into the eHealth server as the NH_USER account; typically this is "ehealth". If Unix/Linux, please run as the root user.
The Layout Configuration File contains information that Oracle uses to determine the names and locations of all tablespaces and datafiles in the database. Since this file is deleted when you destroy the database it needs to be backed up for use when creating the new, empty database. The file is stored in the NH_HOME/oracle/database directory and uses the name format <hostname>_ORACLE_SID.lcf.
Part 2: Destroy the Current Database
Before loading the new database, the current database must be destroyed and recreated.
Part 3: Create a New Database
Use the following command to create a new, empty database. Note that depending on the size of your database this command could potentially take an hour or more to complete.
nhCreateDb -i NH_HOME/oracle/database/hostname_ORACLE_SID1.lcf
Part 4: Load the Database Backup
Now that an empty database has been set up using the same layout as the original, you can safely load your backup files into the new database location.
ADDITIONAL INFORMATION
For detailed information on database backups, please review the eHealth Administration Guide. For more information regarding the nhDestroyDb, nhCreateDb, and nhLoadDb, please review the eHealth Command and Environment Variable Reference Guide.
Ehealth is out of support now.