This discussion is archived
11 Replies Latest reply: Mar 23, 2013 10:29 AM by SomeoneElse RSS

DBMS_SQL  PLS-00307: too many declarations of 'PARSE' match this call

jmft2012 Explorer
Currently Being Moderated
I try to accomplish the DDL in a program, i am here to ask the help in PLSQl since i have done very little. I did look up the oracle plsql docs though. Please do no ask the reaosn I have to do that in a program.

alter system kill session '<sid>, <serial#>';


sql> CREATE OR REPLACE PROCEDURE mykill(mysid IN NUMBER, myserial in number) 
  2  AS
  3      cursor_name INTEGER;
  4      rows_processed INTEGER;
  5  BEGIN
  6      cursor_name := dbms_sql.open_cursor;
  7      DBMS_SQL.PARSE(cursor_name, 'ALTER SYSTEM KILL SESSION '':x', ':y''',
  8                     DBMS_SQL.NATIVE);
  9      DBMS_SQL.BIND_VARIABLE(cursor_name, ':x', mysid);
 10      DBMS_SQL.BIND_VARIABLE(cursor_name,':y', myserial);
 11      rows_processed := DBMS_SQL.EXECUTE(cursor_name);
 12      DBMS_SQL.CLOSE_CURSOR(cursor_name);
 13  EXCEPTION
 14  WHEN OTHERS THEN
 15      DBMS_SQL.CLOSE_CURSOR(cursor_name);
 16  END;
 17  /

Warning: Procedure created with compilation errors.

sql> show error
Errors for PROCEDURE MYKILL:

LINE/COL ERROR
-------- -----------------------------------------------------------------
7/5      PL/SQL: Statement ignored
7/5      PLS-00307: too many declarations of 'PARSE' match this call
sql> 

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points