Understanding ODI Executions Oracle Fusion Middleware Online Documentation Library

Running Integration Processes 20-7

20.4.1 Restarting a Session from ODI Studio

To restart a session from Oracle Data Integrator Studio:

1. In Operator Navigator, select the session that you want to restart.

2. Right-click and select Restart.

3. In the Choose Restart Mode dialog, select the agent you want to use for running

the new session.

4. Click OK.

When Oracle Data Integrator has restarted the session, the Session Started dialog appears.

20.4.2 Restarting a Session from a Command Line

Before restarting a session from a command line, read carefully the following requirements: ■ The command line scripts, which are required for performing the tasks described in this section, are only available if you have installed the Oracle Data Integrator Standalone Agent. See the Oracle Fusion Middleware Installation Guide for Oracle Data Integrator for information about how to install the Standalone Agent. ■ To use this command the connection to your repository must be configured in the odiparams file. See Chapter 4.3, Managing Agents for more information. ■ When restarting a session from a command line, the session is not started by default against a remote run-time agent, but is executed by a local Java process started from the command line. This process can be aborted locally, but cannot receive a session stop signal as it is not a real run-time agent. As a consequence, sessions started this way cannot be stopped remotely. If you want to start the session against a run-time agent, you must use the AGENT_ URL parameter. To restart a session from a command line: 1. Change directory to the agentbin directory of the Oracle Data Integrator installation. 2. Enter the following command to start a scenario. On UNIX systems: .restartsession.sh session_number [-AGENT_URL=remote_ agent_url] On Windows systems: restartsession.bat session_number [-AGENT_URL=remote_ agent_url] WARNING: When restarting a session, all connections and transactions to the source and target systems are re-created, and not recovered from the previous session run. As a consequence, uncommitted operations on transactions from the previous run are not applied, and data required for successfully continuing the session may not be present. 20-8 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator Table 20–3 lists the different parameters of this command, both mandatory and optional. The parameters are preceded by the - character and the possible values are preceded by the = character. You must follow the character protection syntax specific to the operating system on which you enter the command.

20.5 Stopping a Session

Any running or waiting session can be stopped. You may want to stop a session when you realize that for example your interface contains errors or when the execution takes a long time. Note that there are two ways to stop a session: ■ Normal : The session is stopped once the current task is finished. ■ Immediate : The current task is immediately interrupted and the session is stopped. This mode allows to stop long-running tasks, as for example long SQL statements before they complete. Session can be stopped in several ways: ■ Stopping a Session From ODI Studio Table 20–3 restartsess command Parameters Parameters Description session_number Number ID of the session to be restarted. -AGENT_URL=remote_ agent_url URL of the run-time agent that will restart this session. By default the session is executed by a local Java process started from the command line. Note: To use this command the connection to your repository must be configured in the odiparams file. See Section 4.3, Managing Agents for more information. Note: When restarting a session from a command line, the session is not started by default against a remote run-time agent, but is executed by a local Java process started from the command line. If you want to start the session against a run-time agent, you must use the AGENT_URL parameter. Note: The immediate stop works only with technologies and drivers that support task interruption. It is supported if the statement.cancel method is implemented in the JDBC driver. Note: Only sessions that are running within a Java EE or standalone Agent can be stopped. Sessions running in the Studio built-in Agent or started with the startscen.sh or startscen.bat script without the AGENT_URL parameter, cannot be stopped. See Section 20.3, Executing a Scenario for more information. Running Integration Processes 20-9 ■ Stopping a Session From a Command Line . ■ From ODI Console. See Section 22.2.3, Managing Scenarios and Sessions .

20.5.1 Stopping a Session From ODI Studio

To stop a session from Oracle Data Integrator Studio: 1. In Operator Navigator, select the running or waiting session to stop from the tree.

2. Right-click then select Stop Normal or Stop Immediate.

3. In the Stop Session Dialog, click OK.

The session is stopped and changed to Error status.

20.5.2 Stopping a Session From a Command Line

Before stopping a session from a command line, read carefully the following requirements: ■ The command line scripts, which are required for performing the tasks described in this section, are only available if you have installed the Oracle Data Integrator Standalone Agent. See the Oracle Fusion Middleware Installation Guide for Oracle Data Integrator for information about how to install the Standalone Agent. ■ To use this command the connection to your repository must be configured in the odiparams file. See Chapter 4.3, Managing Agents for more information. To stop a session from a command line: 1. Change directory to the agentbin directory of the Oracle Data Integrator installation. 2. Enter the following command to start a scenario. On UNIX systems: .stopsession.sh session_id [-AGENT_URL=remote_agent_url] [-STOP_LEVEL=normal default | immediate] On Windows systems: stopsession.bat session_id [-AGENT_URL=remote_agent_ url][-STOP_LEVEL=normal default | immediate] Table 20–3 lists the different parameters of this command, both mandatory and optional. The parameters are preceded by the - character and the possible values are preceded by the = character. You must follow the character protection syntax specific to the operating system on which you enter the command. Table 20–4 StopSession command Parameters Parameters Description session_id Number ID of the session to be restarted. -AGENT_URL=remote_ agent_url URL of the run-time agent that stops this session. By default the session is executed by a local Java process started from the command line. [-STOP_LEVEL=normal default | immediate] The level used to stop a running session. If it is omitted, normal will be used as the default stop level.