Monday, January 21, 2013

How to use Cognos trigger (windows based)

Context
One of major tasks in BI environment is to make report or dashboard available on time. What time to run report is based on when data load, or ETL is finished. A fixed schedule is not a flexible solution, especially when some data is not delivered on time.  Cognos trigger becomes a very important tool to integrate ETL and report in term of schedule.  Cognos triggers can trigger all Cognos components that can be scheduled. Besides report, there are jobs, event and metrics.

Where is trigger.bat


How to use trigger



How to start trigger

Execute command below
trigger.bat "http://servername:port/p2pd/servlet/disatch" username password namespace "triggername"
If succeed, Trigger trigger1 fired successfully
Please note that there is no difference between dispatch and gateway, as it uses content to coordinate which dispatcher is available for that services. 


In real situation, all detail command will be further wrapped as a bat command, such as Trigger1.bat
set [APPSRV]=localhost
set [TRIGGER]=C:\"Program Files (x86)"\ibm\cognos\c10_64\webapps\utilities\trigger\trigger.bat
set [USER]=username {PassWord} "password"
set [JOB]=Trigger1
cd C:\Program Files (x86)\ibm\cognos\c10_64\webapps\utilities\trigger\
%[TRIGGER]% http://%[APPSRV]%:9300/p2pd/servlet/dispatch %[JOB]%

There are two popular ways to handle it in SQL server world:

SSIS



Database procedure

EXEC master..xp_cmdshell  'C:\Charles\Trigger1.bat'


How to setup trigger

If Cognos is setup on the machine where command is executed, then there won’t be any issue. Certainly, you need to have trigger enabled and right permission.  However, when Trigger is not setup on the computer, then it is possible as well, please see document for detail,  using Trigger utility on a computer not having Cognos installed

In addition, there are two article from IBM for detail reference:
Triggering an IBM Cognos 8 Event Externally
Automating Deployment of IBM Cognos 8 BI

2 comments:

  1. The only issue I'm having with the trigger script described here is that the credentials are stored in the script. This violates my companies security policy. Is there any way to trigger a Cognos 10 report schedule and use the credentials stored in the Cognos schedule rather than passing credentials from the script?

    ReplyDelete
  2. I have a report that runs daily. The values in this report determine if someone needs to be notified of this report. I am trying to figure out how to define a trigger which will meet this need. I am new at programming a trigger.bat file for this purpose. Any help or direction here would be appreciated.

    ReplyDelete