Home » SQL & PL/SQL » SQL & PL/SQL » trigger to call a batch file
trigger to call a batch file [message #233329] Wed, 25 April 2007 13:13 Go to next message
Arpit
Messages: 99
Registered: March 2001
Member
Hi there,

Can I create a db trigger on a table to invoke a batch file (.vbs) file when a date field on that table gets updated?

Please advice.

Thanks very much,
Re: trigger to call a batch file [message #233331 is a reply to message #233329] Wed, 25 April 2007 13:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Yes.

Regards
Michel
Re: trigger to call a batch file [message #233332 is a reply to message #233331] Wed, 25 April 2007 13:17 Go to previous messageGo to next message
Arpit
Messages: 99
Registered: March 2001
Member
Thanks!

Can you please assist with the trigger code please?

Thanks much
Re: trigger to call a batch file [message #233333 is a reply to message #233332] Wed, 25 April 2007 13:27 Go to previous message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
It is not an easy task to call something non-Oracle from Oracle.
It tooks days of work to debug such code.
I will surely not do it here for you.
Now, all I can tell you is you can do it.
Search on AskTom how to call OS command from PL/SQL.
Study documentation to know how to code triggers.
Search on AskTom how to asynchroneously call a procedure (if you don't want to block your DML with an external program). You can also study dbms_job package.

With that, you have all the elements to do what you want.

Regards
Michel
Previous Topic: Comparing dates in different time zones
Next Topic: Writing to a file from PL/SQL procedure
Goto Forum:
  


Current Time: Tue Feb 18 23:57:17 CST 2025