473,799 Members | 2,903 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 44061
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
20207
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
22768
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
3617
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
2397
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
18443
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
9540
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10475
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
10250
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...
1
10222
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10026
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
9068
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
7564
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...
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
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.