charithd has asked for the wisdom of the Perl Monks concerning the following question:
But This gives Error:#!/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::er +rstr"; 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();
This works fine with SELECT commands, Badly I'm new to perl:DBI please give some help.DBD::Oracle::st execute failed: ORA-00900: invalid SQL statement (DBD +ERROR: OCIStmtExecute) [for Statement "SHOW PARAMETER MEMORY"] at ./t +estBase.pl line 26.
ThanksExpected 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>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to use oracle SHOW commands with DBI
by runrig (Abbot) on Feb 17, 2012 at 16:32 UTC | |
|
Re: How to use oracle SHOW commands with DBI
by oko1 (Deacon) on Feb 17, 2012 at 07:09 UTC | |
by Anonymous Monk on Feb 17, 2012 at 07:24 UTC | |
by oko1 (Deacon) on Feb 17, 2012 at 07:38 UTC | |
|
Re: How to use oracle SHOW commands with DBI
by Anonymous Monk on Feb 17, 2012 at 08:55 UTC |