Showing posts with label shell. Show all posts
Showing posts with label shell. 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

Sunday, February 19, 2012

Exporting to Excel thru an SP

Hi all,
I know how to use DTS create a package and use the cammand shell to call the
DTS package.
Is there a way to BCP a table into Excel using windows authentication
without creating the DTS package and calling it?
TIA,
Joe1.Use BULK INSERT
2 Opendatasource
INSERT INTO
OpenDataSource('Microsoft.Jet.OLEDB.4.0' ,
'Data Source="D:\testsource\testsource.xls";Extended properties=Excel
5.0')...sheet1$
SELECT col1,col2 from table_name
But, the excel should have the columns and should be on the server.
Hope this helps
--
"jaylou" wrote:

> Hi all,
> I know how to use DTS create a package and use the cammand shell to call t
he
> DTS package.
> Is there a way to BCP a table into Excel using windows authentication
> without creating the DTS package and calling it?
> TIA,
> Joe
>|||1. DO a BCP out to Text File
2. Convert the Text File to Excel
I would recommend this.
"Omnibuzz" wrote:
> 1.Use BULK INSERT
> 2 Opendatasource
> INSERT INTO
> OpenDataSource('Microsoft.Jet.OLEDB.4.0' ,
> 'Data Source="D:\testsource\testsource.xls";Extended properties=Excel
> 5.0')...sheet1$
> SELECT col1,col2 from table_name
> But, the excel should have the columns and should be on the server.
> Hope this helps
> --
>
>
> "jaylou" wrote:
>