How can you recover the model for a report? This process may be used when the Framework Manager project directory was deleted or lost. It will only recover the model for selected package
Resolving The Problem
Steps for CQM Model:
It's possible to recover a model from the Content Store by using a CQEConfig.xml file in the <Cognos_Root_Installation>/configuration directory and accessing a published packaged based on the deleted model within Cognos Report Studio.
The model will be saved within the directory <Cognos_Root_Installation>/data/cqe/RTModels.
Cognos 10.x.x :
1. Backup <Cognos_Root_Installation>/configuration/CQEConfig.xml.sample
2. Rename CQEConfig.xml.sample to CQEConfig.xml:
3. Under XML tag : <component name="CQE"> add content :
<section name="General Options">
<entry name="KeepModelXML" value="1" />
4. Save file and stop Cognos service
5. Rename the directory <Cognos_Root_Installation>/data/cqe/RTModels to "ORIGINAL_RTModels" .
6. Restart the Cognos Service.
7. Launch Cognos Report Studio and create a new report using the package you wish to recover and run it, noting the time.
8. Verify that a new <Cognos_Root_Installation>/data/cqe/RTModels directory has been created and an xml file with a creation time matching the run time of the report exists.
9. Rename CQEConfig.xml created to CQEConfig.xml.recoversave or delete it.
10. Move the newly created <Cognos_Root_Installation>/data/cqe/RTModels directory to a working location.
11. Rename <Cognos_Root_Installation>/data/cqe/ORIGINAL_RTModels directory back to "RTModels".
12. Restart the Cognos Service.
13. Open Framework Manager, create and save a new empty project.
14. Close Framework Manager.
15. Locate the empty Framework Manager project directory and rename the model.xml file to model.xml.origin
16. Copy the the xml file created in steps 8 into the empty Framework Manager project directory and rename the file "model.xml".
17. It should now be possible to open the model in Framework Manager
It may be prudent to rename the Package name in the Framework Manager model so as not to inadvertently overwrite the existing published package.
Steps for DQM model (and alternate method for CQM):
- Launch CMTools (<install location>/bin/utillities/cm/CMTools)
- On the Toolbar at the top, choose Window>Preferences. Here you need to adjust your CM URL to match your environment
- Once that is complete, refresh the Content Tree on the left and the contents of your content store will be displayed
- Depending on where your packages are located, you navigate to each of them and do the following:
- Under the package, click on model and its properties will be displayed on the right.
- At the top right, you will need to click on the icon to toggle to all properties.
- Once all properties as displayed, you can find model as one of the properties.
- Right click on the value beside model and copy the entire value.
- Open a text editor and do a 'Save As'. Make sure you save this blank file as UTF-8 :
- Save the file as model.xml (.. very important that you did step #9)
- Now paste the value copied from CM Tools into this file and save.
- At the top of the file, please add the following line:
and save again.
NOTE1: this will only create a model for the package contents .. ie. if the FM model was much larger but only a part of it was published, you will only have the published portion.
NOTE2: this will need to be done for each published package. Make sure when you save each model in a separate folder so that you know what package it was extracted from.
15 June 2018