[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::sql

Title:SQL notes
Moderator:NOVA::SMITHI
Created:Wed Aug 27 1986
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3895
Total number of notes:17726

3870.0. "external function sanity check." by chsr38.ch.oracle.com::ROHR (The Packers did it!) Tue Mar 04 1997 08:10

    In your program you let's say update an employee record then pass the
    employee_id to an external function and that function is supposed to
    update a record in another table based on that employee_id, so do SQl
    in the external function (Precompiled C to be precise).

    Do you need to make an attach in the external function or is there
    another way to avoid an attach? 
    
    From the books I suppose there is no other way as distributed tx are 
    not allowed and you can't pass neither database nor transaction handles. 
    
    Thanks,
    Regina
    
T.RTitleUserPersonal
Name
DateLines
3870.1Why use external functionukvms3.uk.oracle.com::PJACKSONOracle UK Rdb SupportTue Mar 04 1997 08:224
    You are obviously using Rdb7, so you can define a stored function
    instead of an external one.
    
    Peter
3870.2It's the customer^s choice...chsr38.ch.oracle.com::ROHRThe Packers did it!Tue Mar 04 1997 08:4011
    >>>>>>        -< Why use external function >-
    
    Because my customer wants an external and not a stored.
    
    Yes V7. Does your answer mean that yes there is no means to have an
    external function call into an Rdb db without a new attach?
    
    thanks,
    Regina
    
    
3870.3NOVA::SMITHIDon&#039;t understate or underestimate Rdb!Tue Mar 04 1997 08:565
You have to attach a second time and start a second transaction.  They are
welcome to use an external function, just be aware that they might deadlock
themselves...

Ian
3870.4No 2PC eithersvrav1.au.oracle.com::MBRADLEYI was dropped on my head as a baby. What&#039;s your excuse?Tue Mar 04 1997 17:429
>You have to attach a second time and start a second transaction.  They are
>welcome to use an external function, just be aware that they might deadlock
>themselves...

And also remember that there is no two phase commit between the attaches.

G'day,

Mark.