Showing posts with label compile. Show all posts
Showing posts with label compile. Show all posts

Monday, March 26, 2012

External Procedure error

I'm trying to compile the following function:

CREATE OR REPLACE FUNCTION shell(cmd IN VARCHAR2)
RETURN PLS_INTEGER
AS
EXTERNAL LIBRARY EXTPROCSHELL_LIB
NAME "extprocsh"
LANGUAGE C
PARAMETERS (cmd STRING);

but keep getting an error that says EXTPROCSHELL_LIB needs to be declared. Somewhere I read that this probably means that the shared library doesn't exist and try recreating it.

Our DBA assures me that he created the library in the Oracle home lib directory and I do see the compiled C program there and also saw the path of his library creation and everything looks fine.

Any suggestions here?Hello,

do you have created a library object with the same name ?
See "CREATE LIBRARY ..."

The error you have posted does not mean, that you dont have created the lib in the oracle directory.
Its says, that Oracle can not find the library object that points to the library in the oracle directoy ...

Hope that helps ?

Manfred Peter
Alligator Company GmbH
http://www.alligatorsql.comsql

Wednesday, March 21, 2012

Extended Stored Procedures

Hi !
Please advise which libs and include files are required
to compile extended stored procedure file for SQL Server 2000
in VC++.
Thanks in advance:From SQL 2000 BOL under "extended stored procedures, creating":
To create an extended stored procedure DLL by using Microsoft Visual C++
Create a new project of type Win32 Dynamic Link Library.
Set the directory for include files and library files to C:\Program
Files\Microsoft SQL Server\80\Tools\DevTools\Include and C:\Program
Files\Microsoft SQL Server\80\Tools\DevTools\Lib, respectively.
On the Tools menu, click Options.
In the Options dialog box, click the Directories tab and set the directory
for include files and library files.
On the Project menu, click Settings.
In the Project Settings dialog box, click the Link tab. Click the General
category, and then add opends60.lib to object/library modules.
Add source files (.c, .cpp, and .rc files, and so on) to your project.
Compile and link your project.
Regards
Mike
"IMRAN SAROIA" wrote:

> Hi !
> Please advise which libs and include files are required
> to compile extended stored procedure file for SQL Server 2000
> in VC++.
> Thanks in advance:
>
>