02-27-2008
Quote:
Originally Posted by
Vijayakumarpc
Hi Friends,
I am having Perl 5 and Oracle 9i. I just wanna to connect Oracle DB & to perform some select query statement.
Could anyone pls let me know.
I've tried below command which i found in some website, But it throws some error.
Executed:
perl -e 'use DBI; print $DBI::VERSION,"\n";'
Output
Can't locate DBI.pm in @INC (@INC contains: /usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib /usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1 /usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int /usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
and I am not familiar with Perl. When i search for help on Google, I've found some reply like, DBI should be installed. Is this so. or are there any other way instead of using DBI.
Thanks in Advance,
Vijay,
Well then, you should have a quick look at this
Oracle FAQ: DBI DBD::Oracle and OraPerl FAQ and this
The CPAN Search Site - search.cpan.org
its easy as abc
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
HI,
So far i have been worked on sybase with perl and ksh scripts, i don't know how to connect using oralce, if any body could explain that is great.
Thanks in advance.
chendra (3 Replies)
Discussion started by: chendra.putta
3 Replies
2. Shell Programming and Scripting
Hi,
I am a new user, who wants to connect to oracle through shell scripting.
Can anybody help me?
Regards,
Divyesh (2 Replies)
Discussion started by: divyesh shah
2 Replies
3. Shell Programming and Scripting
I want to use Perl to connect to a remote Oracle DB
I have no oracle installation on my server (and dont plan on installing one) I am using solaris 9 on x86 server.
Is this possible?
I basically want to run some basic sql queries on the remote oracle db which I have access to using perl on my... (0 Replies)
Discussion started by: frustrated1
0 Replies
4. Shell Programming and Scripting
Hello,
Returing to Unix scripts after a long while,
This might be a simple question for most of you ,
I need to connect from a .sh script to oracle, select XYZ.nextval from dual ,
, meaning either get the Current Val or Next Val for a sequence.
How do I store the return value , I know... (2 Replies)
Discussion started by: Shanks
2 Replies
5. Programming
I am novice to perl. Can someone guide me on the below query. We have an existing perl script which connects to database to check the disk group status which i wanted to retieve directly from ASM rather than database.
This is because, a cluster has more than 4 databases running and a check on... (0 Replies)
Discussion started by: sai_rsk
0 Replies
6. UNIX for Dummies Questions & Answers
In unix i login as root but when i am conneting to SQL as sqlplus "/ as sysdba" then its telling "sh: sqlplus: not found".. (6 Replies)
Discussion started by: ripudaman.singh
6 Replies
7. Shell Programming and Scripting
I need to connect my Oracle 11g DB from shell script with 'sysdba' permissions. To do this I have to switch user from 'root' to 'oracle'.
I've tried the following with no success.
su - oracle -c "<< EOF1
sqlplus -s "/ as sysdba" << EOF2
whenever sqlerror exit sql.sqlcode;... (2 Replies)
Discussion started by: NetBear
2 Replies
8. Shell Programming and Scripting
I am novice to perl. Can someone guide me on the below query. We have an existing perl script which connects to database to check the disk group status which i wanted to retieve directly from ASM rather than database.
This is because, a cluster has more than 4 databases running and a check on... (1 Reply)
Discussion started by: sai_rsk
1 Replies
9. Shell Programming and Scripting
I try to connect to Oracle through cygwin, but it fails.
The Oracle version 11.2 is installed on a Windows 2003 server.
Cygwin and Perl is installed on the same server.
cygwin>uname -a
CYGWIN_NT-5.2 N0871 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin
cygwin>perl -v
This is perl, v5.10.1... (3 Replies)
Discussion started by: MSiipola
3 Replies
10. UNIX and Linux Applications
Good evening
I nned your help pls, In an unix server i want to connect to a remote oracle databse server by sqlplus.
I tried to find out the user/passwd and service name by env variable and all Ive got is this:
ORACLE_SID_REPCOL=SCL_REPCOL
ORACLE_SID=xmeta
ORACLE_SID_TOL=SCL_PROTOLCOL... (2 Replies)
Discussion started by: alexcol
2 Replies
LEARN ABOUT MOJAVE
config::perl::v
Config::Perl::V(3pm) Perl Programmers Reference Guide Config::Perl::V(3pm)
NAME
Config::Perl::V - Structured data retrieval of perl -V output
SYNOPSIS
use Config::Perl::V;
my $local_config = Config::Perl::V::myconfig ();
print $local_config->{config}{osname};
DESCRIPTION
$conf = myconfig ()
This function will collect the data described in "the hash structure" below, and return that as a hash reference. It optionally accepts an
option to include more entries from %ENV. See environment below.
Note that this will not work on uninstalled perls when called with "-I/path/to/uninstalled/perl/lib", but it works when that path is in
$PERL5LIB or in $PERL5OPT, as paths passed using "-I" are not known when the "-V" information is collected.
$conf = plv2hash ($text [, ...])
Convert a sole 'perl -V' text block, or list of lines, to a complete myconfig hash. All unknown entries are defaulted.
$info = summary ([$conf])
Return an arbitrary selection of the information. If no $conf is given, "myconfig ()" is used instead.
$md5 = signature ([$conf])
Return the MD5 of the info returned by "summary ()" without the "config_args" entry.
If "Digest::MD5" is not available, it return a string with only 0's.
The hash structure
The returned hash consists of 4 parts:
build
This information is extracted from the second block that is emitted by "perl -V", and usually looks something like
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING USE_64_BIT_INT USE_LARGE_FILES
Locally applied patches:
defined-or
MAINT24637
Built under linux
Compiled at Jun 13 2005 10:44:20
@INC:
/usr/lib/perl5/5.8.7/i686-linux-64int
/usr/lib/perl5/5.8.7
/usr/lib/perl5/site_perl/5.8.7/i686-linux-64int
/usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl
.
or
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY
PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP PERL_TRACK_MEMPOOL
PERL_USE_SAFE_PUTENV USE_ITHREADS
USE_LARGE_FILES USE_PERLIO
USE_REENTRANT_API
Built under linux
Compiled at Jan 28 2009 15:26:59
This information is not available anywhere else, including %Config, but it is the information that is only known to the perl binary.
The extracted information is stored in 5 entries in the "build" hash:
osname
This is most likely the same as $Config{osname}, and was the name known when perl was built. It might be different if perl was
cross-compiled.
The default for this field, if it cannot be extracted, is to copy $Config{osname}. The two may be differing in casing (OpenBSD vs
openbsd).
stamp
This is the time string for which the perl binary was compiled. The default value is 0.
options
This is a hash with all the known defines as keys. The value is either 0, which means unknown or unset, or 1, which means defined.
derived
As some variables are reported by a different name in the output of "perl -V" than their actual name in %Config, I decided to leave
the "config" entry as close to reality as possible, and put in the entries that might have been guessed by the printed output in a
separate block.
patches
This is a list of optionally locally applied patches. Default is an empty list.
environment
By default this hash is only filled with the environment variables out of %ENV that start with "PERL", but you can pass the "env"
option to myconfig to get more
my $conf = Config::Perl::V::myconfig ({ env => qr/^ORACLE/ });
my $conf = Config::Perl::V::myconfig ([ env => qr/^ORACLE/ ]);
config
This hash is filled with the variables that "perl -V" fills its report with, and it has the same variables that "Config::myconfig"
returns from %Config.
inc This is the list of default @INC.
REASONING
This module was written to be able to return the configuration for the currently used perl as deeply as needed for the CPANTESTERS
framework. Up until now they used the output of myconfig as a single text blob, and so it was missing the vital binary characteristics of
the running perl and the optional applied patches.
BUGS
Please feedback what is wrong
TODO
* Implement retrieval functions/methods
* Documentation
* Error checking
* Tests
AUTHOR
H.Merijn Brand <h.m.brand@xs4all.nl>
COPYRIGHT AND LICENSE
Copyright (C) 2009-2013 H.Merijn Brand
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.18.2 2014-01-06 Config::Perl::V(3pm)