Discussion:
Extproc question
Storey, Robert (DCSO)
2018-06-22 13:22:27 UTC
Permalink
Morning

Been beating my head against a wall for a day or so trying to get an windows OS command to execute from within a plsql package.

I'm migrating a 32bit 9i to 64bit 11g. on the 32 bit side, this process works just fine. On the 64bit side, I have setup the extrpoc listener same as it is on the 32bit side. I imported the stored procs and functions, so that should cover the internal requirements for the extproc. But, when I execute the process for the OS command on the 64 bit machine, it fails to execure the OS command.

I wrote a small plsql program that just makes a call to the package that has my extproc setup. I have it set to return me the status of the command. Returns a 0 on my 32bit side, but a -1 on my 64 bit side.

After some research, I come across docs id 372512.1. This seems to tell me that I cannot make a call with extproc using the 64bit extproc if the .dll I am lining to is 32 bit. It says that the 64bit extproc on a 64 bit database server is a 64bit process and must load 64-bit DLLs. And since this is windows, there is apparently no method for co-running the 32bit version of extproc.

Long way to go to ask if anyone has run into this and can confirm/deny?
Norman Dunbar
2018-06-22 20:00:36 UTC
Permalink
Hi Robert,

you can run 32 bit software on 64 bit Windows (or Linux etc), but with
that it's because you have the 32 bit application and 32 bit libraries etc.

What you cannot do is call out to a 32 bit library/dll from a 64 bit
application and vice versa. So, extproc will require you to recompile
your external libraries/dlls with a 64 bit compiler - if you have 64 bit
Oracle installed.

HTH

Cheers,
Norm.
--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
27a Lidget Hill
Pudsey
West Yorkshire
United Kingdom
LS28 7LG

Company Number: 05132767
--
http://www.freelists.org/webpage/oracle-l
Mark W. Farnham
2018-06-23 13:56:04 UTC
Permalink
That's right, AND, if it is a windows .dll (rather than one you built
yourself) you may have to point whatever looks for the windows .dlls to that
library folder. If you can't find that environment variable you should be
able to make a link (shortcut in windows land) from the 32bit version it is
finding to the 64bit version. For the latter method, hilarity results if you
also need to run 32bit programs on the 64bit OS, so it is better if you can
point to the correct .dll file directly.

-----Original Message-----
From: oracle-l-***@freelists.org [mailto:oracle-l-***@freelists.org]
On Behalf Of Norman Dunbar
Sent: Friday, June 22, 2018 4:01 PM
To: ***@DCSO.nashville.org; oracle-***@freelists.org
Subject: Re: Extproc question

Hi Robert,

you can run 32 bit software on 64 bit Windows (or Linux etc), but with that
it's because you have the 32 bit application and 32 bit libraries etc.

What you cannot do is call out to a 32 bit library/dll from a 64 bit
application and vice versa. So, extproc will require you to recompile your
external libraries/dlls with a 64 bit compiler - if you have 64 bit Oracle
installed.

HTH

Cheers,
Norm.


--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
27a Lidget Hill
Pudsey
West Yorkshire
United Kingdom
LS28 7LG

Company Number: 05132767
--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Storey, Robert (DCSO)
2018-06-25 12:27:32 UTC
Permalink
Thanks. I finally found that documentation later on Friday.

-----Original Message-----
From: Norman Dunbar [mailto:***@dunbar-it.co.uk]
Sent: Friday, June 22, 2018 3:01 PM
To: Storey, Robert (DCSO); oracle-***@freelists.org
Subject: Re: Extproc question

Hi Robert,

you can run 32 bit software on 64 bit Windows (or Linux etc), but with
that it's because you have the 32 bit application and 32 bit libraries etc.

What you cannot do is call out to a 32 bit library/dll from a 64 bit
application and vice versa. So, extproc will require you to recompile
your external libraries/dlls with a 64 bit compiler - if you have 64 bit
Oracle installed.

HTH

Cheers,
Norm.
--
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
27a Lidget Hill
Pudsey
West Yorkshire
United Kingdom
LS28 7LG

Company Number: 05132767
--
http://www.freelists.org/webpage/oracle-l
Loading...