2.12. SQL*Plus with Active State Perl

Perl is another language that integrates well with SQL*Plus scripts. The following is a Perl program that invokes the SQL*Plus script, Query_V1.SQL.

#######################################################
#
# Script Filename: query_v1.pl
#
# run this program with CMD> perl query_v1.pl
#######################################################
use Win32;
$Str1       = "sqlplus scott/tiger@ora10 ";
$Str2       = "@c:\my_sqlplus\query_v1 ";
$Argument1  = "status";

$Program = $Str1.$Str2.$Argument1;
system( "start $Program" );
print "end of program 
"

You can embed the invocation of Perl scripts within batch scripts. You can invoke SQL*Plus from batch scripts or from Perl. You have many options to intermix scripting languages with SQL*Plus.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.217.41