Moving Databases in Planning Analytics
Written by Chris Sands
In IBM Planning Analytics, whether in the Cloud or on-premise, you need to move databases between environments. Modern methods of communication mean that it’s easy to get distracted. In this blog, I’ll share my checklist guide that I tick off as I go when moving databases. This checklist works for me, you may find you need additional steps for your tasks.
Before I run through the checklist that I use, I should mention a couple of structural things. In a TM1 model, I create a few extra folders and subfolders to move objects around. I have a ‘<database name>\MIGRATION’ folder that I use to port objects. A ‘\MIGRATION \IN’ folder to hold objects that I am bringing into the database and a ‘\MIGRATION \OUT’ folder to hold objects ported out of the database. Also, I have folders within these for the specific instance of a transfer. I name these in the format ‘yymmdd-<description of the transfer reason’ e.g., ‘220321-Create Month End Reset’. I copy the objects in development into a folder called ‘\INPROGRESS’ to ensure that any ongoing work does not get overwritten.
In this example, I want to take a complete database from production into development to have up-to-date data. For this, I will do the following:
- Ensure everyone is logged off the model in the production environment.
- Commit the production database to disk by running the SAVEDATAALL command.
- Stop the production database.
- Create a new folder in the <database name>\MIGRATION\OUT directory, e.g., ‘220321-Create Month End Reset Test’.
- Copy and compress the database to this new folder.
- Restart the database.
- Let my colleagues know that the production environment is available again.
- Copy the backed-up database to a <database name>\MIGRATION\IN directory on the development environment.
- Ensure my colleagues have logged off the development environment.
- Copy any IBM Planning Objects currently in development to a folder, such as <database name>\INPROGRESS.
- Commit the development database to disk by running the SAVEDATAALL command.
- Stop the development database.
- Rename the <database name>\DATA folder to something like <database name>\DATA_yymmdd. Extract the compressed file in the <database name>\MIGRATION\IN folder and populate the <database name>\DATA folder with the objects.
- Overwrite the objects in the <database name>\DATA with the objects in the <database name>\INPROGRESS folder so that you have the latest version of the objects in development.
- Start the development database.
- Check you’ve got up-to-date data in the database and have the objects you have been working on in the database, and they are all OK.
- If everything is OK, let everyone working on the development environment know and either delete or move to the <database name>\BACKUP folder the database name>\DATA_yymmdd folder. Otherwise, stop the development database, delete the <database name>\DATA folder you had transferred and rename the database name>\DATA_yymmdd folder back to database name>\DATA and restart the development database, work out what went wrong and restart from the appropriate place.
The process to move objects from a development to a live environment is as follows:
- Ensure everyone is logged off the model in the development environment.
- Commit the development database to disk by running the SAVEDATAALL command.
- Stop the development database.
- Create a new folder in the <database name>\MIGRATION\OUT directory, e.g., ‘220321-Create Month End Reset’.
- Move the IBM Planning Analytics objects that you want to transfer to the production or live environment.
- Restart the development database.
- Let my colleagues know that the development environment is available again.
- Make a backup copy of the <database name>\DATA folder or rename it temporarily.
- Copy the <database name>\MIGRATION\OUT directory on the development environment to a <database name>\MIGRATION\IN directory on the production environment.
- Ensure my colleagues have logged off the production environment.
- Commit the production database to disk by running the SAVEDATAALL command.
- Copy the IBM Planning Objects in the <database name>\MIGRATION\IN folder containing the new objects to the <database name>\DATA folder and overwrite any objects.
- Restart the production server.
- Check that you’ve got the up-to-date objects in the model and that they are all OK.
- If everything is OK, then broadcast to everyone working on the live environment that they can resume and either delete or move to the <database name>\BACKUP folder the database name>\DATA_yymmdd folder. Otherwise, stop the production database, delete the <database name>\DATA folder you had transferred and rename the database name>\DATA_yymmdd folder back to database name>\DATA and restart the production database.