-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default search path for SQL*Plus does not match Oracle documentation #747
Comments
Yeah if you just unzip the package there is no bin directory:
|
I guess that Instant Client and ORACLE_HOME Client are different things, per https://www.oracle.com/database/technologies/faq-instant-client.html Definitely not an expert here, but maybe it's possible that docker-sqitch should not be relying on ORACLE_HOME but rather just PATH? |
I would defer to people who use Oracle regularly, but TBH I've never seen a standard location for any of this stuff. Hence |
Not sure how that'd change anything, unless someone is passing |
Well, I guess that I meant is that if Sqitch were changed to look in the path recommended by Oracle for SQL*Plus ($ORACLE_HOME/bin), then the sqitch-oracle Docker image wouldn't be providing the right ORACLE_HOME. |
To change it, we'd have to:
After which it would all work pretty much as it did before. I think in the absence of someone complaining that it's wrong and input from an experienced Oracle person declaring what's the right way to do it and what's not, I'm inclined to leave it as-is. In 10+ years I don't recall it being an issue. |
@theory Or just set The issue that I'm seeing is that in a full Oracle install (i.e., not the Sqitch docker image / not the instant client), Sqitch is not finding SQL*Plus because the |
I think it would make sense to change |
Seems reasonable! |
Something like this: if ($ENV{ORACLE_HOME}) {
my $bin = file $ENV{ORACLE_HOME}, 'bin', 'sqlplus';
return $bin if -x $bin;
$bin = file $ENV{ORACLE_HOME}, 'sqlplus';
return $bin if -x $bin;
}
return file 'sqlplus'; |
Some installations of SQL*Plus live in `$ORACLE_HOME/bin` rather than just in `$ORACLE_HOME`. So refine `default_client()` to search for an executable file in `$ORACLE_HOME/bin` and return that value if it exists, then look for an executable file in `$ORACLE_HOME` and return it if it exists. Otherwise simply return `sqlplus`. This changes the previous behavior where it would always return `$ORACLE_HOME/sqlplus` if `$ORACLE_HOME` is set. Now it will fall back on a path search if `sqlplus` isn't in `ORACLE_HOME` even when `ORACLE_HOME` is set. Resolves #747.
According to Oracle documentation,
However, we just look in $ORACLE_HOME:
sqitch/lib/App/Sqitch/Engine/oracle.pm
Line 81 in afe87ce
I guess if this is changed then a change would also be required to docker-sqitch since that seems to work currently.
The text was updated successfully, but these errors were encountered: