Solved

SQLPlus to run a .sql file

Posted on 2008-10-30
3
1,035 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Where Does Time Value Come From for Database Insert or Update 4 41
oracle date format checking 7 51
format dd/mm/yyyy parameter 16 58
Oracle SQL Developer equivalent MS SQL 6 31
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…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to recover a database from a user managed backup

739 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