Running Oracle SQL Windows Jobs in JAMS

Follow

Users can run Oracle SQL Windows Jobs in JAMS by following these instructions:

  1. Select the Execution Methods shortcut in the JAMS Client.

    Shortcuts_Select_Execution_Method.png

  2. Select "+" to Add an Execution Method.

    Execution_Methods.png

  3. Type a Name for the Execution Method. For example; PowerShell_OracleSQLPlus.

    Add_an_Execution_Method.png

  4. Select "PowerShell" as the Base Method.

    Base_Method.png

  5. Select "Ok".

    After selecting "Ok", the "Properties of the Execution Method" window will open.

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

    Note: <<OraUsername>>, <<OraPassword>>, and <<Oracle_SID>> are parameters on the Execution Method


    MethodName_PowerShell_ORCLSQLPlus.png

  7. Select the "Parameters" tab to create the 3 Parameters as mentioned above with a Text DataType.

    The "Default Value" will be username, password, and the SID for your Oracle instance.

    Parameters_MethodName_PowerShell_ORCLSQLPlus.png


    Note: A central username and password can be stored in the OraUserName and the OraPassword Parameters either on the "Execution Method", Folder, or Individual Job Levels for any of the Jobs you choose to utilize this execution method.


  8. Create a new JAMS Job using your new Oracle SQL Execution Method, then enter your SQL Source directly in the Job's Source Code tab.

    Source_Code_Tab.png

 


 

Related Articles

Have more questions? Submit a request

Comments