RE: RE: c based external procedures vs. Java Stored Procedures

2003-09-05 Thread Stephane Faroult
My feeling is that, given the clumsy way external procedures are implemented, the 
argument of C speed doesn't hold too well. If you must write a function which will be 
called through IPCs each time you return a row, from instance, C will look javaish in 
speed. Add to this that static variables cannot be relied upon because the function 
can be reloaded anytime, that you have to be very careful about the really fun C stuff 
for fear of interference with Oracle (signals, etc.) - My feeling is that external C 
functions have no real practical use. If speed is a concern (and it often is) it 
should be C which calls Oracle, not the reverse.

My EUR 0.02

Stephane Faroult

- --- Original Message --- -
From: Jared Still [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L
[EMAIL PROTECTED]
Sent: Thu, 04 Sep 2003 15:49:26

Or Perl...

On Thu, 2003-09-04 at 14:54, Richard Ji wrote:
 so my question is, are there things you can do
with external procedures that you cant do with
java? 
 
 Yes there are, for instance, Java doesn't support
raw socket, so if you ever need that
 you will have to do it in C with external
procedure.  But what's the chance of anyone
 is going to use such a thing, very little.  In
general though, you can do most of the
 stuff in Java Stored Procedures.
 
 Richard Ji
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Faroult
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: c based external procedures vs. Java Stored Procedures

2003-09-04 Thread Jared Still

One thing you can do is bypass all of your security if
you aren't careful.  EXTPROC needs to run as some user
other than Oracle (nobody for instance), otherwise you've
just created a huge security breach.

There are other security implications as well.  Even running
as 'nobody', you need to ensure that the code is written
in a secure manner.

As for why you would use them, there are probably more reasons
than we can think of here.  One that comes to mind is you
have data that needs massaged by an algorithm in a purchased
library.  Rather than writing a whole app to deal with it, you
write a wrapper for the purchased functionality and plug it
into EXTPROC.

You can even do this with Perl. Works very well.  :)

Jared

On Thu, 2003-09-04 at 07:49, [EMAIL PROTECTED] wrote:
 Ive just started digging into these. Im familiar with Java and C, though Im hardly 
 an expert. It appears that java stored procedures are much easier to use and far 
 more forgiving than C based external procedures. 
 
 So then I started looking for functionality that external procedures have over java 
 and I cant find any. Since I cant find any, I dont see any reason to spend time 
 learning how to use them. 
 
 so my question is, are there things you can do with external procedures that you 
 cant do with java? 
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: [EMAIL PROTECTED]
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: c based external procedures vs. Java Stored Procedures

2003-09-04 Thread Goulet, Dick
Depends on your developers.  We have few JAVA developers, but quite a few C 
programmers.  Plus I've got this great book of math routines in C.

Dick Goulet
Senior Oracle DBA
Oracle Certified 8i DBA

-Original Message-
Sent: Thursday, September 04, 2003 10:49 AM
To: Multiple recipients of list ORACLE-L


Ive just started digging into these. Im familiar with Java and C, though Im hardly an 
expert. It appears that java stored procedures are much easier to use and far more 
forgiving than C based external procedures. 

So then I started looking for functionality that external procedures have over java 
and I cant find any. Since I cant find any, I dont see any reason to spend time 
learning how to use them. 

so my question is, are there things you can do with external procedures that you cant 
do with java? 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: [EMAIL PROTECTED]
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Goulet, Dick
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: c based external procedures vs. Java Stored Procedures

2003-09-04 Thread DENNIS WILLIAMS
Ryan
   I'm no expert either. What I heard is that the advantage of external
procedures were good where you have something that needs the performance of
the underlying system. The C code runs directly on the server, whereas Java
is on top of Oracle, which is system-independent.

Dennis Williams
DBA, 80%OCP, 100% DBA
Lifetouch, Inc.
[EMAIL PROTECTED] 


-Original Message-
Sent: Thursday, September 04, 2003 9:49 AM
To: Multiple recipients of list ORACLE-L


Ive just started digging into these. Im familiar with Java and C, though Im
hardly an expert. It appears that java stored procedures are much easier to
use and far more forgiving than C based external procedures. 

So then I started looking for functionality that external procedures have
over java and I cant find any. Since I cant find any, I dont see any reason
to spend time learning how to use them. 

so my question is, are there things you can do with external procedures that
you cant do with java? 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: [EMAIL PROTECTED]
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: c based external procedures vs. Java Stored Procedures

2003-09-04 Thread Stephane Paquette
We have tested a product this winter that was using an external C proc to
call cobol programs.

Stephane

-Original Message-
Jared Still
Sent: Thursday, September 04, 2003 11:34 AM
To: Multiple recipients of list ORACLE-L



One thing you can do is bypass all of your security if
you aren't careful.  EXTPROC needs to run as some user
other than Oracle (nobody for instance), otherwise you've
just created a huge security breach.

There are other security implications as well.  Even running
as 'nobody', you need to ensure that the code is written
in a secure manner.

As for why you would use them, there are probably more reasons
than we can think of here.  One that comes to mind is you
have data that needs massaged by an algorithm in a purchased
library.  Rather than writing a whole app to deal with it, you
write a wrapper for the purchased functionality and plug it
into EXTPROC.

You can even do this with Perl. Works very well.  :)

Jared

On Thu, 2003-09-04 at 07:49, [EMAIL PROTECTED] wrote:
 Ive just started digging into these. Im familiar with Java and C, though
Im hardly an expert. It appears that java stored procedures are much easier
to use and far more forgiving than C based external procedures.

 So then I started looking for functionality that external procedures have
over java and I cant find any. Since I cant find any, I dont see any reason
to spend time learning how to use them.

 so my question is, are there things you can do with external procedures
that you cant do with java?

 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 --
 Author: [EMAIL PROTECTED]
   INET: [EMAIL PROTECTED]

 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).


--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephane Paquette
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: c based external procedures vs. Java Stored Procedures

2003-09-04 Thread Mladen Gogala
Anything stored is always easier to configure then anything external. It
shouldn't be
easier to use, though. And you should judge where dies it make sense. For
reading a 
simple file 10 times a day (document scanning application at my previous
company),
a properly written C program (using fork, readv and writev, without fscanf
and fprintf 
bells and whistles) will outperform almost anything else. For taking to
other applications,
network communication and alike, Java is not significantly slower and is
much easier to
program. If you want a simple database script, PL/SQL is by far the best
solution.
And if your goal is to make me like you, use perl. 

--
Mladen Gogala
Oracle DBA 



-Original Message-
[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 10:49 AM
To: Multiple recipients of list ORACLE-L


Ive just started digging into these. Im familiar with Java and C, though Im
hardly an expert. It appears that java stored procedures are much easier to
use and far more forgiving than C based external procedures. 

So then I started looking for functionality that external procedures have
over java and I cant find any. Since I cant find any, I dont see any reason
to spend time learning how to use them. 

so my question is, are there things you can do with external procedures that
you cant do with java? 

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: [EMAIL PROTECTED]
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the
message BODY, include a line containing: UNSUB ORACLE-L (or the name of
mailing list you want to be removed from).  You may also send the HELP
command for other information (like subscribing).



Note:
This message is for the named person's use only.  It may contain confidential, 
proprietary or legally privileged information.  No confidentiality or privilege is 
waived or lost by any mistransmission.  If you receive this message in error, please 
immediately delete it and all copies of it from your system, destroy any hard copies 
of it and notify the sender.  You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. Wang Trading LLC and any of its subsidiaries each reserve the right to 
monitor all e-mail communications through its networks.
Any views expressed in this message are those of the individual sender, except where 
the message states otherwise and the sender is authorized to state them to be the 
views of any such entity.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: c based external procedures vs. Java Stored Procedures

2003-09-04 Thread Richard Ji
so my question is, are there things you can do with external procedures that you cant 
do with java? 

Yes there are, for instance, Java doesn't support raw socket, so if you ever need that
you will have to do it in C with external procedure.  But what's the chance of anyone
is going to use such a thing, very little.  In general though, you can do most of the
stuff in Java Stored Procedures.

Richard Ji
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Richard Ji
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: c based external procedures vs. Java Stored Procedures

2003-09-04 Thread Jared Still
Or Perl...

On Thu, 2003-09-04 at 14:54, Richard Ji wrote:
 so my question is, are there things you can do with external procedures that you 
 cant do with java? 
 
 Yes there are, for instance, Java doesn't support raw socket, so if you ever need 
 that
 you will have to do it in C with external procedure.  But what's the chance of anyone
 is going to use such a thing, very little.  In general though, you can do most of the
 stuff in Java Stored Procedures.
 
 Richard Ji
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: Richard Ji
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jared Still
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).