Re: Multiple sqlplus sessions from a single sqlplus session

From: Martin Berger <martin.a.berger_at_gmail.com>
Date: Mon, 4 Jan 2021 11:08:27 +0100
Message-ID: <CALH8A929fktq25XggRZWOpz_o+crhwP5WDDjs7xfM6BuaYpdow_at_mail.gmail.com>



Hi Kunwar,

You can use the scheduler to run a specific job (immediately) and observe from your sqlplus session what's the process of this job. You can even schedule an external job which runs sqlplus and it#s result will be in USER_SCHEDULER_JOB_RUN_DETAILS.BINARY_OUTPUT.  (even it works, I don't recommend it)
Or you can give SQLcl
<https://www.oracle.com/database/technologies/appdev/sqlcl.html> a try. There you can have scripts with multiple connections - https://github.com/oracle/oracle-db-tools/blob/master/sqlcl/SCRIPTING.md

Am Sa., 2. Jan. 2021 um 01:20 Uhr schrieb kunwar singh < krishsingh.111_at_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
>

-- 
Martin Berger                Oracle ♠
martin.a.berger_at_gmail.com _at_martinberx <https://twitter.com/martinberx>
^∆x      http://berxblog.blogspot.com

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jan 04 2021 - 11:08:27 CET

Original text of this message