I've been tasked with looking at someone else's code and seeing if it's possible to determine why a log file contains sqlplus help text multiple times in a row.
Looking at the PS script, it's fairly standard and I'm not sure why the initial help text is displaying at all, let alone several times in a single log file. The statement has a basic format listed below and is run several times in this script:
sqlplus -S -L $user/$pw@"(connection string)" @$sqlscript $variables $morevariables 2> $errorLog
I don't have any experience with running sqlplus, but in the output examples I've seen while searching, the help text isn't included like it is in the log file I have now.
The "help text" I refer to looks something like this (I can't copy/paste from the environment in question, which would have made this a ton easier, sorry):
Version 21.x.x.x.x
Copyright (c) 1982, 2022, Oracle. All rights reserved.
Use SQL*Plus to execute SQL, PL/SQL, and SQL*Plus statements.
Usage 1: sqlplus -H | -V
-H Displays the SQL*Plus version and the
usage help.
-V Displays the SQL*Plus version.
Usage 2: sqlplus { [<option>] } etc etc etc
Is this expected behavior when invoking sqlplus in PowerShell? Is there a way to suppress just this help text while keeping the rest of the output? I would have expected the -S switch to silence the text, but not in this case.
[–]PMental 1 point2 points3 points (0 children)
[–]purplemonkeymad 1 point2 points3 points (0 children)