ssh sqlplus command has $ symbol and it gets substituted
0
votes
1
answer
1276
views
I'm Running some SQLPLUS code over ssh.
ssh -q node1 'export ORACLE_SID=DB11D_1;ORAENV_ASK=NO;. oraenv >/dev/null 2>&1;sqlplus -s / as sysdba << ENDSQL
whenever sqlerror exit 1
alter system set wallet open identified by "Passwo$1";
exit;
ENDSQL'
It looks like the $1 in the password "Passwo$1" gets substituted. And that's causing the command to fail.
The command ends up turning into
alter system set wallet open identified by "Passwo"
*
ERROR at line 1:
ORA-28353: failed to open wallet
Any idea how do I preserve the "$1" in the SQLPLUS command?
I have tried the below
- alter system set wallet open identified by \"Passwo$1\";
- alter system set wallet open identified by \\\"Passwo$1\\\";
- alter system set wallet open identified by '\""Passwo$1""\';
I cannot add an escape to the $ symbol in the password. So I can't do
- alter system set wallet open identified by "Passwo\$1";
Thanks
Asked by A Sanghvi
(1 rep)
Dec 6, 2018, 11:03 AM
Last activity: Dec 6, 2018, 02:41 PM
Last activity: Dec 6, 2018, 02:41 PM