COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Transformer => Topic started by: cognostechie on 04 Sep 2014 05:50:48 PM

Title: Cube not getting built by batch sometimes
Post by: cognostechie on 04 Sep 2014 05:50:48 PM
So I made a script to refresh the cube and this is what my script has:

rmdir /q /s "C:\Cognos Cubes\sales cube"

mkdir "C:\Cognos Cubes\sales cube"

cd "C:\Program Files (x86)\ibm\cognos\c10\bin"

cogtr -n -g -p "C:\Cognos Cubes\Sales Cube.pyj"

copy "C:\Cognos Cubes\sales cube.mdc" "C:\Cognos Cubes\sales cube\sales cube.mdc"

"C:\Program Files (x86)\ibm\cognos\c10\bin\pcactivate.exe" "sales cube.mdc" "C:\Cognos Cubes"


In Transformer, the deployment strategy setting is:

copy to available locations. then activate 

after building the cube:

automatically copy and activate

Deployment location:

C:\Cognos Cube\Sales.mdc

It's working but on some days, it doesn't build the cube and the log file says that the cube is locked !
I thought it would do the versioning, build the cube on the side of the existing cube and then swap it so
why does it say that the cube is locked !

Any ideas?
Title: Re: Cube not getting built by batch sometimes
Post by: cognostechie on 05 Sep 2014 04:10:12 PM
Nobody ?

If I include a line in the script to delete the cube in the main folder using :

rm "C:\Cognos Cubes\sales cube.mdc"

then it works. Question is are we supposed to delete it before building it? In the earlier version when they
had the PCConn utility, I didn't have to delete it, just disabling the datasource used to work.

Anybody wants to share their script?
Title: Re: Cube not getting built by batch sometimes
Post by: bdbits on 08 Sep 2014 09:03:48 AM
cognostechie, you do not need to delete anything, make any folders, disable a cube, etc. provided you have your cube properties set up right (esp the deployment options tab). Transformer will then do all of that for you, even version the cubes so you can roll back if you need to (versioning is on the deployment tab).

My batch files essentially cd to the bin directory and execute a command-line for Transformer. That's it.

Title: Re: Cube not getting built by batch sometimes
Post by: cognostechie on 08 Sep 2014 05:24:47 PM
Thanks bdbits . You are correct ! 

So now I have only 3 commands, navigate to bin folder, run cogtr and then pcactivate. It's working now and keeping different versions.

The user guide says that we have to manually copy the mdc file to that folder, that's why I did it like that. Wonder why they don't update the doc when they release a new version.
Title: Re: Cube not getting built by batch sometimes
Post by: bdbits on 09 Sep 2014 08:51:07 AM
Glad it worked for you. I will say I do not even need pcactivate. But my cubes run in the wee hours of the morning when there is likely no one trying to use them, so perhaps it goes a little smoother.

This is the latest documentation I am aware of that discusses deployment. Transformer has not changed much since I have been using it (v8.2 I think), except for the much easier deployment.

http://www-01.ibm.com/support/knowledgecenter/SSEP7J_10.2.1/com.ibm.swg.ba.cognos.ug_cogtr.10.2.1.doc/t_copyandactivatepowercube.html%23CopyAndActivatePowerCube?lang=en (http://www-01.ibm.com/support/knowledgecenter/SSEP7J_10.2.1/com.ibm.swg.ba.cognos.ug_cogtr.10.2.1.doc/t_copyandactivatepowercube.html%23CopyAndActivatePowerCube?lang=en)
Title: Re: Cube not getting built by batch sometimes
Post by: cognostechie on 09 Sep 2014 10:02:54 PM
True that it hasn't changed much in features but there has been a big change since 8.2 especially in building the cubes (amazingly faster now) and changed  a lot in deployment. In 8.3, they introduced the pcconn utility which used to disable and enable a cube and from 8.4 onwards, the versioning started. Till 8.2, the best allowed was the 'swap'.

This is the user guide that came with 10.2.1 and page 204 says 'Before using pcactivate. copy the cube manually....'  .

On page 201 it says 'Activate a powercube using pcactivate on page 190' but page 190 has no mention of pcactivate. The document does not get updated fully and I was going with this.

http://public.dhe.ibm.com/software/data/cognos/documentation/docs/en/10.2.1/ug_cogtr.pdf

Moderator edit: Removed the attachment and added a link to the same document on the IBM site. MF.
Title: Re: Cube not getting built by batch sometimes
Post by: Michael75 on 10 Sep 2014 03:52:34 AM
cognostechie, you're going to have the mods after you for uploading copyrighted IBM material  ;D

http://www.cognoise.com/index.php/topic,25158.msg79351.html#msg79351 (http://www.cognoise.com/index.php/topic,25158.msg79351.html#msg79351)
Title: Re: Cube not getting built by batch sometimes
Post by: cognostechie on 10 Sep 2014 12:27:18 PM
Thanks for providing that link to the earlier discussion but this was just a document which is freely and easily available to everybody. It's copyrighted so that nobody can copy it but that doesn't mean nobody can use it without having a license. It's a document, not the software. What is copyrighted for me is the license plate of my car, the title of my house, my bank account etc  ;D
Title: Re: Cube not getting built by batch sometimes
Post by: Lynn on 10 Sep 2014 02:06:33 PM
Quote from: cognostechie on 10 Sep 2014 12:27:18 PM
Thanks for providing that link to the earlier discussion but this was just a document which is freely and easily available to everybody. It's copyrighted so that nobody can copy it but that doesn't mean nobody can use it without having a license. It's a document, not the software. What is copyrighted for me is the license plate of my car, the title of my house, my bank account etc  ;D

I'm with you on that one. I don't really see the issue with attaching documents that are freely available to anyone via IBM's web site. I tend to keep copies of useful documents handy on my laptop and it is easier to just attach than to go hunt down the link. But that is the rule so I will obey :)
Title: Re: Cube not getting built by batch sometimes
Post by: cognostechie on 10 Sep 2014 03:01:10 PM
Yes, yes that is true. The point here is that if that is the rule for you then that should be the rule for me too  ;)