Solved

SQLPlus to run a .sql file

Posted on 2008-10-30
3
1,015 Views
Last Modified: 2013-12-19
Dear experts,

I want to run a .sql which contains some sql code as shown.
However, when I run sqlplus command in windows command prompt.
The sqlplus can successfully login but hold to wait me to input for more?
Mysqlplus command:
"sqlplus username/password@somewhere @c:\oracle\replicate.sql"

I can only quit by pressing Ctrl+C, and I check the result that my script didn't run successfully.

Did my code in .sql missing something?

Many thanks
declare rc binary_integer; 

begin rc := sys.dbms_defer_sys.push(destination=>'DBBK', stop_on_error=>FALSE, delay_seconds=>0, parallelism=>0);

end;

Open in new window

sqlpluserror.JPG
0
Comment
Question by:pomiu
3 Comments
 
LVL 27

Accepted Solution

by:
sujith80 earned 500 total points
ID: 22838679
You have to add  a slash and "exit" at the end of the script.
like
declare rc binary_integer; 

begin rc := sys.dbms_defer_sys.push(destination=>'DBBK', stop_on_error=>FALSE, delay_seconds=>0, parallelism=>0);

end;

/

exit;

Open in new window

0
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 22838680
0
 
LVL 1

Author Closing Comment

by:pomiu
ID: 31511565
Many thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now