Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Windows 2000 Server and Installing Perl

by Zo (Scribe)
on Oct 11, 2001 at 00:43 UTC ( #118102=note: print w/replies, xml ) Need Help??


in reply to Re: Windows 2000 Server and Installing Perl
in thread Windows 2000 Server and Installing Perl


Case I: windows 2000 professional, perl 5.6..., I was able to put it on my desktop and it works with the DBI 1.20 module from cpan. no problems.
Case II: windows 2000 server, perl 5.6..., I was able to load on this simple server and script runs with DBI 1.2 module from cpan. no problems.
Case III: Windows 2000 server, v5.6.1 built for MSWin32-x86-multi-thread ,I have a simple "hello world" type of file (test.pl) and it shows my hello message. I get the same download DBI 1.2 and then try to run my script (code will soon follow) and I get this error here and not on the first two cases.:
DBD::Oracle::db prepare failed: ORA-00942: table or view does not exist (DBD ERR OR: OCIStmtExecute/Describe) at C:\Perl\connect_2.pl line 28. Can't call method "execute" on an undefined value at C:\Perl\connect_2.pl line 2 9.
here is the code:
#!perl ######################################################### # This perl script will go to the oracle database, run a query, extrac +t data and # create a text (.txt) file with data information for a batch # process to use. # # # October 4, 2001 ######################################################### use DBI; # output file $newfile = "./batch_test.txt"; # open the new .txt file open(BATCH, ">$newfile") || die "Can't open $newfile : the batch_test +file. $!"; # variable with query to go against cscadmin.crs_batch_lines table $asql = "SELECT batch_line FROM admin.batch_lines WHERE exe_c = 'N' +"; $bsql = "UPDATE admin.batch_lines SET exe_c = 'Y' WHERE exe_c = 'N' "; # connect to oracle and extract data my $dbh = DBI->connect("dbi:Oracle:Db001", "develop", "developer"); my $statement = $dbh->prepare($asql); $statement ->execute(); while ($newfile= $statement->fetchrow_array) { $newfile=~s/D:/\nD:/g; # write to the file print BATCH $newfile; print $newfile; } $statement->finish(); # Mark batch lines in table as read my $statement2 = $dbh->prepare($bsql); $statement2 ->execute(); $statement2->finish(); # close oracle connection $dbh->disconnect(); $dbh2->disconnect(); # close new .txt file close (BATCH);


The following is what I see when i do a perl -V:
C:\Perl\bin>perl -V Summary of my perl5 (revision 5 version 6 subversion 1) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultip +licity=def ine useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DN +O_STRICT - DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_M +SVCRT_READ FIX', optimize='-O1 -MD -DNDEBUG', cppflags='-DWIN32' ccversion='', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize =4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"C:\ +Perl\lib\C ORE" -machine:x86' libpth="C:\Perl\lib\CORE" libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib + comdlg32 .lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uui +d.lib wsoc k32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt. +lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool +.lib comd lg32.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 msv +crt.lib libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -l +ibpath:"C: \Perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEX +T PERL_IMP LICIT_SYS Locally applied patches: ActivePerl Build 629 Built under MSWin32 Compiled at Aug 20 2001 12:27:04 @INC: C:/Perl/lib C:/Perl/site/lib .
any suggestions????
and I'm sorry to keep nagging with this issue, trust me I too want it to work!!!
thank you all...
desperate brother Zo.

Replies are listed 'Best First'.
Re: Re: Re: Windows 2000 Server and Installing Perl
by rrwo (Friar) on Oct 17, 2001 at 14:25 UTC

    Whoa a minute! You wrote:

    Case III: Windows 2000 server, v5.6.1 built for MSWin32-x86-multi-thread ,I have a simple "hello world" type of file (test.pl) and it shows my hello message. I get the same download DBI 1.2 and then try to run my script (code will soon follow) and I get this error here and not on the first two cases.: DBD::Oracle::db prepare failed: ORA-00942: table or view does not exist (DBD ERR OR: OCIStmtExecute/Describe) at C:\Perl\connect_2.pl line 28. Can't call method "execute" on an undefined value at C:\Perl\connect_2.pl line 2 9.

    Sounds like you're not connecting to the correct database, hence the invalid tables or views. So you can't create a statement handle.

    Do you have an updated tnsnames.ora file installed on that machine? Otherwise it won't know where the database is on the network.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://118102]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2019-07-17 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?