We would like to start the observer with a script, but don’t want to provide the password on the command line. We have a framework in place which expects the oracle tool to ask for the password, unfortunate it seems not to be possible to use the same behaviour when using a tns connect string on the commandline.
Example:
1 2 3 4 5 6 7 |
[XXXXXX]oh12102160719V4b@YYYYYY:/lfs/oracle/ora12102160719V4b$ dgmgrl sys DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production Copyright (c) 2000, 2013, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. Password: |
Now with a tns entry specified on line:
1 2 3 4 5 6 |
[XXXXXX]oh12102160719V4a@YYYYYY:/lfs/oracle/ora12102160719V4a$ dgmgrl sys@ZZZZZZ Unknown option: sys@ZZZZZZ Usage: dgmgrl [<options>] [<logon> [<command>]] <options> ::= -silent | -echo <logon> ::= <usename>/<password>[@<connect_identifier>] <command> ::= <one DGMGRL command> |
After raising an SR with Oracle, they confirmed we hit BUG 21698350 – BROKER DGMGRL SHOULD PROMPT FOR PASSWORD WHEN USING A TNSNAME TO CONNECT, which is solved in 12.2.
Oracle has released patch 21698350 for 12.1.0.2 as well, so let’s try:
After the patch:
1 2 3 4 5 6 7 |
[XXXXXX]oh12102160719V4b@YYYYYY:/lfs/oracle/ora12102160719V4b$ dgmgrl sys@ZZZZZZ DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production Copyright (c) 2000, 2013, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. Password: |
So issue fixed…..