#!/usr/bin/perl -w
use strict;
use DBI;
my $dbh = DBI->connect( 'DBI:Oracle:charith',
'user',
'passwd',
{
RaiseError => 1,
PrintError => 1
}
) || die "Database connection not made: $DBI::errstr";
my $sth = $dbh->prepare('SHOW PARAMETER MEMORY');
$sth->execute( );
my @row;
while ( @row = $sth->fetchrow_array( ) ) {
print "Row: @row\n";
}
warn "Data fetching terminated early by error: $DBI::errstr\n"
if $DBI::err;
$sth->finish();
$dbh->disconnect();
####
DBD::Oracle::st execute failed: ORA-00900: invalid SQL statement (DBD ERROR: OCIStmtExecute) [for Statement "SHOW PARAMETER MEMORY"] at ./testBase.pl line 26.
####
Expected OUT:
SQL> SHOW PARAMETER MEMORY
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 11232M
memory_target big integer 11232M
shared_memory_address integer 0
SQL>