Feeds:
Posts
Comments

Archive for the ‘perl’ Category

Simple Perl Script

## Simple perl script to connect to Oracle database using DBI::Oracle#
#!/usr/bin/perl -w
# Get the count of the parametersmy $count=@ARGV;
# if paramters are not 3 exitif ($count!=3) {print “Usage: ./dbcon.pl [dbname] [user] [password]\n”;exit ;}
use strict;use DBI;
# Assign the parameter values to variablesmy $db=$ARGV[0];my $usr=$ARGV[1];my $pass=$ARGV[2];
# Connect to databasemy $dbh=DBI->connect(“dbi:Oracle:$db”,$usr,$pass) or die “Connection [...]

Read Full Post »

Perl DBD::Oracle

Installing Perl DBD::Oracle on linux
1. Download DBD::Oracle from the linkhttp://search.cpan.org/search for DBD-Oracle in modules
2. Uncompress the downloaded file$ gunzip DBD-Oracle-1.19.tat[1].gz
3. Untar the file$ tar -xvf DBD-Oracle-1.19.tat[1]$ cd DBD-Oracle-1.19
4. Login as root$ su – rootpassword: *****
5. Go to DBD-Oracle-1.19 directory$cd DBD-Oracle-1.19
6. Install the module$ export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1$ perl MakeFile.PL$ make$ make test$ make intall$ exit [exit from [...]

Read Full Post »