473,498 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQLPLUS command line question

I'm running sqlplus from a DOS command line and inducing an error by
purposly giving it the wrong script (hence, it cannot find the script
file.) What it is doing is exiting to the SQL> prompt as show below.
What I NEED it to do is exit to the DOS prompt.

c:\>sqlplus someuser/mypass@mydb NonExistantCommandFile.sql
SQL>

Does someone know how this can be done or have a commandline switch
reference that might have the answer?
Jul 19 '05 #1
4 44043
to*********@yahoo.com (tommy) wrote in message news:<4f**************************@posting.google. com>...
I'm running sqlplus from a DOS command line and inducing an error by
purposly giving it the wrong script (hence, it cannot find the script
file.) What it is doing is exiting to the SQL> prompt as show below.
What I NEED it to do is exit to the DOS prompt.

c:\>sqlplus someuser/mypass@mydb NonExistantCommandFile.sql
SQL>

Does someone know how this can be done or have a commandline switch
reference that might have the answer?


Look in the sqlplus manual for logon.sql (or perhaps login) scripts.
You can set parameters in this file that will take affect when the
session is started. You could set the sqlwhenever clause to exit on
failure. At least this is what I would try. I am not on a computer
with Oracle on it so I cannot test my suggestion but it should be
pretty easy to test.

HTH -- Mark D Powell --
Jul 19 '05 #2
Ma*********@eds.com (Mark D Powell) wrote in message news:<26**************************@posting.google. com>...
to*********@yahoo.com (tommy) wrote in message news:<4f**************************@posting.google. com>...
I'm running sqlplus from a DOS command line and inducing an error by
purposly giving it the wrong script (hence, it cannot find the script
file.) What it is doing is exiting to the SQL> prompt as show below.
What I NEED it to do is exit to the DOS prompt.

c:\>sqlplus someuser/mypass@mydb NonExistantCommandFile.sql
SQL>

Does someone know how this can be done or have a commandline switch
reference that might have the answer?


Look in the sqlplus manual for logon.sql (or perhaps login) scripts.
You can set parameters in this file that will take affect when the
session is started. You could set the sqlwhenever clause to exit on
failure. At least this is what I would try. I am not on a computer
with Oracle on it so I cannot test my suggestion but it should be
pretty easy to test.

HTH -- Mark D Powell --


You should place the SQL in your "BIN" directory
and all you should need is

c:\@NonExistantCommandFile

also try saving something from the dos prompt and see where
it gets saved and then place the sql code in that directory
if its not the BIN directory

george
Jul 19 '05 #3
rameshmech
1 New Member
I'm running sqlplus from a DOS command line and inducing an error by
purposly giving it the wrong script (hence, it cannot find the script
file.) What it is doing is exiting to the SQL> prompt as show below.
What I NEED it to do is exit to the DOS prompt.

c:\>sqlplus someuser/mypass@mydb NonExistantCommandFile.sql
SQL>

Does someone know how this can be done or have a commandline switch
reference that might have the answer?
inorder to quit from SQL promt to dos prompt type $ else type host
eg: SQL> $
or
SQL>host
Jul 14 '06 #4
Nyrine
2 New Member
I'm running sqlplus from a DOS command line and inducing an error by
purposly giving it the wrong script (hence, it cannot find the script
file.) What it is doing is exiting to the SQL> prompt as show below.
What I NEED it to do is exit to the DOS prompt.

c:\>sqlplus someuser/mypass@mydb NonExistantCommandFile.sql
SQL>

Does someone know how this can be done or have a commandline switch
reference that might have the answer?
echo quit | sqlplus someuser/mypass@mydb NonExistantCommandFile.sql

Though that will exit even if you give a valid script - it will run script first however.
Jul 20 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
20184
by: Rick | last post by:
I am installing Oracle 9i client runtime on AIX 5.1-003. The installation completes successfully, but neither the Net Configuration Assistant or SQLPLUS will run. I get the following error when...
0
1566
by: Yves | last post by:
I want to run sqlplus from command line and I'm having a bit of trouble... what I want to do is this.. sqlplus <username>/<pass> "contents of filename.sql" I know how to run it command...
1
22686
by: Krusty276 | last post by:
I'm getting this error using sql plus Input is too long (> 2499 characters) - line ignored This is my command line on linux: /home/oracle/product/8.1.6/bin/sqlplus -s loader/loader@ecrmdb...
0
3576
by: BobG | last post by:
-- The issue This following query works fine on Toad and PowerBuilder yet when it is run on SQLPlus I get: "ORA-03113: end-of-file on communication channel" When I remove the distinct from the...
0
2373
by: tyousaf | last post by:
Hi i am new to mysql and mysql++, i have installed mysql server, it is running fine. i also installed "mysql++-1.7.9gcc3.2-2.i386.rpm" (i have gcc 3.3) , first of all as the readme file says to do...
2
3713
by: mivey4 | last post by:
Okay, Here's the problem. I quite often use sqlplus from a command console for obvious benefits that aren't available using the sqlplus windows application. Such as storing the previous...
1
18421
by: areya | last post by:
This is a SQLPLUS question. How do I display what is being executed. In other words, in the listing below what command do I need to use to see if commit will be executed. As an example, can I say:...
2
9303
by: andrewteg | last post by:
I am spooling some output using sqlplus command line tool and after about 10-15 rows it repeats the header (field names) in my testing. I was wondering if there was a way to suppress it from...
2
358
by: tommy | last post by:
I'm running sqlplus from a DOS command line and inducing an error by purposly giving it the wrong script (hence, it cannot find the script file.) What it is doing is exiting to the SQLprompt as...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.