SQLPlus SP2-0317 on SET DEFINE in 10.2.0.2 W2K

Hi,
I'm getting a frequent SP2-0317 error in SQLPlus running in a command window under W2K against Oracle 10.2.
Here's an example showing it working intermittently:
C:\Duncan\install_new>sqlplus /nolog
SQL*Plus: Release 10.2.0.2.0 - Production on Thu Jun 21 07:38:13 2007
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
SQL> set define on
SQL> set define &
SP2-0317: expected symbol name is missing
SQL> set define ~
SQL> set define &
SQL>
There are no hidden characters, extra spaces. Just set define ignoring the character I want to use. It consistently fails within scripts.
Has anyone else seen this and know a work around ? I've also tried set define '~' but that has the same issues.
TIA, Duncan
Message was edited by:
Duncan Gardner

set define x specifies the prefix-character for substitution variables. The default is the ampersand (&).
It´s not necessary to do both:
set define on
set define &
Use only set define &

Similar Messages

  • Compile java source trough SQLPLUS (SP2-0317: expected symbol name is m...)

    Hello,
    I have a problem to compile java stored procedure trough SQLPLUS...
    After connection on my DB I execute script which includes many java sources for example:
    SPOOL INS-2870-2012.lst
    PROMPT 'EncoderJava'
    set def off
    set def &
    @@nsEUCStatistics.java
    @@nsVerifier.java
    @@nsICharsetDetectionObserver.java
    @@nsSJISVerifier.java
    @@Big5Statistics.java
    @@EncodingDetector.java
    @@EUCJPStatistics.java
    @@EUCKRStatistics.java
    spool offThe error I get is:
    SP2-0317: expected symbol name is missing
    Enter value for 0xff:
    old  33:                   (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
    new  33:
    Enter value for v:
    old  34:                   >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
    new  34:
    Enter value for v:
    old  35:                   & v.eUnitMsk4bits ))&0xFF)
    new  35:
    Enter value for 0xff:
    old  37:                   (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
    new  37:
    Enter value for v:
    old  38:                   >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
    new  38:
    Enter value for v:
    old  39:                   & v.eUnitMsk4bits ))&0xFF)
    new  39:
    Enter value for v:
    old  40:                & v.eSftMsk4bits) << v.eBitSft4bits)) & v.eUnitMsk4bits )
    new  40:
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "org/mozilla/intl/chardet/nsVerifier" AS
    ERROR at line 1:
    ORA-29536: badly formed source: Encountered ">>" at line 32, column 18.
    Was expecting one of:
    "#sql" ...
    "boolean" ...
    "byte" ...
    "char" ...
    "double" ...
    "false" ...
    "float" ...
    "int" ...
    "long" ...
    "new" ...
    "null" ...
    "short" ...
    "super" ...
    "this" ...
    "true" ...
    "void" ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <CHARACTER_LITERAL> ...
    <STRING_LITERAL> ...
    <IDENTIFIER> ...
    "~" ...
    "++" ...
    "+" ...
    "-" ...If I execute java stored procedure in TOAD as script all works fine..
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "org/mozilla/intl/chardet/nsVerifier" AS
    package org.mozilla.intl.chardet ;
    import java.lang.*;
    public abstract class nsVerifier {
         static final byte eStart = (byte)0;
         static final byte eError = (byte)1;
         static final byte eItsMe = (byte)2;
         static final int eidxSft4bits = 3;
         static final int eSftMsk4bits = 7;
         static final int eBitSft4bits = 2;
         static final int eUnitMsk4bits = 0x0000000F;
         nsVerifier() {
         public abstract String charset() ;
         public abstract int stFactor()   ;
         public abstract int[] cclass()   ;
         public abstract int[] states()   ;
         public abstract boolean isUCS2() ;
         public static byte getNextState(nsVerifier v, byte b, byte s) {
             return (byte) ( 0xFF &
              (((v.states()[((
                 (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
                 >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
                 & v.eUnitMsk4bits ))&0xFF)
              >> v.eidxSft4bits) ]) >> (((
                 (s*v.stFactor()+(((v.cclass()[((b&0xFF)>>v.eidxSft4bits)])
                 >> ((b & v.eSftMsk4bits) << v.eBitSft4bits))
                 & v.eUnitMsk4bits ))&0xFF)
              & v.eSftMsk4bits) << v.eBitSft4bits)) & v.eUnitMsk4bits )
    /What I'am doing wrong or how to run my script to load "java source" on my db... (without loadjava)...
    regards

    Hi,
    peterv6i.blogspot.com wrote:
    Hello,
    I have a problem to compile java stored procedure trough SQLPLUS...
    After connection on my DB I execute script which includes many java sources for example:
    SPOOL INS-2870-2012.lst
    PROMPT 'EncoderJava'
    set def off
    The command above tells SQL*Plus not to scan for substitution variables, and to treat the character that marks substitution variables (which is & by default) as a normal character.
    set def &That completely reverses the previous SET DEF command: it tells SQL*Plus to treat & as a special character that marks substitution variables.
    Perhaps you meant to issue the second SET DEF command after running all the scripts, like this:
    set def off
    -- & has no special meaning at this point
    @@nsEUCStatistics.java
    @@nsVerifier.java
    @@nsICharsetDetectionObserver.java
    @@nsSJISVerifier.java
    @@Big5Statistics.java
    @@EncodingDetector.java
    @@EUCJPStatistics.java
    @@EUCKRStatistics.java
    -- Resume default beahvior of &
    set def &
    spool offThis way, & will have no special meaning while you run all those .java files, but it will resume having it's special meaning as the substitution variable marker after that, so you can run other scripts which use that feature later in the same session.

  • Missing SET DEFINE OFF exporting tables

    Another minor bug exporting tables using the insert option is that no “SET DEFINE OFF” is created.
    If values in the exported tables contains *“&”* characters, the user is asked to edit values.
    Example:
    1. Create a table with such a value:
    SET DEFINE OFF;
    CREATE TABLE FOO (COMPANY VARCHAR2 (64));
    INSERT INTO FOO VALUES ('Meier & Co');
    2. Exporting this table creates:
    -- Datei erstellt -Freitag-April-15-2011
    -- DDL for Table FOO
    CREATE TABLE "FOO"
    (     "COMPANY" VARCHAR2(64)
    REM INSERTING into FOO
    Insert into FOO (COMPANY) values ('Meier & Co');
    3. Running in SQLPlus:
    SQL> @export.sql
    Tabelle wurde erstellt.
    Geben Sie einen Wert f³r co ein:
    Regards
    Marc
    Version:
    Java(TM)-Plattform     1.6.0_23
    Oracle-IDE     3.0.04.34
    Versionierungsunterstützung     3.0.04.34

    Thank you. As a new SQL Developer user, I didn't know what it should have been, but I found out I needed to edit the output before I could use it to load data.
    Skip

  • Setting DEFINE OFF by default

    I'm finding it tedious to occasionally ambush myself with an ampersand in a query. Can DEFINE be set off by default?

    I've a sneaking suspicion that there is no resolution, at least as regards setting DEFINE OFF within a script.
    The SQL Developer Help under section "SQL*Plus Statements Supported and Not Supported in SQL Worksheet" specifies the SET command for option PAUSE OFF alone. No other SET options are listed; although "DEFINE" is listed as a command, that is the definition of a SQLPLUS variable, not the environment setting DEFINE.
    I was looking around for a Preference, but could not see anything; OTOH, it is pretty late at night so I could have missed one.
    HTH

  • 'set scan off' or 'set define off' now working through JDBC on Oracle 10g

    Hi,
    I am using oracle 10g. I am trying to execute 'set scan off' statement through JDBC (java code) using below statement
    //get connection Connection c = this.init();  //create statement object Statement st = c.createStatement();  //execute statement st.execute("set scan off");
    but it is throwing below exception.
    'java.sql.SQLException: ORA-00922: missing or invalid option'
    I also tried 'set define off' but got same exception. But if I run these statement directly on database without using JDBC there is no exception.
    Please let me know what is the issue.

    Rajesh Panchal wrote:
    Hi,
    I am using oracle 10g. I am trying to execute 'set scan off' statement through JDBC (java code) using below statement
    //get connection
    Connection c = this.init(); 
    //create statement object
    Statement st = c.createStatement(); 
    //execute statement
    st.execute("set scan off");                              but it is throwing below exception.
    'java.sql.SQLException: ORA-00922: missing or invalid option'
    I also tried 'set define off' but got same exception. But if I run these statement directly on database without using JDBC there is no exception.
    Please let me know what is the issue.These are not SQL statements but specific Oracle commands. You would invoke them from PL/SQL through the command interpreter or by using Sqlplus on the commandline; if you try to execute this in a PL/SQL query window you'll get the same error.
    So no, you are not going to invoke them from JDBC.

  • Set define off

    Hi, Everyone,
    I am using oracle 11g version on windows server 2003 R2.
    i am writing a procedure in a pacakage. My procedure is as follows:
    PROCEDURE PROC_SUBDEPT_USER_LKP
    IS
    v_command_1 VARCHAR2(30000);
    v_command_2 VARCHAR2(30000);
    v_command_3 VARCHAR2(30000);
    v_command VARCHAR2(30000);
    BEGIN
    FOR k IN
    (SELECT * from SUBDEPT_LKP
    LOOP
    V_COMMAND_1 := ' SELECT ';
    V_COMMAND_2 := ' , CUSTOMER_NO, ROWNUM NR FROM (
    SELECT DISTINCT CUSTOMER_NO
    FROM BBL_TRY_NEW A, PMM B
    WHERE A.PR_CODE = B.PR_CODE
    AND B.SUBDEPT_CODE = ';
    V_COMMAND_3 := ' AND B.SUBDEPT_DESC = ';
    V_COMMAND := ' INSERT INTO SUBDEPT_USER_LKP '||chr(10)||V_COMMAND_1||K.SUBDEPT_TN_ID||V_COMMAND_2||K.SUBDEPT_CODE||V_COMMAND_3||''''||K.SUBDEPT_DESC||''''||')';
    EXECUTE IMMEDIATE V_COMMAND;
    COMMIT;
    --DBMS_OUTPUT.PUT_LINE(V_COMMAND);
    END LOOP;
    DBMS_OUTPUT.PUT_LINE('POPULATED SUBDEPT_USER_LKP');
    END;
    for each insert statement in the loop i need to "set define off" as i have '&' symbol in my data for k.subdept_desc.
    Could anybody please help?
    Thanks in advance

    i dont think that u need to set define off, as & will not cause any issue if it is in a variable
    check my test code
    SQL> select * from test_tab;
    A
    a&b
    SQL> declare
      2  a varchar2(200);
      3  begin
      4  select a into a from test_tab where rownum = 1;
      5  execute immediate 'insert into test_tab values (''' || a || ''')';
      6  commit;
      7  end;
      8  /
    PL/SQL procedure successfully completed.
    SQL>

  • Database copy with "set define off" option

    Is there an option to do a database copy with a "set define off" option ? I'm copying packages that contain ampersands (&) in strings and during the copy I'm being asked the value of these variables.

    Apologies for spamming this thread, but I'd like to point out a couple of additional issues regarding Database Copy:
    1) On Fedora it tries to create the script file in a system folder ( +/opt/sqldeveloper/sqldeveloper+, IIRC) which obviously doesn't work unless you are root.
    2) DDL generated for objects named like the exporting schema (for example table TEST in schema TEST) is incorrect. For example (note the missing table name):
    -- DDL for Table TEST
    CREATE TABLE
    (     "FIELD1" NUMBER,
    ) ;

  • Sqlplusのエラーについて(SP2-1503)

    sqlplusにてエラーが発生します。
    sqlplusを実行すると以下のエラーが発生します。
    SP2-1503: Oracle Call Interfaceを初期化できません
    SP2-0152: Oracleが正常に機能していない可能性があります。
    発生するようになったのは異なったバージョンのORACLEをインストールをしてからだと
    思われます。
    11.1.0を以前にインストールしており、この時は問題なくアクセスできておりました。
    sqlplus ユーザ名/パスワード@サービス名
    が、11.2.0をインストールしたところ上記ではアクセスできなくなり以下でアクセスできるようになりました。
    sqlplus ユーザ名/パスワード@ホスト名;PortNO/サービス名
    おかしいと思い、ORACLE_HOMEの環境変数がかわったことに気が付き、11.1.0に環境変数を
    変更したところ以下のエラーが発生することがわかりました。
    SP2-1503: Oracle Call Interfaceを初期化できません
    SP2-0152: Oracleが正常に機能していない可能性があります。
    これを解消したいのですがわかりません。
    どなたかわかる方がおりましたらご教授願います。
    OSはWINDOWSXPとなります。
    宜しくお願いします。

    先ほどシステム設定の環境変数(PATH)に設定されている
    内容を11.1.0が先になるように編集したところ利用可能になりました。
    どうやらORACLE_HOMEのbinをPATHに設定されており、これが
    影響していたのだと推測されます。
    解決できてよかったです。
    ありがとうございました。

  • Quickpaint reports not working with assignment set defined with criteria

    Hello,
    I have a problem with quickpaint reports in HRMS. When i run quickpaint report against assignment set defined with criteria it reports following error: APP-PAY-06867 An error occurred during formula execution FFX00_DATA_NOT_FOUND (assignment criteria was &ASG_LOCATION=New York).I defined several assignment sets with different criteria and i always get the same error when i run any quickpaint report.
    The same Quickpaint report works well with assignment set defined by including individual assignment.
    Thanks in advance!
    best regards

    Thanks for uploading the sample reports. 
    I am not abe to reproduce the issue and the graphs generated in both the attached reports are the same except that the width of the graphs being displayed are different as seen in the below images.
    ATML 5.1 Report Graph
    XML Report Graph
    Regards
    Srivinayaka Pandurangan
    National Instruments
    With Best Regards,
    Srivinayaka
    National Instruments

  • SET DEFINE OFF in Linux Operating system.

    Is "SET DEFINE OFF" will work in Linux Operating system..
    Please let me know .

    SET DEFINE OFF is an SQL*Plus tool command..
    It will work in any OS..

  • Set Define Off compiler option or similar?

    When I create a package in SQLDeveloper it starts off something like this:
    Create or replace package...
    I then save the file to my SVN folder and commit it to the repository. If I come back later and want to compile something from the repository, I browse to the file in my repository, open the file (read only) and compile. I'm getting the problem that it tries to put substitutions in (&). Is there a way to tell the compiler not to do this? Normally I'd put in something like "set define off" before the package to do this, but since it is not already there and it's read only, I can't do this...
    I tried to open a new worksheet and run "set define off" and then recompile, but it didn't do anything useful...
    Any ideas?
    Thanks

    That's weird, I'd say that should work. Sure you issued that in the same session on the same connection?
    You could also try:
    set scan offAnd run it as script (F5) and as statement (F9) just in case that makes any difference.
    Hope that helps,
    K.

  • [sqlplus] - SP2-1503: Unable to initialize Oracle call interface

    Hello,
    I've just reinstall an new Oracle DB 10.2.0.1.0 and when i type SQLPLUS i've this error:
    $sqlplus /nolog
    SP2-1503: Unable to initialize Oracle call interface
    SP2-0152: ORACLE may not be functioning properly
    what's hapening ???
    thanks for your help.

    found !!
    it's a stupid and strange error.... because i re-use my old settings and it's worked.
    now i remove the last '/' on $ORACLE_HOME path... and all works fine.
    thanks...

  • Not able to use new attribute in set defination

    Experts,
    I have created one custom variable employeestatus. Did the binding with 'user' object and also added in MPR 'Synchronization: Synchronization account controls users it synchronizes'..
    However I am still not able to use the new attribute in Set definition.
    Error says access denied.
    Please suggest.
    Thanks,
    Mann

    Hi,
    You need to add it to one of FilterPermission objects (depending on what you need either Administrator Filter Permission or Non-Administrator Filter Permission).
    Go to All Resources, locate Filter Permission, open one of them and add your attribute to the Allowed
    Attributes under Permitted Filter Attributes tab.
    Regards, P

  • How to change the hostname was set/defined in SAP system?

    Dear Expert,
    My customer met a problem about that:
    he defined his host name with small characters(lower case) "abc" when he installed the SAP system (Windows2003(x64)-Solman70SR4).
    But in SM21, the title of sm21, the hostname was recognize as upper case "ABC".
    in SM51, the hostname was also recognized as upper case "ABC"
    in STMS, the tab of 'transport tool', it is recognized as lower case "abc" in TRANSDIR.
    in SM59, it is recognized as upper case "ABC" in internal connections, but recognized as lower case "abc" in ABAP connections, such as TMSADM@<DB>.DOMAIN.<sid>
    While in Java URL, it is recognized as lower case "abc". With my test, the Java URL is not case sensitive for the HOSTNAME part in HTTP link as I tested to change the hostname both in upper case and lower case in etc\hostname file, the URL both are working. (not sure if this is due to the test is with intranet or not).
    Based on SAP note 611361, it seems that:
    "Hostnames must be considered "case sensitive". That means
    hostnames shall be used in the same case (upper or lower) in all
    SAP configurations as well as in the network configuration (DNS
    or etc/hosts). You must ensure consistent name resolving of the
    hostname from hostname to IP address and back from the IP address
    to the the same hostname (case sensitive match). See also note
    129997."
    Please help to suggest.
    Many thanks in advance,
    Perry Song

    Section  4.13 "Checking the Consistency of the Host Name" in [This Upgrade Guide|https://websmp208.sap-ag.de/~sapidb/011000358700000353422008E]  has a good explaination of what & how to check your hostname / parameter configuration.
    on a windows box, another way to get the TCP/IP name is to type  'hostname' from a CMD window.

  • SqlPLus  SP2-0544 invalid command: SPOOL

    Hi,
    one of those frustrating setup problems. I'm trying to create a SPOOL file on NT, with SqlPlus 8.1.5 (or 8.1.7). I had it working, but then I had to reinstall the N8 client. Now, SqlPlus rejects any attempt to use the SPOOL command. I checked the DLLs in memory while SqlPlus was running, but they are all the correct version. Also checked the registry, environment variables, Path, etc.
    Is this some common bug ? In fact, I'm getting the same error number if I type the EDIT command. The difference is that SPOOL has worked last week, while I could never make EDIT work (first attempt December 1992). In the past, I had SPOOL working on-again off-again on Solaris.
    Any hints ? Redirecting the output at operating-system level is not an option, because I need to Accept a few variables from the user.
    Andrew

    Hi Tapash
    This is fixed, thanks for the response. My script had some invalid white space characters which were not visible in Unix, this was causing some errors.
    satya
    Message was edited by:
    Satya Vanukuri

Maybe you are looking for

  • How to call a actionMethod from EL?

    Hi all, I have the following code <af:outputText value="#{bindings.getYCWarningMsg.execute}" id="ot35" partialTriggers="t1"/> getYCWarningMsg() is a method provided by AM, and will return a String which I want to display in the screen. How to invoke

  • Exception running FML32 sample app.

    Hi, I configured the WTC with weblogic6.1 and tuxedo7.1. I have two sample services running in tuxedo TOUPPER REVERSE_STRING I compiled the ejb classes provided for simapapp and it ran successfully. However when I try to run the simpFML32 example, I

  • Edit Xcel doc with multiple users in Real time on a home wireless network

    I was wondering if anyone knows how to edit an Xcel Document by multiple users at the same time from Homw wireless system. 1) We both have mac's 2) We both have our Computers shared with eachother 3) I Set the Excel file to allow multiple users/edite

  • MS Access - Oraclec 8i: Spaces in Table Names and Columns

    I have an access database that i have split into two parts. 1. Access data tables 2. Access application The application has the data tables linked in for its use. With your workbench utility i have migrated my access data tables over but there is a b

  • Is it possible to download iWork on iPad mini given that I've bought it already for my Macbook?

    I bought iWork for my Macbook Pro in August, and would like to download it for the iPad mini, obviously not wanting to pay for it again. I know that lots of Apple software can be transferred across devices, but seeing as I have iWork in a Mac OS form