DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: SQL*PLUS question

  1. #1
    Join Date
    Feb 2006
    Posts
    37

    SQL*PLUS question

    Thanx for the reply

    Here is the problem. A script is set to run these queries.

    SQL> grant select on xxx to xxx;
    SQL> grant select on xxx to xxx
    SQL> grant select on xxx to xxx;

    The first & last two processed but the second will not because it is missing the ';'

    In addition, we received no notification that second statement was not processed, therefore, it seemed the entire script was processed.

    Besides adding the ';' is there any way to change the SQL*PLUS environment to show the second query was not processed.

    Thanx again

  2. #2
    Join Date
    Nov 2005
    Location
    Indianapolis
    Posts
    24

    Exit on error

    The command should have returned an error:

    ORA-00933: SQL command not properly ended


    You could use the following sqlplus command at the beginning of your script to exit whenever an error occurs:
    whenever sqlerror exit

    Not sure if this is what you want to happen, but that's one way to handle it.

  3. #3
    Join Date
    Feb 2006
    Posts
    37
    Thanx For The Help

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    I'm guessing that there was a gap between those lines, right? If so then
    Code:
    set sqlblanklines on
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width