Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    10

    Unanswered: calling stored procedure

    How do I call a stored Procedure from a trigger...My exact requirement is :
    when any record is inserted in the database in that case a trigger will be fired..This trigger in turn should call a stored procedure which will have the external procedure registered in it..thru it a C function will be called..
    Somy basic question is how do I call a stored Procedure from a trigger...
    I also read the document on External Procedure...But what all changes do I need to make in the listner.ora and other places for it to work????

    Arunava

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Just code in the trigger:
    Code:
    Create trigger ...is
    ...
    Begin
      ...
      MyProcedure(parm1, parm2,...);
      ...
    End;
    /
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Sep 2003
    Location
    Virginia, USA
    Posts
    246
    For your second question (how to configure Oracle Net for external procedure calls) take a look at PlsExtProc. Actually, when you use Oracle's default installation PlsExtProc is already configured. Oracle leaves the other 99% of the work to you.
    -Mark

  4. #4
    Join Date
    Jul 2004
    Posts
    10
    IS it that only .so file is supported in case of external Procedure??Or even .dll file is supported...
    bcos whereever I read about External Procedure only the example of .so file is shown :

    Firstly, create a makefile with the following contents:

    include $(ORACLE_HOME)/plsql/lib/env_plsql.mk

    .SUFFIXES: .pc .c .o

    EXTP_MKFILE = $(ORACLE_HOME)/rdbms/demo/demo_rdbms.mk

    myshared.so:

    $(MAKE) -f $(EXTP_MKFILE) extproc_callback SHARED_LIBNAME=myshared.so OBJS="test.o"

    WHat all changes do i need to make in it to get .dll file


    --arunava

Posting Permissions

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