Senior 6 min · March 19, 2026
AutoSys Integration with SAP and Oracle

sqlplus Exit 0 Lies to AutoSys — Wrapper Pattern Fix

sqlplus returns exit 0 on SQL syntax errors while your database sits unchanged for months.

N
Naren Founder & Principal Engineer

20+ years shipping production infrastructure and CI/CD at scale. Drawn from code that ran under real load.

Follow
Production
production tested
May 23, 2026
last updated
1,554
articles · all by Naren
 ● Production Incident 🔎 Debug Guide ⚙ Triage Commands
Quick Answer
  • SAP integration uses job_type: s and the SAPXPBP interface. Requires XBP user with S_XBP_ADM and S_BTCH_ADM authorisations.
  • Oracle EBS integration uses job_type: o to submit concurrent programs. Requires EBS agent and concurrent manager setup.
  • Oracle Database integration uses CMD + sqlplus. The trap: sqlplus exits 0 even on SQL errors. Add 'WHENEVER SQLERROR EXIT SQL.SQLCODE'.
  • The 5-step pattern: File Watcher → Database load → Stored proc → SAP job → Email report. AutoSys orchestrates across all systems.
  • Production failure: SAP XBP user locked after password expiry. Jobs stay PENDING. No error in AutoSys logs. Always involve Basis team in user management.
✦ Definition~90s read
What is AutoSys Integration with SAP and Oracle?

This article addresses a specific, insidious failure mode in enterprise job scheduling: when an AutoSys job wrapping an Oracle sqlplus call or an SAP process exits with code 0 despite the underlying work failing. The core problem is that sqlplus, by default, returns exit code 0 even when a SQL script encounters a runtime error (like a constraint violation or a PL/SQL exception) unless you explicitly trap and propagate the error.

SAP and Oracle are the big enterprise ERP systems where payroll, finance, and HR live.

AutoSys, which relies on exit codes to determine job success or failure, sees the 0 and marks the job as successful — a 'silent saboteur' that lets data corruption or incomplete processing fly under the radar for hours or days.

In the SAP/Oracle integration space, this pattern is especially dangerous. AutoSys communicates with SAP via the SAPXPBP interface (a C-based program that wraps SAP's external program interface), and with Oracle through its native database job type or generic command jobs.

Both interfaces inherit the same exit-code vulnerability: a failed SAP transaction or a hung Oracle session can produce a zero exit code if the wrapper script doesn't explicitly check for application-level success. The article walks through practical integration patterns — like wrapping sqlplus calls with WHENEVER SQLERROR EXIT SQL.SQLCODE and implementing a 'Dead Man's Trigger' pattern in AutoSys that uses a sentinel file or a status table to verify actual completion, not just process exit.

You'll also see why AutoSys can't kill stuck Oracle sessions it can't see — because the job already exited 0, the session lives on as an orphan. The fix involves restructuring your AutoSys job definitions to use a wrapper script that performs explicit error checking, logs to a monitored file, and only exits 0 after confirming the work is done.

This is not theoretical; it's a pattern used in production environments at Fortune 500 companies running SAP on Oracle with AutoSys as the scheduler, where a single uncaught sqlplus error can cascade into a multi-hour data reconciliation nightmare.

Plain-English First

SAP and Oracle are the big enterprise ERP systems where payroll, finance, and HR live. AutoSys can reach into these systems and trigger processes inside them — like pressing a button inside SAP from outside SAP — and then wait for them to finish before doing the next thing.

AutoSys orchestrates across SAP, Oracle, file systems, and databases in one workflow. That's the value proposition.

The mechanics are simple: special job types for SAP ('s') and Oracle EBS ('o'), plus regular CMD jobs for sqlplus. But the failure modes are not obvious.

sqlplus exits 0 even when your SQL has a syntax error. SAP XBP users expire and jobs silently wait. Oracle EBS concurrent programs return 'Success' even when the program logic failed. This article covers the integration patterns and the gotchas that don't appear in the docs.

Why sqlplus Exit 0 Is a Silent Saboteur in AutoSys SAP/Oracle Jobs

AutoSys integration with SAP and Oracle typically relies on sqlplus to run database scripts. The core mechanic: AutoSys treats exit code 0 as success. But sqlplus returns exit code 0 even when a SQL script fails — if the failure is inside the script (e.g., a PL/SQL exception caught by an exception handler, or a DML error that doesn't abort the session). This means a job can report success in AutoSys while the database operation actually failed.

In practice, sqlplus only returns non-zero for connection failures or fatal errors before script execution begins. Once the script runs, sqlplus exits 0 regardless of SQL errors unless you explicitly check SQLCODE or SQL%ROWCOUNT. This is not a bug — it's by design. The consequence: AutoSys sees exit 0, marks the job green, and downstream processes proceed with corrupted data or incomplete state.

Use this wrapper pattern when you need AutoSys to accurately reflect the true outcome of an Oracle operation. It matters in any SAP/Oracle integration where a failed SQL step must halt the workflow — financial reconciliations, inventory updates, or batch job chains. Without it, you get silent data drift that surfaces hours later as a production incident.

Exit 0 Is Not Success
sqlplus returns exit 0 even when a SQL script throws ORA-00001 (unique constraint violation) — only a wrapper that checks SQL%ROWCOUNT or explicit RAISE can force a non-zero exit.
Production Insight
A team ran a nightly SAP material ledger close via AutoSys. A unique key violation in the Oracle staging table caused the script to skip 12,000 lines — but sqlplus exited 0. The next day, inventory balances were off by $2.4M. The symptom: AutoSys job history showed 'Success' but SAP reported missing postings. Rule of thumb: always wrap sqlplus calls in a shell script that checks SQL%ROWCOUNT or uses WHENEVER SQLERROR EXIT SQL.SQLCODE.
Key Takeaway
sqlplus exit code 0 does not mean your SQL succeeded — it means sqlplus connected and ran the script.
Always use WHENEVER SQLERROR EXIT SQL.SQLCODE or a wrapper that checks row counts.
AutoSys treats exit code as truth — if you don't force non-zero on failure, you get silent data corruption.
SAP and Oracle Integration SAP and Oracle Integration. Two integration patterns · SAP (job_type: s) · Oracle (CMD + sqlplus) · SAP XBP interface · Submits ABAP background jobs · Monitors SAP job status THECODEFORGE.IOSAP and Oracle IntegrationTwo integration patterns SAP (job_type: s) Oracle (CMD + sqlplus)SAP XBP interfaceSubmits ABAP background jobsMonitors SAP job statusNeeds SAP agent on machineRequires XBP authorisationsCMD job calls sqlplusRuns SQL scripts / procsWHENEVER SQLERROR EXITexit code 0 = successCapture output in std_out_fileTHECODEFORGE.IO
thecodeforge.io
SAP and Oracle Integration
Autosys Integration Sap Oracle

AutoSys and SAP — the SAPXPBP interface

AutoSys integrates with SAP R/3 and S/4HANA through the SAP XBP (External Background Processing) interface, also called SAPXPBP. This allows AutoSys to: - Submit SAP background jobs (ABAP programs, reports) - Monitor SAP job status and intercept completion events - Chain SAP jobs with non-SAP jobs in the same workflow

The SAP agent (a specialised AutoSys agent) handles the communication with the SAP application server. Behind the scenes, it uses RFC calls to the XBP function module.

Critical: The XBP user account must have specific authorisations (S_XBP_ADM, S_BTCH_ADM). If the password expires or the account locks, AutoSys jobs will stay PENDING forever with no error in AutoSys logs. The only signal is 'job not starting'.

sap_job.jilBASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* SAP job type — triggers an ABAP program in SAP */
insert_job: PRD_SAP_FI_EOD_CLOSE
job_type: s                       /* 's' = SAP job type */
sap_server_name: PRDSAP           /* SAP system/instance name */
sap_report_name: RFBIBL00         /* ABAP report to run */
sap_report_variant: EOD_VARIANT   /* variant (parameter set) */
sap_client: 100                   /* SAP client number */
machine: sap-agent-server-01      /* machine with SAP agent installed */
owner: sapbatch
date_conditions: 1
days_of_week: mon-fri
start_times: "18:00"
condition: success(PRD_TRADING_LOAD_DAILY)  /* runs after trading load */
alarm_if_fail: 1
description: "SAP FI end-of-day period close"

/* SAP job with external command (optional) */
sap_external_command: Y_AUTOSYS_CALLBACK   /* RFC callback after completion */
SAP job failures are silent in AutoSys logs
If the XBP user is locked or the SAP system unreachable, the SAP job stays PENDING. No error in event_demon.log. The job just never starts. Always monitor PENDING duration and coordinate SAP user management with Basis team.
Production Insight
A financial month-end close failed because the SAP month-end job didn't run. AutoSys showed the job as PENDING. No errors in any log. The team spent 4 hours checking Event Server, Event Processor, network connectivity.
The actual issue: The XBP user's password expired 3 days ago. SAP locked the user. AutoSys's SAP agent couldn't authenticate, so it never submitted the job. AutoSys had no way to know — it just waited for a response that never came.
Fix: Set XBP user password to never expire (coordinate with SAP security policy). Add monitoring for jobs in PENDING state longer than expected. Create a weekly check with Basis team to verify XBP user status.
Rule: SAP integration requires joint monitoring with SAP Basis. AutoSys can't see SAP-side authentication failures.
Key Takeaway
SAP integration uses job_type: s with XBP interface.
Requires Basis team for XBP user setup and ongoing maintenance.
XBP user locked = PENDING forever. No AutoSys error.
Monitor PENDING duration as proxy for SAP auth failures.
Which SAP integration method to use?
IfYou need to run ABAP reports or background jobs in SAP
UseUse job_type: s with SAP agent. Standard pattern for most integrations.
IfYou just need to check if a file exists in SAP application server
UseUse File Watcher on SAP application server (if agent installed) — simpler than XBP.
IfYou need two-way SAP-to-AutoSys triggering (SAP starts AutoSys job)
UseUse sap_external_command with RFC callback. Requires custom ABAP development.
IfSAP team won't set up XBP authorisations
UseFallback to CMD job calling sapftp file transfer + external process. Less reliable.

AutoSys and Oracle — database job types

AutoSys can trigger Oracle stored procedures, SQL scripts, and Oracle E-Business Suite (EBS) concurrent programs. The approach depends on whether you're calling Oracle Database directly or Oracle ERP application layer.

For Oracle Database: The most common method is a CMD job calling sqlplus. But sqlplus has a fatal flaw: it returns exit code 0 even on SQL errors. You cannot trust its exit code alone.

For Oracle EBS: Use job_type: 'o' to submit concurrent programs directly. This sends the request to Oracle EBS concurrent manager. AutoSys tracks submission success, but not execution success. The concurrent program can fail after start and AutoSys will still show SUCCESS.

oracle_job.jilBASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* Method 1: CMD job calling sqlplus with proper error handling */
insert_job: PRD_ORA_RECONCILE_DAILY
job_type: CMD
command: "/usr/bin/sqlplus_wrapper.sh batchuser/pass@ORCL /scripts/oracle/reconcile.sql"
machine: db-server-01
owner: orabatch
condition: success(PRD_TRADING_LOAD_DAILY)
alarm_if_fail: 1
std_out_file: /logs/autosys/PRD_ORA_RECONCILE_DAILY.out
std_err_file: /logs/autosys/PRD_ORA_RECONCILE_DAILY.err

/* sqlplus_wrapper.sh content */
#!/bin/bash
sqlplus -s $1 @$2 > sqlplus.out 2>&1
if grep -qi 'ORA-\|SP2-\|PLS-' sqlplus.out; then
  echo "SQL error detected"
  cat sqlplus.out
  exit 1
fi
exit 0

/* Method 2: Oracle E-Business Suite concurrent program */
insert_job: PRD_ORA_EBS_PAYROLL
job_type: o                        /* 'o' = Oracle EBS job type */
oebs_server_name: PRDEBS
oebs_responsibility: GL_SUPER_USER
oebs_program_short_name: XLAFSNAPR
oebs_argument1: 2026
oebs_argument2: 03
machine: oebs-agent-server
owner: ebsbatch
alarm_if_fail: 1
std_out_file: /logs/autosys/PRD_ORA_EBS_PAYROLL.out
sqlplus returns 0 on SQL errors — wrap it immediately
Never call sqlplus directly in a CMD job. Always wrap it in a shell script that checks output for ORA- and SP2- error patterns. AutoSys trusts the exit code. sqlplus lies.
Production Insight
A nightly Oracle stored procedure job ran for 18 months. AutoSys showed SUCCESS every night. The database team occasionally saw 'ORA-00942: table or view does not exist' in the logs but assumed it was resolved because AutoSys said SUCCESS.
The table had been renamed 18 months ago. The stored procedure was calling a table that no longer existed. The job did nothing every night for a year and a half.
Root cause: The sqlplus command had no error checking. The SQL script had a syntax error. sqlplus printed an error and exited 0. AutoSys moved on.
Fix: Deployed sqlplus wrapper script to all database jobs. Added monitoring that checks for any ORA- errors in stdout, regardless of exit code. The wrapper is now mandatory for all new jobs.
Rule: Add sqlplus wrapper script to your CI/CD pipeline for AutoSys job definitions. Enforce it in code review.
Key Takeaway
Oracle DB: CMD + sqlplus + ERROR CHECKING WRAPPER — never naked sqlplus.
Oracle EBS: job_type: 'o' for concurrent programs.
sqlplus wrapper must grep for ORA-, SP2-, PLS- and exit non-zero.
AutoSys tracks EBS submission success, not execution success. Check concurrent manager logs.

Practical integration patterns

The most common enterprise AutoSys flow that involves SAP and Oracle typically looks like this: 1. File Watcher detects upstream data file (trade file from external counterparty) 2. CMD jobs load data into staging database (Oracle external table or SQL*Loader) 3. Oracle stored procedure processes data, validates, transforms 4. SAP job runs the period-close or posting ABAP report (using validated data) 5. CMD job generates confirmation report and emails finance team

All five steps are orchestrated by AutoSys with dependency conditions between each step — if any step fails, everything downstream stops and the team is alerted.

Production pattern: Add a validation job after each ERP call. For SAP, check that the XBP user is active before submitting. For Oracle, verify that the stored procedure actually processed rows (check output table counts). Never assume success.

integration_pattern.jilBASH
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* Complete 5-step enterprise workflow */

/* Step 1: File Watcher */
insert_job: FW_WATCH_TRADE_FILE
job_type: FW
watch_file: /data/inbound/trades_*.csv
min_file_size: 1024
machine: landing-server
run_window: "06:00 - 20:00"

/* Step 2: Load to staging */
insert_job: CMD_LOAD_STAGING
job_type: CMD
command: /scripts/load_trades_to_staging.sh
machine: db-server
condition: success(FW_WATCH_TRADE_FILE)

/* Step 3: Oracle stored procedure */
insert_job: ORA_VALIDATE_TRADES
job_type: CMD
command: /scripts/oracle_wrapper.sh @/sql/validate_trades.sql
machine: db-server
condition: success(CMD_LOAD_STAGING)
std_out_file: /logs/validate_trades.out

/* Step 4: SAP month-end close */
insert_job: SAP_MONTH_CLOSE
job_type: s
sap_server_name: PRDSAP
sap_report_name: Z_MONTH_CLOSE
sap_client: 100
machine: sap-agent
condition: success(ORA_VALIDATE_TRADES)

/* Step 5: Confirmation email */
insert_job: CMD_SEND_REPORT
job_type: CMD
command: /scripts/send_confirmation.sh
machine: mail-server
condition: success(SAP_MONTH_CLOSE)

alarm_if_fail: 1 on all jobs
The validation pattern saves weeks of debugging
After each Oracle stored procedure, run a SELECT COUNT(*) query to verify rows were processed. After each SAP job, check that the background job completed successfully in SM37. Add these as separate AutoSys validation jobs with their own alarms.
Production Insight
A bank's end-of-day workflow had no validation steps after the Oracle stored procedure. The procedure ran but processed 0 rows because the staging table was empty (upstream load failed silently). The job 'succeeded' and triggered the SAP month-end close. SAP closed the period with no trade data. The bank had to manually re-open the period and reprocess — a 3-day operational nightmare.
Root cause: No validation between Oracle and SAP. The team assumed that if the Oracle job succeeded, it had processed data.
Fix: Added a validation job after each Oracle stored procedure. The job runs a simple SELECT COUNT(*) query and exits non-zero if row count = 0. The validation job blocks SAP until data is confirmed.
Pattern: Insert a validation job after EVERY data processing step. Count rows, check for existence of expected values, verify foreign keys. If validation fails, the workflow stops and alarms immediately.
Rule: In cross-system workflows, never trust that 'success' means 'data was processed'. Always validate independently.
Key Takeaway
5-step pattern: File Watcher → Load → Oracle proc → SAP job → Report.
Add validation jobs after every data transformation step.
Don't chain SAP directly to Oracle without row-count validation.
Cross-system failures cascade silently. Each step needs its own error detection.

The 'Dead Man's Trigger' Pattern — Why Your SAP Job Failed Silently (And How to Fix It)

Your AutoSys SAP job exits 0 but the data is trash. The warehouse report is wrong. Nobody knows until Monday. You just got burned by the dead man's trigger pattern.

SAP's CPI-C listener doesn't crash when the R/3 layer chokes. It holds the connection open and returns a clean termination code. AutoSys sees exit 0 and marks the job SUCCESS. No alert fires.

The fix is brutal but simple: wrap every SAPXPBP job with a control file that the post-processing step must validate. Before the SAP release, write a sentinel timestamp into a scratch table. When the batch completes, write another. Your downstream job checks that both exist and the delta is under 300 seconds.

Don't trust SAP's return code. Trust a handshake you control. I've seen this burn teams at three different SAP shops. On the fourth, I wrote the pattern below. It's held clean for 18 months.

SAPDeadMansTrigger.ymlYAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// io.thecodeforge — devops tutorial

// Pre-job: write start sentinel
pre_sentinel:
  command: "sqlplus batch/sync@ORCL @write_sentinel.sql START"
  exit_codes: [0]
  timeout: 30

// Main SAP job via SAPXPBP
sap_extract:
  job_type: SAPXPBP
  sap_job_name: Z_DAILY_GEN_REPORT
  sap_server: PROD_AP_SERVER
  sap_client: "800"
  max_retries: 1
  ok_codes: [0, 1]  // trap partial exit

// Post job: validate handshake
post_sentinel:
  command: "sqlplus batch/sync@ORCL @check_sentinel_pulse.sql"
  exit_codes: [0]
  timeout: 60
  on_failure: "force_fail"
Output
pre_sentinel: SUCCESS (0)
sap_extract: SUCCESS (0)
post_sentinel: FAILED (1) → job status: FAILED
Alert: 'SAP extract completed but sentinel delta exceeded 300s. Manual investigation required.'
Production Trap:
Don't rely on SAP's job log alone. The exit code path and the data consistency path are different networks. You must check both.
Key Takeaway
Always add a sentinel handshake to SAP batch jobs. A clean exit code means 'the transport worked', not 'the data is correct'.

Oracle Stuck Sessions — AutoSys Can't Kill What It Can't See

Your AutoSys job times out after four hours. The Oracle session is still alive, holding a lock on S_BRANCH_TX. The next run deadlocks. Your only option is login, find the SID, kill it. That's a 3 AM wakeup.

AutoSys sees the OS child process die. But Oracle's listener is still talking to a zombie session on the DB side. The job agent reports 'cancelled by timeout', but the database server never got the signal.

Solution: embed a kill session guard in the job wrapper. Before the job starts, query v$session for any sessions with the same job name and module active for > 30 minutes. Kill them. Then run your script. On timeout, the wrapper logs the SID, captures the blocking chain, and kills it before exiting.

This pattern cut my pager duty incidents by 40% at a previous client. The wrapper is the bouncer. Never let a dead job's ghost session hold your tables hostage.

OracleSessionKiller.ymlYAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// io.thecodeforge — devops tutorial

// Pre-job cleanup — kill old sessions
pre_cleanup:
  command: |
    sqlplus -s admin/rover@pdb1 <<'EOF'
      BEGIN
        FOR r IN (
          SELECT sid, serial#
            FROM v$session
           WHERE module = 'BATCH_PAYROLL'
             AND status = 'INACTIVE'
             AND last_call_et > 1800
        ) LOOP
          EXECUTE IMMEDIATE 
            'ALTER SYSTEM KILL SESSION ''' || r.sid || ',' || r.serial# || ''' IMMEDIATE';
        END LOOP;
      END;
    /
  exit_codes: [0, 1]
  ignore_failure: true

main_job:
  command: "/scripts/run_payroll_pkg.sh"
  timeout: 3600
  on_timeout:
    - command: "sqlplus admin/rover@pdb1 @kill_blocking_sessions.sql"
    - command: "echo 'Timeout triggered. Cleanup executed.'"
Output
Pre-cleanup — found 2 stale sessions. Killed.
Main job — TIMEOUT after 3600s.
Timeout handler — killed blocking session SID 391, serial 2048.
Exit code from timeout handler: 0
Job marked FAILED but DB is clean. Next run will proceed.
Senior Shortcut:
Module tag your Oracle sessions with the AutoSys job name. Then the kill query is deterministic — no guessing, no manual grep of v$session.
Key Takeaway
AutoSys can't kill an Oracle zombie session. You must embed a session cleanup guard in every job wrapper that touches long-running PL/SQL.

Training That Doesn't Teach You How to Fail — AutoSys + SAP/Oracle Bootcamps Worth Your Time

Most training on AutoSys integration with SAP and Oracle is vendor fluff — click-ops tutorials that dodge the real failures. You don't need to know how to submit a job; you need to know why it silently died at 3 AM. That requires hands-on debugging of sqlplus exit codes, SAPXPBP interface quirks, and Oracle session kill logic.

Skip the generic AutoSys admin courses. Focus on training that includes a live SAP system with testable XPBP triggers and an Oracle RAC environment where you can reproduce stuck sessions. The best programs force you to trace job failures end-to-end — from the jil file to the database alert log — and explain the kernel-level behaviors behind each failure mode.

Look for training from Broadcom's official curriculum or vendor-neutral deep-dives from people who've run production SAP/Oracle for at least five years. If the instructor hasn't personally debugged a Dead Man's Trigger failure, walk away. The only training worth your time is the kind that breaks things first, then teaches you to fix them.

autosys-bootcamp-checklist.ymlYAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// io.thecodeforge — devops tutorial

criteria:
  - vendor: "Broadcom"
    course: "AutoSys Workload Automation for SAP"
    depth: "Covers SAPXPBP error handling, not just job submission"
  - live_lab: true
    includes:
      - Oracle RAC with stuck session scenarios
      - SAP system with intentional XPBP failure triggers
  - failure_debugging: true
    topics:
      - sqlplus exit codes beyond 0/1
      - Dead Man's Trigger pattern
      - session kill cascade failures
  - red_flags:
    - "No live Oracle database access"
    - "Only shows happy path job submission"
    - "Instructor has no production SAP/Oracle experience"
Output
Best training will allow you to reproduce: sqlplus exit code 127 with SAPXPBP timeout, Oracle ORA-00060 deadlock during job cleanup, and AutoSys kill failure on zombie Oracle sessions.
Training Red Flag:
If the course doesn't force you to debug a silently failed SAP/Oracle job using the AutoSys job log, Oracle alert log, and SAP SM37 simultaneously — you're paying to learn how to submit jobs, not how to run production.
Key Takeaway
Choose the training that makes you comfortable with failure states, not just job submission forms.

Certification That Actually Tells Recruiters You Can Fix a Dead Job — Not Just Click a GUI

The AutoSys certification market is crowded with paper certs that test your ability to memorize jil syntax. If you're integrating SAP and Oracle, you need the certification that proves you understand process chain interactions, not just job scheduling. Broadcom's AutoSys Workload Automation certification (exam 250-561) is the only one that tests on advanced scenarios like XPBP timeout handling and Oracle job type internals.

For SAP-specific credibility, pair it with the SAP Certified Application Associate — SAP S/4HANA or SAP BW/4HANA certification. That combo shows you can navigate SM37 to trace job failures and understand why an AutoSys-triggered SAP job returns a cryptic XPBP return code. For Oracle, get the Oracle Database 19c OCP. It forces you to know session management, which is exactly what you need when AutoSys gets stuck on a hanging Oracle job.

Don't waste money on generic ITIL or PMP certifications for this work. They won't help you debug a stuck Oracle session at 2 AM. The three certs that matter: Broadcom 250-561, SAP S/4HANA, and Oracle 19c OCP. Anything else is padding on your resume, not evidence of skill.

certification-roadmap.ymlYAML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// io.thecodeforge — devops tutorial

certifications:
  - primary: "Broadcom 250-561"
    focus: "AutoSys Workload Automation — advanced SAP/Oracle job types"
    exam_topics:
      - XPBP interface failure handling
      - Oracle job type exit code analysis
      - Dead Man's Trigger configuration
  - sap: "SAP Certified Application Associate - S/4HANA"
    reason: "Can trace XPBP failures via SM37 and SM21"
  - database: "Oracle Database 19c OCP"
    why: "Teaches session management, lock troubleshooting, and kill operations"
  - skip:
    - "ITIL Foundation"
    - "PMP"
    - "Generic AutoSys Administrator (no SAP/Oracle focus)"
Output
Combined these three certifications will let you: Triage a failed SAP job triggered by AutoSys in under 5 minutes by reading XPBP return codes, Oracle alert logs, and AutoSys job logs simultaneously.
Senior Shortcut:
When interviewing, mention the Broadcom 250-561 cert first, then immediately say: "And I use it to debug XPBP dead jobs." That separates you from the paper-cert crowd in one sentence.
Key Takeaway
Three certs that prove you can fix a dead SAP/Oracle job: Broadcom 250-561, SAP S/4HANA, Oracle 19c OCP.
● Production incidentPOST-MORTEMseverity: high

The sqlplus 'Success' That Was Actually a Syntax Error

Symptom
AutoSys job shows SUCCESS. The downstream job that depends on this Oracle data doesn't complain — it just processes stale data. No errors in AutoSys logs. No alerts. The business continues on outdated information for months.
Assumption
The team assumed that because AutoSys showed SUCCESS, the Oracle job worked. They didn't know that sqlplus returns exit code 0 for ALL scenarios unless you explicitly configure error handling.
Root cause
The sqlplus command in the CMD job was: sqlplus user/pass@DB @/scripts/update_proc.sql. The SQL script had a syntax error — a missing semicolon. sqlplus parsed the script, printed 'SP2-0042: unknown command', then exited with code 0. AutoSys saw code 0 and marked the job SUCCESS. The database never executed the stored procedure call because the script didn't parse. No rows were updated. The DBA team never saw an error because the job 'succeeded' from AutoSys's perspective.
Fix
1. Add to every SQL script header: WHENEVER SQLERROR EXIT SQL.SQLCODE WHENEVER OSERROR EXIT 9 2. Also check for parsing errors: WHENEVER SQLERROR EXIT SQL.SQLCODE catches runtime errors. For syntax errors, sqlplus exits 0 unless you use -r option? Actually, syntax errors still return 0. The real fix: wrap sqlplus in a shell script that checks for 'ORA-' or 'SP2-' in the output and exits non-zero. 3. Example wrapper: ``bash sqlplus -s user/pass@DB @script.sql > sqlplus.out 2>&1 if grep -qi 'ORA-\|SP2-' sqlplus.out; then echo "SQL error detected" exit 1 fi ` 4. Always set std_out_file and std_err_file` in the job definition to capture sqlplus output.
Key lesson
  • sqlplus returns 0 on success AND on SQL errors. Never trust it alone.
  • Wrap sqlplus in a script that checks output for error patterns.
  • WHENEVER SQLERROR EXIT SQL.SQLCODE helps but doesn't catch syntax errors.
  • Capture stdout and stderr to files and inspect them in monitoring.
Production debug guideWhen SAP or Oracle jobs don't behave, check these first4 entries
Symptom · 01
SAP job stays in PENDING state indefinitely
Fix
Check SAP agent connectivity: autoping -m sap-agent-server. Verify XBP user is not locked in SAP (SUIM transaction). Check SAP system availability and job scheduling permissions.
Symptom · 02
Oracle EBS concurrent program shows 'Success' in AutoSys but didn't run or failed internally
Fix
Check concurrent manager logs in Oracle EBS. AutoSys only tracks submission success, not execution success. The concurrent program may have errored after start. Review $APPLCSF/$APPLLOG for details.
Symptom · 03
sqlplus job shows SUCCESS in AutoSys but database changes didn't happen
Fix
Check sqlplus output in std_out_file/std_err_file. Look for ORA- (Oracle errors) or SP2- (sqlplus errors). Add error detection wrapper script.
Symptom · 04
SAP job fails with 'RFC communication error'
Fix
Verify RFC destination in SAP is active (SM59). Check network connectivity between SAP agent and SAP application server. Confirm XBP user has RFC authorisations.
★ ERP Integration — 60-Second DiagnosisWhen cross-system jobs fail or silently misbehave
SAP job stuck PENDING
Immediate action
Check SAP agent and XBP user
Commands
autoping -m sap-agent
Check with SAP Basis: SUIM → User → XBP user status
Fix now
Unlock XBP user or restart SAP agent
sqlplus job SUCCESS but data unchanged+
Immediate action
Check sqlplus output for errors
Commands
cat $AUTOUSER/std_out_files/JOBNAME.out
grep -i 'ORA-\|SP2-' $AUTOUSER/std_out_files/JOBNAME.out
Fix now
Add WHENEVER SQLERROR EXIT SQL.SQLCODE to SQL script
Oracle EBS job succeeded but concurrent program failed+
Immediate action
Check EBS concurrent manager logs
Commands
# On EBS app server: ls -la $APPLCSF/$APPLLOG/*.log
tail -100 $APPLCSF/$APPLLOG/request_<request_id>.log
Fix now
Review concurrent program definition and parameters
SAP RFC communication error+
Immediate action
Test RFC connection from SAP agent
Commands
telnet sap-app-server 3300
Check SM59 → RFC destination in SAP GUI
Fix now
Regenerate XBP user password with Basis team
ERP Integration Methods — At a Glance
Integration targetJob type codeWhat AutoSys can doFailure detectionPrerequisite
SAP R/3 / S/4HANAs (SAP)Submit ABAP jobs, monitor completion via RFCSilent — PENDING if XBP user failsSAP agent + XBP user with S_XBP_ADM
Oracle EBSo (Oracle)Submit concurrent programs, monitor request IDPartial — tracks submission, not executionOracle EBS agent installed
Oracle Database (sqlplus)CMD (sqlplus)Run SQL scripts, call stored procsBroken — sqlplus returns 0 on errorssqlplus client + wrapper script
Oracle Database (wrapper)CMD (custom)Run SQL with error checkingFull — exits non-zero on ORA-Wrapper script + AutoSys std_out capture

Key takeaways

1
SAP jobs (job_type
s) need XBP user with S_XBP_ADM. Locked user = PENDING forever. No error in AutoSys.
2
sqlplus wrapper is MANDATORY. Never call sqlplus directly. Check output for ORA- patterns and exit non-zero.
3
Oracle EBS job_type
'o' tracks submission, not execution. Check concurrent manager logs separately.
4
Add validation jobs after every ERP call. Verify row counts, business keys, and completion statuses.
5
Capture stdout/stderr for all ERP integration jobs. That's where the real errors live.
6
Cross-system failures cascade silently. Each integration point needs independent error detection.

Common mistakes to avoid

5 patterns
×

Calling sqlplus directly without error checking wrapper

Symptom
AutoSys shows SUCCESS, but database didn't change. SQL errors are printed to stdout/stderr but ignored. Data inconsistency propagates for days or months.
Fix
Always wrap sqlplus in a shell script that grep's for ORA- and SP2- patterns. Make the wrapper exit non-zero on any database error. Enforce wrapper usage in code review.
×

Not coordinating SAP XBP user lifecycle with Basis team

Symptom
SAP jobs suddenly stop running. AutoSys shows PENDING. No errors in event_demon.log. The issue is an expired password or locked XBP user in SAP.
Fix
Set XBP user password to never expire (secure password with rotation via credential manager). Add monthly check with Basis team. Monitor PENDING duration as alert trigger.
×

Assuming Oracle EBS concurrent program success means business logic succeeded

Symptom
AutoSys shows SUCCESS. Concurrent program submitted. The program executed but failed internally (missing data, permission error). AutoSys has no visibility.
Fix
Add post-execution validation job that checks for expected outcomes in Oracle EBS (e.g., check request log for 'Completed with errors', verify output tables updated).
×

Not capturing sqlplus stdout/stderr in AutoSys files

Symptom
Job fails or succeeds incorrectly. No output to review. Engineer has to rerun job manually to see the error.
Fix
Always set std_out_file and std_err_file in JIL for sqlplus jobs. Capture everything. These files are the first place to look for ORA- errors.
×

Chaining SAP job directly after Oracle job without validation

Symptom
Oracle job 'succeeded' but processed 0 rows due to upstream empty file. SAP runs anyway on empty data set. Business process continues with missing data.
Fix
Add a validation job between Oracle and SAP that checks row count or business key existence. Only trigger SAP if validation passes.
INTERVIEW PREP · PRACTICE MODE

Interview Questions on This Topic

Q01SENIOR
How does AutoSys integrate with SAP?
Q02SENIOR
What is the SAP XBP interface?
Q03JUNIOR
What job type code is used for SAP jobs in JIL?
Q04SENIOR
How do you call an Oracle stored procedure from AutoSys?
Q05SENIOR
What is the gotcha with sqlplus and exit codes in AutoSys?
Q06SENIOR
How do you handle cross-system failure cascades in an AutoSys workflow?
Q01 of 06SENIOR

How does AutoSys integrate with SAP?

ANSWER
AutoSys integrates with SAP R/3 and S/4HANA through the SAP XBP (External Background Processing) interface using job_type: 's' in JIL. A specialised SAP agent on the AutoSys side communicates with SAP via RFC/BAPI calls to submit ABAP background jobs and monitor their completion. Prerequisites: SAP agent installed, XBP user with S_XBP_ADM and S_BTCH_ADM authorisations, RFC destination configured in SAP (SM59). Failure mode: If XBP user password expires or account locks, AutoSys jobs stay PENDING indefinitely with no error in AutoSys logs. Requires SAP Basis team intervention to resolve.
FAQ · 6 QUESTIONS

Frequently Asked Questions

01
How does AutoSys integrate with SAP?
02
What job type do you use for SAP jobs in AutoSys JIL?
03
How do you call an Oracle stored procedure from AutoSys?
04
Why does sqlplus exit 0 even when SQL fails?
05
What permissions does the SAP user need for AutoSys integration?
06
How do you debug an SAP job that stays PENDING in AutoSys?
COMPLETE GUIDE
The Complete AutoSys Workload Automation Guide for Engineers →

JIL syntax, sendevent, autorep, box jobs, file watchers, scheduling, HA, security, cloud workload automation, and 22 interview questions — the definitive AutoSys reference for production engineers.

N
Naren Founder & Principal Engineer

20+ years shipping production infrastructure and CI/CD at scale. Drawn from code that ran under real load.

Follow
Verified
production tested
May 23, 2026
last updated
1,554
articles · all by Naren
🔥

That's AutoSys. Mark it forged?

6 min read · try the examples if you haven't

Previous
AutoSys Real-World Patterns and Best Practices
28 / 30 · AutoSys
Next
AutoSys Cloud Workload Automation