Multiple sqlplus sessions from a single sqlplus session

From: kunwar singh <krishsingh.111_at_gmail.com>
Date: Fri, 1 Jan 2021 19:18:33 -0500
Message-ID: <CAJSrDUoPOWb3P+38hHvC7L6ZVzCvjJ8=GnWuo0dfGC0yVRRLXw_at_mail.gmail.com>



Hi Listers,
Happy new year!

Small academic question.

Is there a way we can run multiple sqlplus sessions from a single sqlplus session.

What I want to be able to do is: Run a separate long-running session from my sqlplus and monitor it from the current session.

Example:

Session 1 :
test_user_at_TESTDB> !nohup sqlplus test_user/test_user <<EOF select /* *very long running query* */ <few columns> from big_table ;

EOF
&

--If the above runs successfully, try to monitor it. Currently, above
approach throws an error or directly connects to the sqlplus and run the query, but doesn't get control back to Session 1

Session 1 :
test_user_at_TESTDB> select *from v$session where username='TEST_USER'; test_user_at_TESTDB> <and few others queries like on v$sql , v$sql_plan_monitor etc >

--

Cheers,
Kunwar

--

http://www.freelists.org/webpage/oracle-l Received on Sat Jan 02 2021 - 01:18:33 CET

Original text of this message