Home » Developer & Programmer » Precompilers, OCI & OCCI » ExtProc: how to unload an external DLL library? (Oracle 10g XE on Windows XP)
ExtProc: how to unload an external DLL library? [message #281624] Sun, 18 November 2007 18:54 Go to next message
rhjort
Messages: 1
Registered: November 2007
Junior Member
Can I update the DLL without shutting down Oracle?

When I try to overwrite an external DLL file when Oracle DBMS is online and the function (ie: extproc) is already loaded into memory, an error occurs.

I need to do this when updating and testing a C function. When I shutdown the server I can do the DLL replacing. In production environment this procedure won't be possible.

On MS SQL Server, I use the following instructions to add, drop and unload the external procedure:

sp_addextendedproc 'xp_myfunc', 'C:\MSSQL\BIN\Custom.dll'
sp_dropextendedproc 'xp_myfunc'
dbcc xp_myfunc(free)


Is there anything similar to it on Oracle in order to definitely unload (ie: free) the external DLL file?

Here are the instructions I use to create the function:

CREATE LIBRARY libcustom AS 'C:\oraclexe\app\oracle\product\10.2.0\server\BIN\Custom.dll';
/

CREATE OR REPLACE FUNCTION myfunc(str IN VARCHAR2)
RETURN VARCHAR2 AS EXTERNAL NAME "myfunc" LIBRARY libcustom LANGUAGE C
PARAMETERS (str STRING, RETURN STRING);
/


Best regards,

Rodrigo Hjort
http://icewall.org/~hjort
Re: ExtProc: how to unload an external DLL library? [message #281702 is a reply to message #281624] Mon, 19 November 2007 01:16 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Oracle does not manage the OS, unloading a DLL is an OS operation.
Oracle does not do this. It just requests the DLL and says when it no more uses it.

Regards
Michel
Previous Topic: libraries needed to link OCCI using gcc (merged)
Next Topic: about proc++
Goto Forum:
  


Current Time: Sat Dec 03 22:06:47 CST 2016

Total time taken to generate the page: 0.08381 seconds