COGNOiSe.com - The IBM Cognos Community

Scorecarding and Dashboard Software => COGNOS Metrics Manager => Topic started by: pt@tbcg on 06 Feb 2007 01:19:07 PM

Title: Initialize Calendar
Post by: pt@tbcg on 06 Feb 2007 01:19:07 PM
Does anyone know how to initialize a calendar for a metric package from a command/batch file or some other way than using the portal? 

I want to automate the process so that if the database was corrupted or something happened the users could run the trigger to clear the history and calendar data (already set this up as a command file) and then load the calendar info and data (data already loading from a command file).

Any help would be appreciated.

Thanks,
Paul
Title: Re: Initialize Calendar
Post by: djones on 31 May 2007 05:49:19 PM
I would recommend creating a clean copy of the metric store and then creating an export of all Metric Studio objects.  To do this, complete the following tasks:


Once you run the export you can go to the directory that you created and view the files that were created as a result of your extract.  Depending on which objects you created, you may have multiple files in this directory, however, the file containing only Calendar data will have an extension of .cal.

Now that your *.cal file, you can use this file to restore your business calendar in the event that your calendar becomes corrupt.

If you want to create a job to restore your business calendar, you can click on the New Data Integration Task, and select New Metric Import from Files.  Then complete the following steps:


Important:  If you run the Import exactly as described above, you will import data from all of the files that you created exports for, which may not be what you want.  If you choose to follow this method, make sure that the directly containing the *.cal file contains only the files you want to import.  If this is not the case, there are other methods that I can explore with you.  Something else to be very careful about when doing anything with your calendar, is that if you remove calendar data from your scorecard for one reason or another, you will lose all of the annotations, etc that are date dependent...so be very careful.  That is unless, you exported your comments as part of a data export. 

A word to the wise.  Test this entire process out in a test environment AFTER creating a full backup of your metric store so that you always have something to fall back on if something does not provide you with the desired results.

One final thought, in response to your referent to setting all of this up as part of a command file, which I assume is referring to a batch file.  Go to your help contents for Cognos Connection and review Trigger-based Entry Scheduling.  This is a very under utilized tool that is very powerful for batch processing based on the outcome of a job.  Remember that everything we have described in the above notes results in the creation of a job, which you can schedule, or call in a batch file using the Trigger functionality.

Please let me know if this helps, or if I can be of further assistance. 

Good luck!