Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Cubes without Disabling or Enabling Them 2

Status
Not open for further replies.

naveenshindhe

Technical User
Jan 22, 2003
31
0
0
GB
hi,
1. how to update the cubes automatic in powerplay.
does any body has idea regarding this
thanks
naveen
 
Hi,

What we do here for automatic refresh is to use batch files. An example code is given below

"d:\Program Files\Cognos\Cer2\Bin\Trnsfrmr.exe" -n2 -s "E:\Cognos7Data\CM_Master.Pyi"

and run the batch files periodically

Hope it solves it

Vish
 
I'm not ok with astra1.

you're obliged to disable the cube before copying the mdc file else you can have problem with lock on the mdc file is opened during the creation.

The better way is to calculate on one disk and after the completed operation is done to copy it on the target directory (then you juste disable before the copy and enable at the end of the copy).

Sorry for my poor english ...
 
Both RVLF & astra1 are correct. If you try to refresh a cube and someone has the same cube open, then the final write to the cube will fail.

However using atra1's batch file is the perfect way to automate the re-freshing of cubes.

I run schedular every night, just to run a batch file like atra1 has shown here, with 7 differnt cubes.I use schedular to "kick-off" the batch file at 1:00am, and then when I come in in the morning, all the cubes are fresh.This way refresh the data, and not run into a sharing conflicts with your users.

If you must re-fresh while people are around, RVLF's solution can be used in combination with batch files.

Bruce
 
F:
cd \cognos
echo off
echo ##### testcb #### starting >>cubebuild.log
date <enter.txt >>cubebuild.log
time <enter.txt >>cubebuild.log
echo ** Delete cube
del F:\cognos\testcb.mdc
echo ** Build cube
C:\program files\Cognos\cer2\bin\trnsfrmr.exe -n -k dbname=dbid/password F:\cognos\testcb.mdl
echo ** Move cube
REM DISABLE CUBE
&quot;C:\program files\cognos\cer2\bin\ppadmtool.exe&quot; < &quot;C:\cognos\Disable.txt&quot;
copy F:\cognos\testcb.mdc G:\cognos\productioncubes >>cubebuild.log
REM ENABLE CUBE
&quot;C:\program files\cognos\cer2\bin\ppadmtool.exe&quot; < &quot;C:\cognos\Enable.txt&quot;
echo **testcb Cube moved. >>cubebuild.log
date <enter.txt >>cubebuild.log
time <enter.txt >>cubebuild.log
echo ** Cube has finished building. >>cubebuild.log
*pause CP
 
One small comment:
It s better to use the KILL command instead of the DISABLE command, when stopping a cube with ppadmtool.

comparaison with the Windows PPES admin tool.
KILL = Stop immediatly
DISABLE = Stop after the last request have been completed

Cognos is advicing that DISABLE can have some strange effects.

 
Hi,

Just to add one point in continuation from my previous comment, it is better if you have one more batch file which copies the refreshed cube to the production Server. An example code is like the one shown below

Copy /y e:\cognos7data\cubes\pm\*.mdc e:\cognos7data\Cubes\AM

If you are not sure that your cube will not be copied, then you can have a manual process for the same.

Vish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top