Users can run Oracle SQL Windows Jobs in JAMS by following these instructions:
- Select the Execution Methods shortcut in the JAMS Client.
- Select "+" to Add an Execution Method.
- Type a Name for the Execution Method. For example; PowerShell_OracleSQLPlus.
- Select "PowerShell" as the Base Method.
- Select "Ok".
After selecting "Ok", the "Properties of the Execution Method" window will open.
- 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
- 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.
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.
- 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.
Comments