Friday, January 25, 2013

Deploying Cognos Content Between Environments

Keywords: Deploy, Deployment, Export, Import, Content Store

     Outside of a Proof of Concept, any environment where an application like Cognos is installed, it is wise to have at least two instances, one for development and one for production. In these cases you will have to deploy reports and other content from development to production and vice-versa.  There are multiple ways this can be done depending on your needs.

Business Case: 
Let's say you want to refresh development environment with the current version of production.

Database Level Deployment:
     You can use this method when deploying the entire content store.
  • Stop cognos services in both development and production environments.
  • Have your DBA make a copy of the production cognos content store schema.
  • Restore the copy in your development environment.
  • Open cognos configuration in development environment
  • Under "Data Access" section, add new content store database, and enter the details of the schema copy that you just created.
  • Start cognos services in both environments.
  • Now your development environment will have all the content of your production environment including access rights and user information.
Deployment through the Cognos Portal:
     This is the recommended and preferred method and works for all requirements. You will be using the deployment wizard to do this:
  • Login to your production environment and launch "IBM Cognos Administration" from Cognos Portal.
  • Click on "Configuration" tab and "Content Administration" in the left pane.
  • From the toolbar item, click "New Export"
  • Enter a name of the export and a description (optional) and click Next
  •  Next, select the desired deployment method: You can choose to export the entire content store or only selected folders or packages.
  • If you pick the entire content store, you can optionally include user account information to have the same security settings as in the production environment
  • In the next step, entire a name for the archive. This will be the file name when the export completes.
  • If you are exporting the entire content store, cognos requires you to encrypt the archive using a password. Enter a password:
  •  After this step, review the settings, save and run the export.
  • Check the activities in IBM Cognos Administration to make sure export runs and completes successfully.
  • Login to the production cognos server and navigate to: <cognos install directory>\deployment folder.
  • Find the zip file with the name you entered in the Export wizard.
  • Copy this file to the development environment.
  • Now login to the Development environment and navigate to Content Administration.
  • Create a "New Import" from the toolbar icon
  • Select the archive that you just copied over and click next.
  • Select the desired settings and click Finish.
  • Now your content from production environment will be imported.
  • Go to "Current Activities" in the "Status" tab of "IBM Cognos Administration" and make sure the import completes successfully.

7 comments:

  1. Suggestion: Point the deployments folder on the production server to the folder on the test server using a network path. (or vice versa)

    ReplyDelete
  2. I am wondering how this impacts the Report ID. We are looking to move a specific folder of reports from dev to prod by using the content store export and import option. When we do this we need to keep the same report ID's because of a third party tool that is linked to the report by the ID. When I tested one export and import of a folder all the report ID's changed. I am using 8.4.1 and do not see an option to keep the same Id when I do the import. Any suggestions on how to do this would be greatly appreciated.

    ReplyDelete
    Replies
    1. AFAIK, retaining the report IDs is possible only when the entire content store is deployed.

      Delete
  3. Does it work with developer edition? I am trying to export with developer edition on windows xp but I get the following error:


    "
    CM-REQ-4313 An error occurred during an export operation. CM-REQ-4102 Unable to use the file "content.xml" for export. class java.lang.NullPointerException Runtime Exception stack trace: java.lang.NullPointerException at com.cognos.cm.request.export.createContentFile(export.java:1344) at com.cognos.cm.request.export.doAction(export.java:576) at com.cognos.cm.request.Deployment.handle(Deployment.java:2126) at com.cognos.cm.request.contentManagerService.v1.AsyncExport.doAsyncRequest(AsyncExport.java:168) at com.cognos.cm.util.AsyncThreadPool$RunRequestTask.run(AsyncThreadPool.java:97) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:898) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:920) at java.lang.Thread.run(Thread.java:736)

    CM-REQ-4102 Unable to use the file "content.xml" for export. DPR-ERR-2082 An error has occurred. Please contact your administrator. The complete error has been logged by CAF with SecureErrorID:2013-08-05-14:24:03.570-#20
    "

    Can you please advice? I do a simple test like creating a public folder with just one report and try to export it

    ReplyDelete
  4. I am not sure. I have never used developer editions before.
    Sriram.

    ReplyDelete
  5. Is it possible to deploy report in Cognos like in SSRS how we do.

    ReplyDelete