COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => BI Modeling (Transformer) => Topic started by: khoinh on 18 Aug 2010 09:44:47 PM

Title: How to build cude automatically
Post by: khoinh on 18 Aug 2010 09:44:47 PM
Hi,

    I designed a cube by Transformer tool from one package that I created by Framework Manager. In the first day of each month, I always rebuild my cube. How can I do this task with my defined schedule ? And I also want to receive alert email about result of this rebuild.

Thanks
Title: Re: How to build cude automatically
Post by: Sarayucog on 19 Aug 2010 04:02:34 AM
Hi,

How you are running you cube. Is it manually or by using any shcedule task.

If it is by schedule task

Goto your shcedule task. Double click on that and go to SCHEDULE tab.

In Schedule task monthly pane

Select 1st radio button and select day as 1 and click on OK.

Now onwards it will runs the cube 1st day of every month.

Title: Re: How to build cude automatically
Post by: khoinh on 19 Aug 2010 09:14:32 PM
At now, I'm doing this task by manually by openning Transformer tool/Build Cube. How can I do automatically ?
Title: Re: How to build cude automatically
Post by: Sarayucog on 20 Aug 2010 12:50:04 AM
C:
cd "C:\Program Files\cognos\c8.4-disp_1\bin"
C:cogtr.exe -n2 -i -s "D:\Path_of_ur_model\Model_name.pyj"

The above code will run ur cube autiomatically.

Write the above code in a notepad and save it as .bat.

From Controm panal goto schedule and tasks. Here create a schedule task and assign the avobe create .bat file to this schedule task and use the previous reply settings to run ur cube as ur requirement.

cscript D:\Ptath_of_ur_VB Script file\VBScript_File_Name.vbs

If you want to check the errors you have to write a VB Script file. If you have VB Script file add this line ( cscript D:\Ptath_of_ur_VB Script file\VBScript_File_Name.vbs ) in your .bat file.

ejoy  :)     
Title: Re: How to build cude automatically
Post by: cognostechie on 20 Aug 2010 01:57:40 PM
You also have to disable the data source to the cube before you execute the build command using 'cogtr'. If you don't , it might error out if somebody is connected to the cube. Afetr building it, enable the data source. This is the easy way to automate it.

In 8.4, you can also build it and 'activate' after building it. The Transformer user guide has commands for automating cube builds using PCConnect utility.
Title: Re: How to build cude automatically
Post by: bdbits on 27 Aug 2010 03:39:13 PM
In Cognos 8.4 you do not have to disable the data source, and if you set the properties on the cube correctly it will automatically deploy without disconnecting the active users or requiring any additional software to run beyond Transformer. This became possible sometime in the 8.x versions, I think it was 8.3 but I cannot be sure.

The following link to the on-line manual has all the command line options for Transformer.

http://publib.boulder.ibm.com/infocenter/c8bi/v8r4m0/index.jsp?topic=/com.ibm.swg.im.cognos.ug_cogtr.8.4.0.doc/ug_cogtr_id11786CommandLineOptions.html
Title: Re: How to build cude automatically
Post by: cognostechie on 27 Aug 2010 06:08:31 PM
That's exactly what I meant about 8.4 > I stated about disabling Data Sources because the original poster did not mention what version he is using.

The feature you are talking about was introduced in 8.4, not 8.3. It connects the user's report to the newly built cube which is called 'activation'.
Title: Re: How to build cude automatically
Post by: khoinh on 06 Sep 2010 04:28:51 AM
Hi

  I used this script in my file:
C:
cd "C:\Program Files\cognos\c8.4-disp_1\bin"
C:cogtr.exe -n2 -i -s "D:\Path_of_ur_model\Model_name.pyj"

   My script ran successfully but I did not see my category file is updated (ABC.mdc). How can category file be updated? I'm working in Cognos v8.4

One more question: if there are two cubes (A and B) are defined in my package (Model_name.pyj) and I only want to rebuild A cube. How can I do it?

Thanks
Title: Re: How to build cude automatically
Post by: khoinh on 26 Sep 2010 11:36:39 PM
Hi,

  After my script was done, transformer requested me to input account before it completed. How can I skip this step "type account"?

Thanks