最具影响力的数字化技术在线社区

乔帮主 发表于 2014-7-23 10:45:22

【宝典】Cognos 8.3 BI自动刷新Cube简要配置

本帖最后由 乔帮主 于 2014-10-1 18:50 编辑

设计简述: Cognos Transformer是Cognos V8.3多维分析模型设计工具,经过前几个本版的演变,部分功能已经整合Web Server服务中,而Cognos 8.4又重新 PowerPlay Studio组件;在7.3的版本中有PPES服务,全方位支持Cube展现、性能优化、页面美化、发布等功能操作。虽然Transformer在原有基础上做了简化,但相应的功能集成到了BI Web Server服务中,以致用户操作与调整配置相对繁琐。前些时间与Cognos技术工程师交流,也提到最版本存在缺陷是在所难免,往后版本中会更加人性化和界面化。
国内BI圈很难找到Cognos系统教学资料,更没有相关书籍。这与Cognos产品有关,一年一个版本,产品不断发展,版本不断更新,新产品替代旧产品,而大多数企业BI系统,使用Cognos BI产品会延续好几年,买Cognos技术服务是需要资金,对企业来讲,把精力放在自己维护人员身上。据了解,国内众多BI分析系统或者MIS系统,在前端开发都是满足客户OLAP分析、报表、即席查询三大模块。
本文档,是自己项目中摸索与记录下的资料,并不代表统一标准解决方案。基于Windows环境开发设计模型,手工调度Cube运行比较简单,但需要维护人员触发。而对于一个庞大的数据仓库系统,按照业务部门需求来定义数据集市,根据需求设计不同类型的分析主题,同时设计的OLAP分析模型也增多。在设计阶段,感觉不到分析模型给系统的压力,必须考虑利用调度工具来自动运行,这样可以大大减少维护工作压力,可利用系统资源空闲时运行。


Cognos系统配置检查 打开Cognos Configuration配置,检查“Authentication”下的认证配置,如:dbAuth 是第三方认证登录域名。在下图中:A区 和 B区 的 “dbAuth”名字必须相同时,调用批处理命令行加载登录信息才能通过认证。
http://img.blog.163.com/photo/csbe4oGKkAIzjP3IoQ625w==/2614621058665939301.jpg注意:“Authentication”下的登录认证域名可以自定义,但配置Transformer Cube刷新,同时又认证登录,必须要求名称一致。
Transformer设置        打开模型,在工具栏“View”下拉选择“Signons”,新建一个Signon,取名为“dbAuth”。
http://img.blog.163.com/photo/o34sIJ640RdPb5rfIY8oWg==/5415860026890570764.jpg在Signon窗口,输入“dbAuth”,按下图填好配置,点击“确定”按钮,同时保存模型。
http://img.blog.163.com/photo/zLPIhTsbDy7NCsE2nDM6KQ==/324540648148438077.jpg 对于老模型,需要调用第三方认证的“dbAuth”管理,在Custom View窗口增加“dbAuth”域名下的角色,并限制机构权限。见下图:
http://img.blog.163.com/photo/8tuGbjik7cOWbAvbfciNow==/609111849602925302.jpg 确保参数配置下的日志已经打开。http://img.blog.163.com/photo/tdFDEGReli4z5-maYvIsgQ==/1729663731888095438.jpg
AutoRun命令编辑       在Windows环境中,最好单独建立子目录来管理批处理命令,有利Cognos管理与维护。
案例如下:在Cognos服务器上创建一个D:\ MyLife_Congos_OLAP \文件夹,用来保存模型、日志、Cube、数据源文件等目录。执行计划可以用ETL调度工具,或者自己写一个调度工具,也可以用Windows系统任务计划定时调度完成。

00_Mdl_AutoRun.bat代码如下:
echo off
cls
cd D:\Program Files\cognos\c8\bin
cogtr.exe -c -s -n2 -mD:\MyLife_Congos_OLAP\Models\Cognos_mode_test.mdl-ldbAuth=admin/111111
cd D:\MyLife_Congos_OLAP\PublishCubes
del Cognos_mode_test.mdc
taskkill /f /im BIBusTKServerMain.exe
copy /Y D:\MyLife_Congos_OLAP\PowerCubes\ Cognos_mode_test.mdc D:\MyLife_Congos_OLAP\PublishCubes
exit

提示:如果模型中的维度层级内容是固定不变,可以保持每次运行类别树结构,在cogtr.exe 增加一个参数(-s)但有些维度是从核心系统引用,考虑这个参数就不能加,同时把模型类别结构删除,保存一个不完整的类别树模型,这样并不影响Cube刷新。

*******************************************************************************************
Cognos BI 8.3 Web Server存在一个Bug,安装在Windows环境偶而会出现一个 'CAM-AAA-0027'错误。
建议重启机器,或者更新到8.4以上的版本。
*******************************************************************************************

01_ StopStartCognos8.bat代码如下:
echo off
cls
net stop "Cognos 8"
net stop "Cognos Content Database"
net start "Cognos 8"
net start "Cognos Content Database"
exit


任务计划调用批处理,可以利用第三方工具,Informatica PowerCenter, DataStage等调度工具。注意一点,所有调度工具必须在Cognos同一台服务器上,目前还没有发现其他调度工具可以跨域调用操作。
windows下cube刷新bat脚本
**** Hidden Message *****
Linux下如何更新Cube配置 陆续放上!

附Command Line Options Transformer supports the following Windows and UNIX/Linux command line options. Detailed explanations are provided in the subsections that follow.Command line options are case-insensitive.
OptionMeaning
-aRuns AutoDesign then creates a cube, opens PowerPlay (Windows), and displays the report.cogtr -a data_source Restriction: Use on Windows only, with -d, -f, -r, and -nologo options.
-cGenerates categories and creates cubes.-c -pfilename.py?|-mfilename.mdl Restriction: Use with -i, -m, or -p.
-dOverrides the specified user preference setting.-dpreference_var=setting -pfilename.py?|-mfilename.mdl
-eUpdates the model structure but not the data.-e -pfilename.py?|-mfilename.mdl Restriction: Cannot be used with -c; use this option with -n and -o.
-fSpecifies the user-defined preference file.Can be used to publish PowerCubes in batch mode and include prompts in an XML command file using the XML schema for preference files.-fpreference_file -pfilename.py?|-mfilename.mdl
-iOpens the specified .py? model and restarts a failed process from the beginning.-i -pfilename.py? Restriction: On UNIX and Linux, cannot be used with -s.
-hDisplays help for the command line.cogtr-h
-kSpecifies database signon information for Series 7.-ksignon=userid/password -pfilename.py?|-mfilename.mdl
-lSpecifies user authentication information for Cognos 8.-lsignon=userid/password -pfilename.py?|-mfilename.mdl
-mOpens the specified .mdl file or accepts Model Definition Language (MDL) statements.-mfilename.mdl Restriction: On Windows, use with -n.
-nRuns cogtr in batch mode.-ndisplay_state -pfilename.py?|-mfilename.mdl Restriction: Use on Windows only.
-nologoOmits splash screen display when opening Transformer.-nologo -pfilename.py?|-mfilename.mdl Restriction: Use on Windows only.
-oTurns off various model and cube creation actions.-o -pfilename.py?|-mfilename.mdl
-oxDisables category creation and cube rebuild.-ox -pfilename.py?|-mfilename.mdl Restriction: Use on Windows only.
-pOpens the specified binary model file, .py?, where the question mark (?) is replaced by the character that is used in your version of Transformer-pfilename.py? Restriction: Not valid with an MDL file.
-rSpecifies the level of detail for error-logging reports.-rlog_level -pfilename.py?|-mfilename.mdl Restriction: Valid levels are 0, 1, 2, 3, and 4.
-sSaves the model.-s -pfilename.py?|-mfilename.mdl Restriction: On Windows, use with -n; cannot be used with -i or -p.
-tSets the current period.-tcategory_code -pfilename.py?|-mfilename.mdl Restriction: On Windows, use with -n.
-uGets the partition status for previously generated cubes.-upowercube_name -pfilename.py?|-mfilename.mdl Restriction: Cannot use this option with secured cubes. On Windows, use with -n.
-vSpecifies the number of records for the test cube.-vdata_subset_number Restriction: Use with -c, -m, or -p.
-xUpdates the column and measure scales based on the data source.-x -mfilename.mdl
-ySpecifies how Series 7 user-class security conversion is performed.·         Use -y1 to preserve both the Series 7 user classes and custom views associated with the Series 7 model.-y1namespaceName=username/password ·         Use -y2 to preserve only the custom view associated with the Series 7 model.cogtr.exe -n2 -ox -s -y2 -mfilename.mdl ·         Use -y3 to discard the Series 7 user classes and custom views associated with the Series 7 model.cogtr.exe -n2 -ox -s -y3 -mfilename.mdl


rosemanor 发表于 2014-7-23 12:50:43

有道理。。。

51管天下 发表于 2014-7-23 13:03:28

不错不错,楼主您辛苦了。。。

cochou 发表于 2014-7-23 14:01:23

必须了解下

lcm 发表于 2014-7-23 15:33:14

真是 收益 匪浅

51管天下 发表于 2014-7-23 21:58:05

小手一抖,钱钱到手!

lcm 发表于 2014-7-23 22:03:55

我是来刷分的,嘿嘿

我的名字叫白 发表于 2014-10-24 15:36:14

抓紧学习这个,资源貌似不多

2746141481 发表于 2015-11-24 09:27:14

收益 匪浅 好资源,非常的好

页: [1]
查看完整版本: 【宝典】Cognos 8.3 BI自动刷新Cube简要配置