Saturday, October 15, 2016

ODI-1217: Session () fails with return code 0.

Error Message:
ODI-1217: Session <session name> (<Session number>) fails with return code 0.
at oracle.odi.runtime.agent.execution.SessionExecutor.closeSession(SessionExecutor.java:2693)

Whenever you start a job it fails immediately without executing it's steps.

Root Cause:
Tablespace is full.

How to confirm?

1. Connect to Database Admin (SYSDBA) where your repositories are created and execute Following Query:

SELECT a.file_name,
       substr(A.tablespace_name,1,20) tablespace_name,
       trunc(decode(A.autoextensible,'YES',A.MAXSIZE-A.bytes+b.free,'NO',b.free)/1024/1024) free_mb,
       trunc(a.bytes/1024/1024) allocated_mb,
       trunc(A.MAXSIZE/1024/1024) capacity,
       a.autoextensible ae
FROM (
     SELECT file_id, file_name,
            tablespace_name,
            autoextensible,
            bytes,
            decode(autoextensible,'YES',maxbytes,bytes) maxsize
     FROM   dba_data_files
     GROUP BY file_id, file_name,
              tablespace_name,
              autoextensible,
              bytes,
              decode(autoextensible,'YES',maxbytes,bytes)
     ) a,
     (SELECT file_id,
             tablespace_name,
             sum(bytes) free
      FROM   dba_free_space
      GROUP BY file_id,
               tablespace_name
      ) b
WHERE a.file_id=b.file_id(+)
AND A.tablespace_name=b.tablespace_name(+)
and a.tablespace_name in ('<work repo tablespace name>','<work repo tablespace name>')

ORDER BY A.tablespace_name ASC;

Note: If you don't know your tablespace name then execute following query:

SELECT
  ts.tablespace_name,
  TO_CHAR(SUM(NVL(fs.bytes,0))/1024/1024, '99,999,990.99') AS MB_FREE
FROM
  dba_free_space fs,
  dba_tablespaces ts,
  dba_users us
WHERE
  fs.tablespace_name(+)   = ts.tablespace_name
AND ts.tablespace_name(+) = us.default_tablespace
and us.username in ('<work repo name>','<master repo name>')
GROUP BY
  ts.tablespace_name;

Solution:
Increase tablespace will resolve the issue.

6 comments:

  1. Thank you, but I don't understand what the master and work repository have to do with the session execution. Does ODI write in the repository when executing? logging the session, etc.?

    ReplyDelete
  2. I'm quite sure my case is not this as the master and work repository have around 100Mb of free space; in case someone finds the same error, I'd say it's one of the possible reasons but not the only one.
    But I imagine this is the most common reason.

    ReplyDelete
  3. I have the same issue but the solution dosn't work for me :(

    ReplyDelete
    Replies
    1. I am getting the same error, Table space increase didn't work for me as well.

      Delete