Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: trigger
Hi
I have had a similar sort of problem to yours.
The solution for being able to execute EXP commands from a database trigger is to use the package DBMS_PIPE.
The basic solution is to write a Pro*C program which logins into the Oracle database and then sits there waiting on the end of a "pipe".
Your trigger then writes to the pipe.
The Pro*C program then takes the message you sent it and either
EXP is not an SQL*Plus external command.
You should also be careful as to the level that the trigger is defined. If you define the trigger for each row, you will experience a larger overhead than if the code is executed for each statement.
Hope this is of some assistance.
Mark Griffiths
Freelance Oracle Consultant.
On Wed, 11 Mar 1998 08:20:27 +0100, "Gitte Tøgersen" <danskdata_at_hotmail.com> wrote:
>devis skrev i meddelelsen <3505512D.60A0_at_mall.it>...
>>I have a question:
>>
>>Is it possible to execute external SQL Plus commands like EXP (export)
>>from within a trigger? If so how can I code this? If not then is there
>>another way to perform this function.
>>
>>Basically, I want to export tables in format ascii whenever an INSERT
>>statement is executed using a Trigger.
>>
>>Thanks in Advance.
>>--
>>Devis Pizzolon
>>Database Master
>>Mall Italy Lab.
>>http://www.mall.it
>>devis_at_mall.it
>
>Hi,
>
>I don't know what version of Oracle that You're
>running, but You could program your export in a procedure,
>and then call the procedure from the trigger.
>
>
>Gitte Tøgersen
>Denmark
>email: danskdata_at_hotmail.dk
>
>
>
>
>
Received on Sat Mar 14 1998 - 00:00:00 CST
![]() |
![]() |