If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Initialize Calendar

Started by pt@tbcg, 06 Feb 2007 01:19:07 PM

Previous topic - Next topic

pt@tbcg

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

djones

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:


  • Navigate to Cognos Connection
  • Click on the New Data Integration Task button and select New Metric Export
  • Provide a name for your export, i.e. Scorecard Objects and change the folder that the export will be saved to and click Next.
  • In the Available Objects page, select any objects you would like to include in the export, in your specific case, this would include Business Calendar and click Next.
  • The next window will give you the option of exporting object data within a specific window of time.  For your specific need, I would suggest leaving this as All data for selected objects.  Click Next.
  • The next window provides you with the opportunity to export actual scorecard data.  This is very useful if you are creating exports for moving your Metric Store from one environment to another, or as part of a regular maintenance regiment, however, for your specific question, you are wanting to focus more on scorecard objects rather than data, so on this window, you should uncheck all check boxes under the Available value types.  Click Next.
  • On the next window you will have the option of including multiple currencies.  Change this as appropriate and click Next.
  • The next step is very important as it will determine where the actual export files are to be located.  By default a new directory will be created that has the same name as the name of your export.  This directory will be created at <drive letter>:\Program Files\Cognos\c8\deployment  If you are satisfied with the location of the new directory and its name, click Next.
  • The next window will allow you to review the contents of your export, if you are satisfied with everything, click Next.
  • Select how and when you want to run the export in the next window and click on Finish.

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:


  • Provide a name for your import job and change the target folder if you wish.  Click next.
  • On the next window the default behavior is only to import of the data from flat files into the Metric Store staging tables, which will not result in the data being imported into the scorecards until a step is executed that will transfer data from the staging tables into the Metric Store.  To do this in one step, check the check box next to Transfer data from the staging area into the metric store.  Click Next.
  • In the next window, set your run options and select Finish.

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!