Learning ODI – Start Scheduler Agent

on

对于设置ODI的定时执行场景,需要启动Scheduler Agent,在一个新的ODI安装完毕之后,默认的odiparams.bat文件中设置的是连接DEMO环境的数据库连接配置,如果我们在自己的数据库里创建了Master Repository和Work Repository,那么需要修改连接参数。

在我的测试环境中,我使用的是自己机器上Oracle 11g数据库,实例名是orcl11g,则需要做如下修改:

set ODI_SECU_DRIVER=oracle.jdbc.driver.OracleDriver
set ODI_SECU_URL=jdbc:oracle:thin:@localhost:1521:orcl11g
set ODI_SECU_USER=snpm
set ODI_SECU_ENCODED_PASS=b9yX4CpBkdmaP8Y3mYbaoye2p
set ODI_SECU_WORK_REP=WORKREP1
set ODI_USER=SUPERVISOR
set ODI_ENCODED_PASS=hZypfAZQf.Yo8VWVI6HZzc 

其中:
ODI_SECU_USER需要设置为创建Master Repository时候的用户名,在这里是snpm。
ODI_SECU_ENCODED_PASS需要用agent实用程序加密一下,用法是agent encode %PASSWORD%。
ODI_SECU_WORK_REP设置为创建Work Repository时候起的名字。
ODI_USER默认是SUPERVISOR,这是连接ODI的用户名。
ODI_ENCODED_PASS默认是SUNOPSIS,也需要用agent encode加密之后的值。

设置完毕,启动Scheduler Agent,会遇到下面的错误:

java.lang.Exception: Agent is not declared in Topology Manager

我们还需要在Topology Manager -> Physical Architecture -> Agents里面创建一个Agent,填写Agent的名字,监听的机器,端口。如果需要设置Schedule,还需要在Topology Manager -> Logical Architecture -> Agents里面再创建一个Agent,将刚才创建的Physical Agent和此Logical Agent绑定在一起。

然后,在Designer -> Projects -> Scenarios -> Scheduling中创建一个执行计划,之后再次启动Scheduler Agent就OK了。

C:\OraODI\oracledi\bin>agentscheduler "-port=20910" "-NAME=myFirstAgent"
A JDK is required to execute Web Services with OracleDI. You are currently using a JRE.
OracleDI: Starting Scheduler Agent ...
Starting Oracle Data Integrator Agent...
Version : 10.1.3.4.0 - 30/10/2007
Agent in scheduling mode
Number of items for scheduled executions:0
08/17/2008 02:58:09 PM(main): Server Launched
Aug 17, 2008 3:06:27 PM com.sunopsis.j.s a
INFO: Start Thread[1001@2008/08/17_03:06:27:000,5,main] @ Aug 17, 2008 3:06:27 PM

最后一行显示了在Schedule中定义的计划被执行成功。

在Windows操作系统中可以把Agent程序设置为Service,通过以下命令设置,其中倒数两个参数分别为Physical Agent Name和Agent Port:

agentservice.bat -i -s myFirstAgent 20910

运行成功之后,将会产生OracleDI Agent Scheduler myFirstAgent这样命名的Windows服务。

通过以下命令可以删除创建的服务:

agentservice.bat -r -s myFirstAgent

13 Comments Add yours

  1. casoul says:

    你是怎么知道set ODI_SECU_ENCODED_PASS=b9yX4CpBkdmaP8Y3mYbaoye2p值的

  2. kamus says:

    文章里面说了。
    ODI_SECU_ENCODED_PASS需要用agent实用程序加密一下,用法是agent encode %PASSWORD%。
    也就是如果你设置的密码是“password1”,那么你不能把明文存储在配置文件中,需要先运行一下:
    agent encode password1
    会返回一大串字符,这串字符是加密过的“password1”,把这串字符当成ODI_SECU_ENCODED_PASS参数的值就可以了。

  3. 荣辉 says:

    你好
    我用你的方法来启动代理,遇到了这样的问题,我的是10g的数据库。实例名称suse01

    set ODI_SECU_DRIVER=oracle.jdbc.driver.OracleDriver
    set ODI_SECU_URL=jdbc:oracle:thin:@155.20.16.16:1521:suse01
    set ODI_SECU_USER=odim
    set ODI_SECU_ENCODED_PASS=aIyXhDMdgoqGjv0LAGtf
    set ODI_SECU_WORK_REP=conn to work
    set ODI_USER=SUPERVISOR
    set ODI_ENCODED_PASS=f8yaev,4rj5zi92uF5wV2ZTKy

    运行启动后会碰到几个个问题
    1,没有指定驱动程序
    2,用户名和密码错误

    请高手指点
    E:\OraHome_2\oracledi\bin>agentscheduler “-port=20910” “-NAME=agent”
    A JDK is required to execute Web Services with OracleDI. You are currently using
    a JRE.
    OracleDI: Starting Scheduler Agent …
    正在启动 Oracle Data Integrator Agent…
    Version : 10.1.3.4.0 – 30/10/2007
    com.sunopsis.tools.core.exception.SnpsRuntimeException: java.sql.SQLException: O
    RA-01017: invalid username/password; logon denied

    at com.sunopsis.dwg.cmd.n.a(n.java)
    at com.sunopsis.j.f.run(f.java)
    at com.sunopsis.dwg.cmd.i.y(i.java)
    at com.sunopsis.dwg.cmd.i.run(i.java)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.sql.SQLException: ORA-01017: invalid username/password; logon de
    nied

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
    :111)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:277)
    at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthentica
    te.java:784)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:361)
    at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:
    413)
    at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:164)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
    n.java:34)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
    at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
    at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
    at com.sunopsis.sql.i.run(i.java)
    Caused by:
    java.sql.SQLException: ORA-01017: invalid username/password; logon denied

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
    :111)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:277)
    at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthentica
    te.java:784)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:361)
    at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:
    413)
    at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:164)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio
    n.java:34)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
    at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
    at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
    at com.sunopsis.sql.i.run(i.java)

  4. kamus says:

    A JDK is required to execute Web Services with OracleDI. You are currently using a JRE.
    这个报警提示是正常的,可以忽略。

    你出现的错误就是:ORA-01017: invalid username/password; logon denied
    说你用户名密码不对,那肯定是不对了。。。
    比如加密的密码copy错了,用户名写错了等等。

    注意到你:ODI_SECU_WORK_REP=conn to work
    为什么要有空格呢?我不确认ODI支持repository的名字有空格,一般常识来说,有空格的名字都是强烈不推荐使用的。

  5. 荣辉 says:

    kamus.谢谢了代理了的问题解决了
    现在的遇到一个如何进行自动执行的问题。
    我在方案里设置了计划,使用了代理,可是到了预订时间却没有自动执行,能否给个邮箱地址,我给你发封邮件,有空你帮我指导指导

  6. kamus says:

    在about me里面有我的邮件地址。
    如果执行,在Operator里面应该可以看到记录,或者说执行了,但是有错误,也可以看到。

  7. jbas says:

    你好,我用oracle10g ,linux下启动agent,但报如下错误,请帮一下:
    谢谢!

    正在启动 Oracle Data Integrator Agent…
    Version : 10.1.3.2.0 – 03/01/2007
    com.sunopsis.tools.core.exception.g: java.sql.SQLException: No suitable driver
    at com.sunopsis.dwg.cmd.n.a(n.java)
    at com.sunopsis.c.f.run(f.java)
    at com.sunopsis.dwg.cmd.i.y(i.java)
    at com.sunopsis.dwg.cmd.i.run(i.java)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:264)
    at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
    at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
    at com.sunopsis.sql.h.run(h.java)
    Caused by:
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:264)
    at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
    at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
    at com.sunopsis.sql.h.run(h.java)

  8. GUTTI.S says:

    Hi

    Can I have english version of these articles?

    Rgds,
    gutti.s

  9. blyin says:

    我使用agentservice.bat -i -s agent_test发布为系统服务时,因jdk安装在C:\Program Files目录中,提示:FATAL | wrapper | The argument ‘Files\Java\jdk1.5.0_05\bin\java.exe’ is not a
    valid property name-value pair. 除了重新安装jkd,还有其他方法解决因jkd路径中有空格发布不成功的方法吗?

  10. sunny says:

    编辑好odiparams.bat文件,启动Scheduler Agent,遇到下面的错误:

    OracleDI: Starting Scheduler Agent …
    java.lang.IndexOutOfBoundsException: toIndex = 63
    at java.util.SubList.(AbstractList.java:602)
    at java.util.RandomAccessSubList.(AbstractList.java:758)
    at java.util.RandomAccessSubList.subList(AbstractList.java:762)
    at com.sunopsis.g.a.g.a(g.java)
    at com.sunopsis.g.a.f.b(f.java)
    at com.sunopsis.tools.core.SnpsStringTools.a(SnpsStringTools.java)
    at com.sunopsis.dwg.DwgObject.snpsDecypher(DwgObject.java)
    at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
    at oracle.odi.Agent.main(Agent.java)

    怎么回事呢?

  11. liuzd661 says:

    非常感谢,已成功配置

  12. zhangyc says:

    编辑好odiparams.bat文件,启动Scheduler Agent,遇到下面的错误:
    D:\ODI\oracle\oracledi\oracledi\bin>agentscheduler “-port=20910” “-name=agent_te
    st” “-v=5” agentservice.bat -i-s agent_test_log20910
    OracleDI: Starting Scheduler Agent …
    com.sunopsis.sql.c: oracle.jdbc.driver.OracleDriver
    at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
    at com.sunopsis.sql.SnpsConnection.connect(SnpsConnection.java)
    at com.sunopsis.dwg.cmd.e.h(e.java)
    at com.sunopsis.dwg.cmd.e.g(e.java)
    at com.sunopsis.dwg.cmd.e.y(e.java)
    at com.sunopsis.dwg.DwgJv.treatCmd(DwgJv.java)
    at com.sunopsis.dwg.DwgJv.main(DwgJv.java)
    at oracle.odi.Agent.main(Agent.java)

  13. michael says:

    please,

    what sugestioenes for problem error >>
    >>

    com.sunopsis.dwg.cmd.c: Error during Scenario launching

    at com.sunopsis.dwg.dbobj.SnpScen.a(SnpScen.java)

    at com.sunopsis.dwg.dbobj.SnpScen.remoteExecute(SnpScen.java)

    at com.sunopsis.dwg.dbobj.SnpScen.remoteExecute(SnpScen.java)

    at com.sunopsis.graphical.u.ot.m(ot.java)

    at com.sunopsis.graphical.frame.b.kb.h(kb.java)

    at com.sunopsis.graphical.frame.b.kb.g(kb.java)

    at com.sunopsis.graphical.frame.b.kb.a(kb.java)

    at com.sunopsis.graphical.frame.b.fx.actionPerformed(fx.java)

    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)

    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

    at java.awt.Component.processMouseEvent(Unknown Source)

    at java.awt.Component.processEvent(Unknown Source)

    at java.awt.Container.processEvent(Unknown Source)

    at java.awt.Component.dispatchEventImpl(Unknown Source)

    at java.awt.Container.dispatchEventImpl(Unknown Source)

    at java.awt.Component.dispatchEvent(Unknown Source)

    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

    at java.awt.Container.dispatchEventImpl(Unknown Source)

    at java.awt.Window.dispatchEventImpl(Unknown Source)

    at java.awt.Component.dispatchEvent(Unknown Source)

    at java.awt.EventQueue.dispatchEvent(Unknown Source)

    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    at java.awt.EventDispatchThread.run(Unknown Source)

    <<<<

    gratefulll

Leave a Reply

Your email address will not be published. Required fields are marked *