I have a bash script that connects to an oracle 10g database.
In a first step it takes some variables from a "config" file with the following command
. /path/to/my/configfile.ini
In the config file there are some variables:
export USRID=myUser
export USRID_PASS=myPassword
export USR_PASS="$USRID/$USRID_PASS@myDatabase"
Then it actually connects through sqlplus using the command:
sqlplus -s $usr_pass
Terrible Security and Design issues aside (this script has been around for 5 years). This is actually doing its job in one of our UNIX servers, but not in another.
When I run the script with bash -x
, I can see that the command expanded to:
sqlplus -s myUser/myPassword@myDatabase
...which should do fine (and is actually working in one server), but the response in the failing server is:
ERROR: ORA-01017: invalid username/password; logon denied
SP2-0306: Invalid option. Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] where ::= [/][@] | SP2-0306: Invalid option.
I'm guessing it has to do more with bash than with oracle, but I'm no bash expert. Is there some configuration or detail I'm missing?
EDIT:
Trying to pin down the problem a bit more, I'm now running two versions of the script in a third development server, and in different tests, the login works if i do it with:
sqlplus -s $usrid/$usrid_pass@myDatabase
but not when i try:
sqlplus -s $usr_pass
So its a bit annoying.
Besides that, i'll have to check on te config file synchronization process... I'll let you know when i get to something new. Thanks everybody.
The message is pretty clear:
This indicates there isn't really anything wrong with your client configuration.
So, that leaves you with
Possibilites: