VBAHole22 Posted July 21, 2004 Posted July 21, 2004 I was wondering if anyone has experience calling some VB.NET code from within an Oracle trigger. Can this be done? What about on SQLSErver? I would like a proc to be run each time an Oracle Trigger is fired. Would I be able to put some code in the PL/SQL to do this? Or would I have to use the Java interface or something like that? Quote Wanna-Be C# Superstar
Moderators Robby Posted July 21, 2004 Moderators Posted July 21, 2004 You can run an EXE from Oracle and SQL Server but I doubt you can run a specific piece of code. Quote Visit...Bassic Software
Joe Mamma Posted July 21, 2004 Posted July 21, 2004 You can run an EXE from Oracle and SQL Server but I doubt you can run a specific piece of code. I know in MSSQL you can load a COM object. It is a little hairy, but it is but is possible. You can also build extended stored procedure DLL's. . . even hairier :eek: BTW. This is where Informix rocked!!! Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
*Experts* Nerseus Posted July 22, 2004 *Experts* Posted July 22, 2004 You can xpcmdshell (with underscores in the name somewhere) in SQLServer to run any EXE. I would guess Oracle has a similar bit of functionality. BUT, I would strong reccommend NOT using this. Performance alone should be enough to drive you away from this one (it's absolutely horrible on a realworld transactional server). If you just want to run a proc during a trigger, then sure - go for it (that's mostly what it's there for). Generally, you'll have your code right in the trigger since triggers should be fast (do their work and get out quickly). If you need something realtime, go with triggers or a proc. If all your inserts into TableA go through one proc, then you wouldn't need a trigger (for example). If you need something more robust, like an EXE, then I'd suggest logging to a specific table that an EXE can scan periodically (polling). If we knew what you were trying, maybe even more suggestions. -ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.