Re: PL/SQL Triggers.

From: Gary Kirsh <gkirsh_at_news.dorsai.org>
Date: Thu, 19 Jan 1995 16:05:03 GMT
Message-ID: <D2nu0F.9Bo_at_dorsai.org>


Vasudev V. Yendapally (vasudevy_at_eng.auburn.edu) wrote:
: This is what I get when I try to run a trigger.
: Could someone tell me what's actually going wrong ?
:
: /*****************************************************************/
: This is my trigger
: /*****************************************************************/
: CREATE trigger my_trigger
: BEFORE INSERT ON my_table
: BEGIN
: UPDATE my_table
: SET c=sysdate
: WHERE c IS NULL;
:
: END;
: /
: /*******************************************************************/
 

: This is what I get
: /*************************************/
 

: SQL>start my_trigger.sql
: CREATE trigger my_trigger
: *
: ERROR at line 1:
: ORA-00901: invalid CREATE command

: unknown command "END" - rest of line ignored.
: CREATE trigger my_trigger
: *
: ERROR at line 1:
: ORA-00901: invalid CREATE command

: /*************************************************************************/
 

: Thanks for your time
: Vasu/..
: ---
: **************************** *********************************
: Vasudev Yendapally 333 EastMagnolia Ave # 3
: Dept. of Computer Science Auburn AL - 36830
: Auburn University Phone (205)-821-3501
: **************************** *********************************

2 possibilities come to mind:

  1. If this is a V6 database, get V7.
  2. If this is a V7 database, try running the script $ORACLE_HOME/rdbms/admin/dbmsstdx.sql as user SYS in sqlplus (or connect internal in sqldba). This will install kernel extensions needed to use triggers. I wouldn't have thought that this would be the error message you'd get, but it's worth a try, and couldn't hurt.

Gary

--
Gary Kirsh
Next Extent, Inc.
Phone: (718) 380-8546
Internet: gkirsh_at_dorsai.org
Received on Thu Jan 19 1995 - 17:05:03 CET

Original text of this message