Changing Chronicle's Database Server
The following instructions are on how to properly shutdown and replace Chronicle's database server (i.e. Interbase or Firebird). Currently Chronicle uses one of six possible database engines. The current plan is to eliminate Interbase generally.
- Interbase 6 (original)(32-bit)
- Interbase 2007 (32-bit)
- Interbase XE (Triage only) (32 & 64-bit)
- Firebird 2.03( 32-bit)
- Firebird 2.5 (32 & 64-bit)
- Firebird 2.5.1(current) (32 & 64-bit)
In order to replace the database engine for a live customer it is extremely important you follow these instructions exactly. IF YOU DO NOT UNDERSTAND HOW 32 bit AND 64 bit WORK IN WINDOWS REGISTRY AND FILE SYSTEM YOU SHOULD NOT ATTEMPT THIS PROCESS.
- Determine how long the process is going to take by looking at how long the database backup is taking in the logs(cBackup folder FULLDBPROCESSAUTO-DXX.LOG) and multiplying it by 3. Example if the backup takes 45 minutes then give yourself 2 1/2 hours. But give yourself no less than an hour.
- Have the customers log out do not just boot them out if it can be helped (The database is sensitive so treat it carefully). Once they are out go to the Services console and open the Chronicle Socket Server service. Click the Stop button and set the startup type to manual then click OK.
- While in the Services console locate and stop the database engine by finding the Interbase or Firebird Guardian service and stopping it. You will notice it will also stop the Interbase or Firebird Server service too.
- Go to the Start button All Programs Startup folder right click and open. You may have to right click and click Open all users to get access to the shortcuts. Then drag the Start Chronicle Servers shortcut and the ChronDocBackup shortcut if applicable to the desktop. This is so it will not try to launch anything upon reboot.
- Close all the Chronicle servers. Make sure you close the ChronDocBackup too. You must right click it in the tray and Close Application to stop it.
- Bring up the task manager and sort alphabetically make sure that the chronserver2.exe is not running. If it is end the process. Also check for any other Chronicle processes that should not be running. Nothing Chronicle related should be running at this time.
- Go the Program and Feature area for Windows and uninstall the current database engine. Make sure you remove all the files when prompted during the uninstall process. In fact once the uninstall is complete go to the Program Files or Program File (x86) folder and delete the residual folder(s) left behind (Firebird or Interbase).
- Now go to the registry and locate HKEY_LOCAL_MACHINE\SOFTWARE or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node if this is Firebird your removing, locate Firebird Project key and delete it if it exists. If this is Interbase be careful here there should be a Borland key under and under the Borland key there should be a Interbase key this is what you should delete if it exists.
- Removal complete reboot the server.
- Once the server is rebooted. Create a folder on the desktop called B4Firebird. Inside the folder create 2 folders Data and Data2. Make sure you have enough space on the drive your on to allow you to make these copies without using up all the drive space. Make a reminder for yourself so that after a week or so you can come back and delete the B4Firebird folder to free up the disk space. Copy the Chron.cti from the Data folder to the Data folder you just created, and the Chron.cti from the Data2 folder to the Data2 folder you just created. This gives us a back in case something goes wrong.
- Create a folder on the desktop called Firebird. Use Filezilla or other FTP client to access manchesterville.com. Locate the Firebird folder download the Firebird-188.8.131.52351_1_Win32.exe or Firebird-184.108.40.206351_1_x64.exe, security2.fdb and IBOConsoleSetup.exe to the desktop into the Firebird folder.
- Locate the Firebird-2.5.1 you downloaded and right click it and Run as administrator. Take all the defaults except on the Select Additional Tasks screen. Check "Copy Firebird client library to <system> directory?".
4. On the last screen uncheck the Start Firebird Service now? and After installation - What Next?
5. Copy the security2.fdb you downloaded into the Program Files\Firebird\Firebird_2_5 directory and overwrite the existing one.
6. Open the Chronicle Console folder on the desktop and delete the IBConsole or IBOConsole icon if it exists. If the IBOConsole existed go to the Program and Feature area for Windows and uninstall IBOConsole if it exists.
7. Locate the IBOConsoleSetup.exe you downloaded right click it and Run as administrator. Take the defaults. But check create desktop icon only.
8. Once installed drag desktop icon into the Chronicle Console folder.
9. Installation complete reboot the server.
Database Conversion - Change On Disk Structure (ODS)
At this point the old database engine is removed and the new one installed and now we need to do a back and restore to make sure that everything is working and the change the ODS. This will actually change the database. Once this is done to the database you cannot go back this is why we made a copy up front.
- Launch ChronBackup. If it does not launch then something did not get done properly.
- Click Unlock and use password "Yesterday". Do not use this normally as it can overwrite the current backed up data.
- Click the "Primary Database Backup" button.
- This starts the backup process (this is the process that would normally run at night). Pay close attention to the process there can be no errors. Essentially the database will be backed up to the second hard drive in the cBackup folder in the day that it is (i.e. Fri ). Then that data will be converted and restored to the cBackup\ChronDBTemp folder then copied to the Data2 folder. If this process completes successfully the database is converted.
- Last step in this process is to move the converted restored copy to the Data folder. Close the ChronBackup.exe and go to the Data2 folder. Copy the Chron.cti from this folder then go to the Data folder and overwrite the Chron.cti there with the one you copied from the Data2 folder.
- Conversion Complete.
Returning Things to Normal
- Return the shortcuts removed from the Startup folder. Start > All Programs right click the Startup folder. Select Open and place the icons you put on the desktop back in.
- Open the Services console open the Chronicle Socket Server change the startup type to automatic and click the Start button then click OK.
- Re-launch the Chronicle servers and the ChronDocBackup. Make sure they all login correctly.
- Return to normal complete. Let them back in.
- Create a reminder and follow up on the server for the next couple of days to make sure everything works as advertised.