Running Oracle SQL Windows Jobs in JAMS


JAMS enables you to run Oracle SQL Windows Jobs by using the Oracle activities in a Workflow Job or the Oracle tasks in a Sequence Job. If you need to use more complex PowerShell commands in your Oracle SQL Windows Jobs, you can create an Execution Method by following the instructions below.

  1. Click Execution Methods from the JAMS Shortcuts menu. Click More if you do not see this option. 
  2. Click + to add an Execution Method.
  3. Type a name for the Execution Method, such as PowerShell_OracleSQLPlus.
  4. Select PowerShell as the Base Method.
  5. Click Ok. The properties of the Execution Method window opens.


  6. Click the Template tab and copy and paste the information listed in the template below.
    Set-Alias sqlplus "C:\Program Files\Oracle\SqlPlus.exe"
    Write-Host "Executing SQL Script"
    "@ | sqlplus -Silent <<OraUsername>>/<<OraPassword>>@<<ORACLE_SID>>

    NOTE: <<OraUsername>>, <<OraPassword>>, and <<ORACLE_SID>> are Parameters on the Execution Method.


  7. Click the Parameters tab.
  8. Click + to create the OraUsername, OraPassword, and ORACLE_SID Parameters with Text as the Type. The Default Value will be the username, password, and the SID for your Oracle instance.

    NOTE: A central username and password can be stored in the OraUsername and the OraPassword Parameters on the Execution Method, Folder, or individual Job levels for any of the Jobs you choose to use this Execution Method.


  9. Click Save and Close.
  10. Create a new JAMS Job using your new Oracle SQL Execution Method.
  11. Enter your SQL Source directly in the Job's Source tab.
  12. Click Save and Close.
Have more questions? Submit a request