martes, 12 de diciembre de 2017

Configurar local odi agent como servicio de windows

Running ODI 11gR1 Standalone Agent as a Windows Service

ODI 11gR1 introduces the capability to use OPMN to start and protect agent processes as services. Setting up the OPMN agent is covered in the following post and extensively in the ODI Installation Guide.
Unfortunately, OPMN is not installed along with ODI, and ODI 10g users who are really at ease with the old Java Wrapper are a little bit puzzled by OPMN, and ask: "How can I simply set up the agent as a service?".
Well... although the Tanuki Service Wrapper is no longer available for free, and the agentservice.bat script lost, you can switch to another service wrapper for the same result. For example, Yet Another Java Service Wrapper (YAJSW) is a good candidate.
To configure a standalone agent with YAJSW:
  1. download YAJSW
  2. Uncompress the zip to a folder (called %YAJSW% in this example)
  3. Configure, start and test your standalone agent.


    Make sure that this agent is loaded with all the required libraries and drivers, as the service will not load dynamically the drivers added subsequently in the /drivers directory.
  4. Retrieve the PID of the agent process:

    1. Open Task Manager.
    2. Select View > Select Columns
    3. Select the PID (Process Identifier) column, then click OK
    4. In the list of processes, find the java.exe process corresponding to your agent, and note its PID.


  5. Open a command line prompt in %YAJSW%/bat and run: genConfig.bat


    This command generates a wrapper configuration file for the agent. This file is called %YAJSW%/conf/wrapper.conf.
  6. Stop your agent.
  7. Edit the wrapper.conf file and modify the configuration of your service. For example, modify the display name and description of the service as shown in the example below.



    Important: Make sure to escape the commas in the ODI encoded passwords with a backslash! In the example below, the ODI_SUPERVISOR_ENCODED_PASS contained a comma character which had to be prefixed with a backslash.

      # Title to use when running as a console
      
      wrapper.console.title=\"AGENT\"
      
      #********************************************************************
      
      # Wrapper Windows Service and Posix Daemon Properties
      
      #********************************************************************
      
      # Name of the service
      
      wrapper.ntservice.name=AGENT_113
      
      # Display name of the service
      
      wrapper.ntservice.displayname=ODI Agent
      
      # Description of the service
      
      wrapper.ntservice.description=Oracle Data Integrator Agent 11gR3 (11.1.1.3.0)
      
      ...      
      
      # Escape the comma in the password with a backslash.
      
      wrapper.app.parameter.7 = -ODI_SUPERVISOR_ENCODED_PASS=fJya.vR5kvNcu9TtV\,jVZEt


  8. Execute your wrapped agent as console by calling in the command line prompt: runConsole.bat
  9. Check that your agent is running, and test it again.
    This command starts the agent with the configuration but does not install it yet as a service.
  10. To Install the agent as service call installService.bat
  11. From that point, you can view, start and stop the agent via the windows services.

No hay comentarios:

Publicar un comentario