Dear Cognos Guys,
First of all I really thankful to you guys for helping me out with my previous posts.
Now I have another situation. I have my cubes publised to PPES and right now I have to manually regenerate the cube whenever the cube need to be updaetd. I would like to create a job that will do this on a daily basis. So I figured out that I can use macros or vb script files or even a vb application that can perform the cube generation using the CognosTransformer object model.
I put together a small script, but it is not working. It is generating the following error.
trModel(TestBuild) : (TR0118) Transformer can't read the database [BrOLAP] defined in C:\temp\COGNOS\Exp DM\expense.iqd.
This is the sample script i have.
Dim strModelPath As String
Dim strLocation As String
Dim strModelSource As String
strLocation = "I:\VSS\Br\Cognos v7.3\"
strModelSource = "Expense Data Mart\Transformer\expense.mdl"
strModelPath = strLocation & strModelSource
Set objTransformer = New CognosTransformer.Application
Set objModel = objTransformer.OpenModel(strModelPath, "brOLAP", "pe##01")
Set objCube = objModel.Cubes.Item("Expense")
With objCube
.CompressMDC = False
.Consolidate = trConsolidateDefault
.CubeCreation = trCubeCreationON
.DesiredPartitionSize = 500000
.EstimatedRows = 10000000
.MaxNumPartLevels = 5
.Optimize = trOptimizeAutoPartition
.Update
If Not .IsMDCInUse Then
.CreateMDCFile 'Fails here
End If
End With
objModel.Close
Set objCube = Nothing
Set objModel = Nothing
Set objTransformer = Nothing
I have no clue why it is not working. I am using a DSN to connect to the DB. For some reason I can't use Oracle Driver to create the catalog. So my catalog is creaetd using the ODBC driver for Oracle.
Do you guys have any ideas wht's going on?
Thanks,
Pyash
First of all I really thankful to you guys for helping me out with my previous posts.
Now I have another situation. I have my cubes publised to PPES and right now I have to manually regenerate the cube whenever the cube need to be updaetd. I would like to create a job that will do this on a daily basis. So I figured out that I can use macros or vb script files or even a vb application that can perform the cube generation using the CognosTransformer object model.
I put together a small script, but it is not working. It is generating the following error.
trModel(TestBuild) : (TR0118) Transformer can't read the database [BrOLAP] defined in C:\temp\COGNOS\Exp DM\expense.iqd.
This is the sample script i have.
Dim strModelPath As String
Dim strLocation As String
Dim strModelSource As String
strLocation = "I:\VSS\Br\Cognos v7.3\"
strModelSource = "Expense Data Mart\Transformer\expense.mdl"
strModelPath = strLocation & strModelSource
Set objTransformer = New CognosTransformer.Application
Set objModel = objTransformer.OpenModel(strModelPath, "brOLAP", "pe##01")
Set objCube = objModel.Cubes.Item("Expense")
With objCube
.CompressMDC = False
.Consolidate = trConsolidateDefault
.CubeCreation = trCubeCreationON
.DesiredPartitionSize = 500000
.EstimatedRows = 10000000
.MaxNumPartLevels = 5
.Optimize = trOptimizeAutoPartition
.Update
If Not .IsMDCInUse Then
.CreateMDCFile 'Fails here
End If
End With
objModel.Close
Set objCube = Nothing
Set objModel = Nothing
Set objTransformer = Nothing
I have no clue why it is not working. I am using a DSN to connect to the DB. For some reason I can't use Oracle Driver to create the catalog. So my catalog is creaetd using the ODBC driver for Oracle.
Do you guys have any ideas wht's going on?
Thanks,
Pyash