PLS-00103: Encountered the symbol "SQL" ...
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: PLS-00103: Encountered the symbol "SQL" ...

  1. #1
    Join Date
    Nov 2007
    Posts
    6

    PLS-00103: Encountered the symbol "SQL" ...

    Hi Guys, i am new to oracle and today i was trying to run a exec a procedure in a script but gave me this errors. any ideas/suggest from anyone will be very helpful. many thanks ..


    SQL> exec ERARCH.ER_ARCH.sql.er_arch_and_purge (1) ;
    BEGIN ERARCH.ER_ARCH.sql.er_arch_and_purge (1) ; END;
    *
    ERROR at line 1:
    ORA-06550: line 1, column 22:
    PLS-00103: Encountered the symbol "SQL" when expecting one of the following:
    delete
    exists prior
    The symbol " was inserted before "SQL" to continue.



    ============
    The sql script
    ============
    bash-3.1$ cat ERARCH.ER_ARCH.sql
    CREATE OR REPLACE PACKAGE "ERARCH"."ER_ARCH"
    AS
    PROCEDURE er_arch_and_purge (p_days_offset IN INTEGER);
    END Er_Arch;

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    wow

    anyway the correct way to do that is
    exec ERARCH.ER_ARCH.er_arch_and_purge (1) ;

  3. #3
    Join Date
    Nov 2007
    Posts
    6
    yes.i tried that before, it was giving

    SQL> exec ERARCH.ER_ARCH.er_arch.er_arch_and_purge (1);
    BEGIN ERARCH.ER_ARCH.er_arch.er_arch_and_purge (1); END;

    *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'ERARCH.ER_ARCH' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

    i also granted execute priviledge to sys user

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    you typed it wrong

  5. #5
    Join Date
    Nov 2007
    Posts
    6
    sorry i did meant "exec ERARCH.ER_ARCH.er_arch_and_purge (1) ;"

    SQL> exec ERARCH.ER_ARCH.er_arch_and_purge (1) ;
    BEGIN ERARCH.ER_ARCH.er_arch_and_purge (1) ; END;

    *
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00201: identifier 'ERARCH.ER_ARCH' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

  6. #6
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    does the package actually exist - did you create it in the database?

  7. #7
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,013
    Try select owner, object_type from all_objects where object_name='ER_ARCH'; or just desc ERARCH.ER_ARCH.

    If I type in delete press enter and then try to do something different sqlplus will think that the second thing I wanted to do related to the delete command. Commands in sqlplus are terminated with a / or ;.
    this space intentionally left blank

  8. #8
    Join Date
    Nov 2007
    Posts
    6
    hmm..it does not seem to be locating the procedure. is there a specify path i need to put the script at? at the moment, i am just putting in for example, /orcl/erarch and from there i login to sqlplus.

    SQL> select owner, object_type from all_objects where object_name='ER_ARCH'
    2 ;

    no rows selected

    SQL> desc ERARCH.ER_ARCH
    ERROR:
    ORA-04043: object ERARCH.ER_ARCH does not exist

  9. #9
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,013
    So it might exist, but you don't have execute privilege on it. Do you have a dba that could help you run this? You mist otherwise how would you get the database?

    Quote Originally Posted by pigggy
    hmm..it does not seem to be locating the procedure. is there a specify path i need to put the script at? at the moment, i am just putting in for example, /orcl/erarch and from there i login to sqlplus.

    SQL> select owner, object_type from all_objects where object_name='ER_ARCH'
    2 ;

    no rows selected

    SQL> desc ERARCH.ER_ARCH
    ERROR:
    ORA-04043: object ERARCH.ER_ARCH does not exist
    this space intentionally left blank

  10. #10
    Join Date
    Nov 2007
    Posts
    6
    i am the having the database (installed and controlled by me entirely) in my laptop with two sql script that has the procedure.

    i granted the execution priviledge to sys. i am connected with sqlplus / as sysdba;

    and from there i am executing the package and gave me the error below. i know the scripts work because it is in production now.

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