sql: sqlplus is sqlplus64 on AMD64.

This commit is contained in:
Ole Tange 2016-08-02 01:30:46 +02:00
parent cd9b2a4c24
commit a1757c141a

10
src/sql
View file

@ -566,7 +566,7 @@ $Global::Initfile && unlink $Global::Initfile;
exit ($err);
sub parse_options {
$Global::version = 20160722;
$Global::version = 20160724;
$Global::progname = 'sql';
# This must be done first as this may exec myself
@ -689,7 +689,9 @@ sub oracle_commands {
my ($database_driver,%opt) = (@_);
# oracle://user:pass@grum:1521/XE becomes:
# sqlplus 'user/pass@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = grum)(PORT = 1521)) (CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = XE) ))'
find_command_in_path("sqlplus") || die ("sqlplus not in path");
my $sqlplus = find_command_in_path("sqlplus") ||
find_command_in_path("sqlplus64") or
die ("sqlplus/sqlplus64 not in path");
# Readline support: if rlwrap installed run rlwrap sqlplus
my $rlwrap = find_command_in_path("rlwrap");
@ -729,8 +731,8 @@ sub oracle_commands {
my $ssl = "";
# -L: Do not re-ask for password if it is wrong
my $common_options = "-L $pass_through_options '$user$password\@$tns' \@$Global::Initfile";
my $batch_command = "sqlplus -S ".$common_options;
my $interactive_command = "$rlwrap sqlplus ".$common_options;
my $batch_command = "$sqlplus -S ".$common_options;
my $interactive_command = "$rlwrap $sqlplus ".$common_options;
return($batch_command,$interactive_command);
}