Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Shell Script executing Oracle PL/SQL code

rohithkumar November 18, 2020

I'm calling a Oracle PL/SQL code from shell script which takes time to finish, but after completion of PL/SQL code the shell script session is not terminated and also still shows as active when is type ps … -aef|grep 'SQL*PLUS'. Any suggestion why the shell script session is not terminated. Note : PL/SQL code has no issue and ran successfully. I have used cron job to run the shell script. The shell script is terminated when Data is less to process.

2 answers

0 votes
Vinod kumar kasipuri July 21, 2021

In PL/SQL, I'd do it the other way round:

  1. Count number of connections that match your query
  2. If result > 400 send email
  3. Else generate the disconnection statements, probably with ALTER SYSTEM DISCONNECT SESSION...

I don't know your requirement of course, but could it be solved with resource profiles to limit user connections?

 

Thanks.
Encoding complier

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2020

I'm afraid we are an Atlassian community, not an Oracle one. 

Some of us might be able to help, but I don't want you to be left hanging here - there's little chance this community will respond.  You may want to ask the question in an Oracle forum, rather than an Atlassian one.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events