Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> re: perl and sqlplus

re: perl and sqlplus

From: <jhouriha_at_my-deja.com>
Date: Wed, 13 Sep 2000 02:44:40 GMT
Message-ID: <8pmpmj$6vg$1@nnrp1.deja.com>

how does one open up sqlplus
with system or exec or qw or a here document.... and do a shutdown immediate

I have tried the following below but have been unsucessful I want to be able to shutdown an oracle instance from a perl script

my $user='internal';my $pass='manager';my $dsn='db.db.com'; $|=1;
system(
qq{
sqlplus -s<<EOF
$user/$pass\@$dsn
shutdown immediate
exit
<<EOF

my $user='internal';my $pass='manager';my $dsn='db.db.com'
my $sqlplus='sqlplus -s $user/$pass\@dsn;'
my $return_value=system($sqlplus);<<EOF

shutdown immediate
exit
<<EOF
print "system returned $return_value\n";
~
~

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Sep 12 2000 - 21:44:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US