473,786 Members | 2,428 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 NonExistantComm andFile.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 44058
to*********@yah oo.com (tommy) wrote in message news:<4f******* *************** ****@posting.go ogle.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 NonExistantComm andFile.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.go ogle.com>...
to*********@yah oo.com (tommy) wrote in message news:<4f******* *************** ****@posting.go ogle.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 NonExistantComm andFile.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:\@NonExistant CommandFile

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 NonExistantComm andFile.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 NonExistantComm andFile.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 NonExistantComm andFile.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
20205
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 trying to run netca: Error loading native library: libnjni9.so. java.lang.UnsatisfiedLinkError: jniGetOracleHome at oracle.net.common.NetGetEnv.getOracleHome(NetGetEnv.java) at oracle.net.ca.CmdlineArgs.setOraArgs(CmdlineArgs.java)
0
1581
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 line using a file but can't get it to run with a text buffer.. the file one is -> sqlplus <username>/<pass> @<filename.sql> The text
1
22765
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 @/mp3/generated/listpullmon/sql/5485_de.sql And I set line size in the file: set pagesize 0
0
3616
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 first line (capitalized below) it runs fine on SQLPlus. Is there some flag I need to set in SQLPlus to get this to work properly?
0
2396
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 automake, if i do that in the proper director it says "automake: 'configure.ac' or 'configure.in' is required" i dont know where to bring those files. secondly if i only compile simple1.cc using gcc proving all the link flags to libraries and...
2
3727
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 commands in the buffer so I don't have to re-type an entire statement repetitively to acquire the results or recieving an real-time horizontal scroll of the results and etc. My concern is that I've noted an apparent offset of the column headings to their...
1
18442
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: ECHO "commit begins"; is this the right syntax for SQLPLUS? declare recs number := 0; looper number := 0; i number;
2
9320
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 repeating the field names so I could get a more table-like output without having to delete the extra rows of field names thrown in. Thanks for any input, Andrew
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 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?
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10360
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9960
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4064
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 we have to send another system
3
2894
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.