Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

want to Access Oracle through perl

Status
Not open for further replies.

ifxtechie

Technical User
Dec 22, 2000
127
US
Hi,
I posted this message in PERL forum, but infortunately I did not get any answer.
[thread219-730649 ]
Hence I am posting it here. Pls help me to access my oracle database through PERL. The posted one is for DB2. But I did for Oracle also and could not succeed. I could not find ora.pm file. Do I need to have Visual-c++. Is it compulsory, one of my friends was telling that.
I have installed Active Perl [5.8]. I want to access my DB2 and Oracle databases. Hence I downloaded the DBD for DB2 [version .76]. When I tried to build on DBD, as said in README file, using the command
perl -w Makefile.PL
it went fine.
But I got errors in the second step when making using nmake.
C:\DBD-DB2-0.76>nmake

Microsoft (R) Program Maintenance Utility Version 7.00.9254
Copyright (C) Microsoft Corporation. All rights reserved.

cp lib/Bundle/DBD/DBI.pm blib\lib\Bundle\DBD\DBI.pm
cp DB2.pm blib\lib\DBD\DB2.pm
cp DBI.pm blib\lib\DBD\DBI.pm
cp lib/Bundle/DBD/DB2.pm blib\lib\Bundle\DBD\DB2.pm
cp DB2.pod blib\lib\DBD\DB2.podcp Constants.pm ..\blib\lib\DBD\DB2\Constants.pm
AutoSplitting ..\blib\lib\DBD\DB2\Constants.pm (..\blib\lib\auto\DBD\DB2\Constants)
C:\perl\bin\perl.exe C:\perl\lib\ExtUtils/xsubpp -typemap C:\Perl\lib\ExtUtils\typemap Constants.xs > Constants.xsc && C:\perl\bin\perl.exe -MExtUtils
::Command -e mv Constants.xsc Constants.c
cl -c -I"C:/DB2/IBM/SQLLIB/include" -nologo -Gf -W3 -MD -Zi -DNDEBUG -
O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.20\" -DXS_VERSION=\"0.20\" "-IC:\Perl\lib\CORE" Constants.c
cl : Command line warning D4029 : optimization is not available in the standard edition compiler Constants.c
c:\perl\lib\CORE\win32.h(61) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'Stop.

Can anybody pls tell me how to proceed with this. What are the requirements.
Thanks in advance
ifxTechie.
 
Hi, Info on how to build a DB2 DBD is not likely to come from Oracle folk. In my Perl install ( from perl.org), the Oracle DBI/DBD worked fine out of the box, so I cannot see what problem you may be having without more info.
Does ActivePerl support Oracle DBI/DBD? Is your Oracle client installed with its libraries?

[profile]
 
Hi Turkbear,
Thanks for the reply. I also installed perl from perl.org
Also, I downloaded DBI-1.39.tar.gz and DBD-Oracle-1.14.tar.gz abd tried to build. But I got these errors. I tried to manupulate copying .h files but ultimately make failed. Can you pls look into these errors and suggest me how to proceed. Or if you have any clean step-procedure pls let me know.
Thanks
Partha



C:\DBI-1.39>perl -w Makefile.PL

*** You are using a perl configured with threading enabled.
*** You should be aware that using multiple threads is
*** not recommended for production environments.

*** Note:
The optional PlRPC-modules (RPC::plServer etc) are not installed.
If you want to use the DBD::proxy driver and DBI::proxyServer
modules, then you'll need to install the RPC::plServer, RPC::plClient,
Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you.
You can install them any time after installing the DBI.
You do *not* need these modules for typical DBI usage.

Optional modules are available from any CPAN mirror, in particular
ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module

Creating extra DBI::purePerl test: t/zz_01basics_pp.t
Creating extra DBI::purePerl test: t/zz_02dbidrv_pp.t
Creating extra DBI::purePerl test: t/zz_03handle_pp.t
Creating extra DBI::purePerl test: t/zz_04mods_pp.t
Creating extra DBI::purePerl test: t/zz_05thrclone_pp.t (use threads)
Creating extra DBI::purePerl test: t/zz_06attrs_pp.t
Creating extra DBI::purePerl test: t/zz_07kids_pp.t
Creating extra DBI::purePerl test: t/zz_08keeperr_pp.t
Creating extra DBI::purePerl test: t/zz_10examp_pp.t
Creating extra DBI::purePerl test: t/zz_15array_pp.t
Creating extra DBI::purePerl test: t/zz_20meta_pp.t
Creating extra DBI::purePerl test: t/zz_30subclass_pp.t
Creating extra DBI::purePerl test: t/zz_40profile_pp.t
Creating extra DBI::purePerl test: t/zz_41prof_dump_pp.t
Creating extra DBI::purePerl test: t/zz_42prof_data_pp.t
Creating extra DBI::purePerl test: t/zz_60preparse_pp.t
Creating extra DBI::purePerl test: t/zz_80proxy_pp.t
Checking if your kit is complete...
Looks good

Remember to actually *read* the README file!
Use 'make' to build the software (dmake or nmake on Windows).
Then 'make test' to execute self tests.
Then 'make install' to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.

Windows users need to use the correct make command.
That may be nmake or dmake depending on which Perl you are using.
If using the Win32 ActiveState build then it is recommended that you
use the ppm utility to fetch and install a prebuilt DBI instead.

Writing Makefile for DBI

C:\DBI-1.39>nmake

Microsoft (R) Program Maintenance Utility Version 7.00.9254
Copyright (C) Microsoft Corporation. All rights reserved.

C:\perl\bin\perl.exe -MExtUtils::Command -e cp Changes blib\lib\DBI\Chan
ges.pm
cp dbd_xsh.h blib\arch\auto\DBI\dbd_xsh.h
cp lib/DBI/FAQ.pm blib\lib\DBI\FAQ.pm
cp Driver_xst.h blib\arch\auto\DBI\Driver_xst.h
cp lib/DBD/Proxy.pm blib\lib\DBD\Proxy.pm
cp lib/DBI/Const/GetInfo/ANSI.pm blib\lib\DBI\Const\GetInfo\ANSI.pm
cp DBIXS.h blib\arch\auto\DBI\DBIXS.h
cp lib/DBI/Const/GetInfoReturn.pm blib\lib\DBI\Const\GetInfoReturn.pm
cp DBI.pm blib\lib\DBI.pm
cp lib/DBD/Sponge.pm blib\lib\DBD\Sponge.pm
cp lib/DBI/Const/GetInfoType.pm blib\lib\DBI\Const\GetInfoType.pm
cp lib/DBI/W32ODBC.pm blib\lib\DBI\W32ODBC.pm
cp lib/DBI/DBD/Metadata.pm blib\lib\DBI\DBD\Metadata.pm
cp lib/DBI/Const/GetInfo/ODBC.pm blib\lib\DBI\Const\GetInfo\ODBC.pm
cp lib/DBI/ProfileDumper/Apache.pm blib\lib\DBI\ProfileDumper\Apache.pm
cp lib/Bundle/DBI.pm blib\lib\Bundle\DBI.pm
cp lib/DBI/Profile.pm blib\lib\DBI\Profile.pm
cp lib/DBI/ProfileDumper.pm blib\lib\DBI\ProfileDumper.pm
cp Driver.xst blib\arch\auto\DBI\Driver.xst
cp lib/DBI/ProxyServer.pm blib\lib\DBI\ProxyServer.pm
cp dbipport.h blib\arch\auto\DBI\dbipport.h
cp lib/DBD/NullP.pm blib\lib\DBD\NullP.pm
cp lib/DBI/DBD.pm blib\lib\DBI\DBD.pm
cp lib/Win32/DBIODBC.pm blib\lib\Win32\DBIODBC.pm
cp lib/DBI/PurePerl.pm blib\lib\DBI\PurePerl.pm
cp lib/DBD/ExampleP.pm blib\lib\DBD\ExampleP.pm
cp dbi_sql.h blib\arch\auto\DBI\dbi_sql.h
cp lib/DBI/ProfileData.pm blib\lib\DBI\ProfileData.pm
C:\perl\bin\perl.exe -p -e "s/~DRIVER~/Perl/g" blib\arch\auto\DBI/Driver
.xst > Perl.xsi
C:\perl\bin\perl.exe C:\perl\lib\ExtUtils/xsubpp -typemap C:\Perl\lib\ExtUtils\typemap -typemap typemap Perl.xs > Perl.xsc && C:\perl\bin\perl.exe -MExtUtils::Command -e mv Perl.xsc Perl.c
cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"1.39\" -DXS_VERSION=\"1.39\" "-IC:\Perl\lib\CORE" Perl.c
cl : Command line warning D4029 : optimization is not available in the standard edition compiler
Perl.c
c:\perl\lib\CORE\win32.h(61) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

C:\DBI-1.39>nmake

Microsoft (R) Program Maintenance Utility Version 7.00.9254
Copyright (C) Microsoft Corporation. All rights reserved.

cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"1.39\" -DXS_VERSION=\"1.39\" "-IC:\Perl\lib\CORE" Perl.c
cl : Command line warning D4029 : optimization is not available in the standard edition compiler
Perl.c
C:\perl\lib\CORE\WINDOWS.H(163) : fatal error C1083: Cannot open include file: 'windef.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

C:\DBI-1.39>nmake

Microsoft (R) Program Maintenance Utility Version 7.00.9254
Copyright (C) Microsoft Corporation. All rights reserved.

cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"1.39\" -DXS_VERSION=\"1.39\" "-IC:\Perl\lib\CORE" Perl.c
cl : Command line warning D4029 : optimization is not available in the standard edition compiler
Perl.c
C:\perl\lib\CORE\WINDOWS.H(28) : warning C4068: unknown pragma
C:\perl\lib\CORE\WINDOWS.H(200) : fatal error C1083: Cannot open include file: 'windef.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

C:\DBI-1.39>nmake

Microsoft (R) Program Maintenance Utility Version 7.00.9254
Copyright (C) Microsoft Corporation. All rights reserved.

cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"1.39\" -DXS_VERSION=\"1.39\" "-IC:\Perl\lib\CORE" Perl.c
cl : Command line warning D4029 : optimization is not available in the standard edition compiler
Perl.c
C:\perl\lib\CORE\WINDOWS.H(28) : warning C4068: unknown pragma
C:\perl\lib\CORE\WINDOWS.H(200) : fatal error C1083: Cannot open include file: 'windef.h': No such file or directory
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

C:\DBI-1.39>nmake

Microsoft (R) Program Maintenance Utility Version 7.00.9254
Copyright (C) Microsoft Corporation. All rights reserved.

cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"1.39\"
-DXS_VERSION=\"1.39\" "-IC:\Perl\lib\CORE" Perl.c
cl : Command line warning D4029 : optimization is not available in the standard edition compiler
Perl.c
C:\perl\bin\perl.exe C:\perl\lib\ExtUtils/xsubpp -typemap C:\Perl\lib\ExtUtils\typemap -typemap typemap DBI.xs > DBI.xsc && C:\perl\bin\perl.exe -MExt
Utils::Command -e mv DBI.xsc DBI.c
cl -c -nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"1.39\"
-DXS_VERSION=\"1.39\" "-IC:\Perl\lib\CORE" DBI.c
cl : Command line warning D4029 : optimization is not available in the standard edition compiler
DBI.c
DBI.xs(3245) : warning C4244: '=' : conversion from 'IV' to 'U16', possible loss
of data
DBI.xs(3246) : warning C4244: '=' : conversion from 'IV' to 'U16', possible loss of data
DBI.xs(3247) : warning C4244: '=' : conversion from 'IV' to 'short', possible loss of data
DBI.xs(3252) : warning C4244: '=' : conversion from 'IV' to 'short', possible loss of data
DBI.xs(3253) : warning C4244: '=' : conversion from 'IV' to 'short', possible loss of data
Running Mkbootstrap for DBI ()
C:\perl\bin\perl.exe -MExtUtils::Command -e chmod 644 DBI.bs
C:\perl\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NAME'=>\"DBI\", 'DLBASE' => 'DBI', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
link -out:blib\arch\auto\DBI\DBI.dll -dll -nologo -nodefaultlib -debug - opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86 DBI.obj C:\Perl\lib\CORE\perl58.lib oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg
32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib -def:DBI.def
LINK : fatal error LNK1181: cannot open input file 'user32.lib'
NMAKE : fatal error U1077: 'link' : return code '0x49d'
Stop.

C:\DBI-1.39>

 
Hi,
Looks like the compiler doesn't know where some of your include files are located..
Check the configuration/options -
are those files actually on your workstation somewhere?

[profile]
 
Yes, Compiler could not find certain files. First like windows.h then windef.h,... I searched and included those files into c:\PERL\Lib\CORE directory as I don't know which variable needs to be set up. [On unix, I know it is LIB and LD_LIBRARY.] When I included then it compiled but gave the error at the time of linking. This is my windows-2000 machine. Do you think that I need to set up something -like env varaibles...
Thanks
Partha
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top