Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQLPlus to run a .sql file

Posted on 2008-10-30
3
Medium Priority
?
1,091 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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 setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

971 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