Solved

SQLPlus to run a .sql file

Posted on 2008-10-30
3
1,018 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Single ERP VS muttiple Application or Systems 6 64
Pfile and SPfile - Oracle 2 57
Oracle RAC 12c 8 60
How can I rollback insert statements after commit in oracle? 7 65
Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

862 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

25 Experts available now in Live!

Get 1:1 Help Now