SQLPLUS command line question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tommy

    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 SQLprompt 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?
  • Mark D Powell

    #2
    Re: SQLPLUS command line question

    tommynospam@yah oo.com (tommy) wrote in message news:<4f0df91b. 0402190957.4f8d d028@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 SQLprompt 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 --

    Comment

    • george lewycky

      #3
      Re: SQLPLUS command line question

      Mark.Powell@eds .com (Mark D Powell) wrote in message news:<2687bb95. 0402191731.6b2f 928b@posting.go ogle.com>...
      tommynospam@yah oo.com (tommy) wrote in message news:<4f0df91b. 0402190957.4f8d d028@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 SQLprompt 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

      Comment

      Working...