Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Pro*C From Windows
yitbsal_at_yahoo.com (Salaam Yitbarek) wrote
> Oracle 8.1.7
> OS Solaris 8
>
> I have a few stored procedures that use external procedures to access
> shell scripts on the database server. These stored procedures are
> called by VB (and other) applications on Windows platforms.
>
> I would like to rewrite many of these stored procedures using Pro*C
> because a lot of the code is amenable to C and because I would like to
> stop using external procedures. However, I don't know how to call a
> Pro*C program residing on a Unix box from a Windows platform. I
> suppose this is really a client-server question, but I don't know
> where else to ask.
Why? Why turn the extproc's into Pro*C? What business benefit are you trying to achieve?
As for communicating from a Windows client to a C (or Pro*C) program on Unix, you need to roll your own client-server implementation - using good old sockets on Unix and Windows. And keep in mind things like server loading (fork()'s create processes and not threads), security, access via firewalls and proxies, SSL, etc. etc.
But seeing that Oracle already provides a robust working and secure network layer THAT DOES ALL THIS, you should think twice about doing your own when you don't know a bind() from an accept(). Never mind the Visual Basic dweebs that have yet to discover Real Programming (tm).
IMO, Pro*C is crap. Whatever can be done in Pro*C, can usually for the vast majority of times, be done better INSIDE Oracle (PL/SQL or Java). What's more, PL/SQL is many times more portable than Pro*C. You do not sit with issues about ld and dso and 32bit versus 64bit and all that. What's more - the PL/SQL code can be updated and recompiled from a client.
It's strange you know.. here I am shouting at the developers and management for choosing Pro*C and not PL/SQL with extprocs (as the exception when PL/SQL and Java are not capable).. and there you have a decent Oracle config and now you want to bugger it up and turn it into a Pro*C abortion.. <sigh>
So many friggen nutters and only one lead pipe...
Oh yeah - if cmdline access to shell scripts is what you want, that can be very easily and nicely be done using Java in Oracle and wrapping that with a secure PL/SQL script. Or else implement RSH or REXEC on the client side and fire up th daemons on our Sun box. (go and look at asktom for the code)
-- BillyReceived on Tue Aug 26 2003 - 00:34:38 CDT