Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use pause in execution of scripts in sqlplus

Status
Not open for further replies.

Ron06

Technical User
Sep 27, 2007
11
US
I'm run scripts as below in sqlplus with different schema user.


@$PATH/create_table.sql
@$PATH/alter_table.sql
@$PATH/constraint.sql
@$PATH/sequence.sql

but interesting connection to different schema user disconnected I'm when I'm using pause in execution

set pause on
set pause PLEASE ACKNOWLEDGE TO CONTINUE

Is any way to pause the window until user press return
 
Ron,

If your objective is to cause execution to wait until the user presses the <Enter> key, then the following should be user friendly and accomplish your objective:
Code:
************************************************************************
<code to execute prior to pause>
...
Accept foo PROMPT "Pausing...Press [Enter]-key to continue processing: "
...
<code to execute after pause>
...
Let us know if this meets your needs.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Mufasa thanks a lot for your suggestion. I have tried to run the script using your example but it is giving me following errors.

P2-0042: unknown command "..." - rest of line ignored.
SQL> Accept foo PROMPT "Pausing...Press [Enter]-key to continue processing: "
Pausing...Press [Enter]-key to continue processing: ...
SQL>

DO i need to include pause on before starting the script?
 
I don't think you were intended to include the ...

unless of course I'm wrong...

I want to be good, is that not enough?
 
Ron,

Ken is correct: the "..." before and after the ACCEPT simply represent "other stuff you may want to do," so you don't include the "..." in your code. The "..." within the PROMPT clause should not be causing you any trouble.

Let us know how things go after you have removed the extraneous elipses ("...").

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top