Unanswered: special characters(#,$) in oracle password
Oracle Database : 10g
OS : HP Unix
Above are my environment details.
I'm trying to connect to oracle by keeping username/password@dbname in a particular file and trying to read the login string from that file.
username : scott
password : tiger12#$
database : orcl
when i connect from unix as below it works..
$sqlplus scott/tiger12#\$@orcl (observer "\")
$sqlplus "scott/tiger12#$ @orcl" (observer space)
But, when i keep the same value in a file and read, it says... ORA-12545: Connect failed because target host or object does not exist
for example i'm doing like
#here i'm storing only username/password@dbname
In my script...
login=`cut -f1 file1.sh`
sqlplus -s $login <<EOF
select * from table;
when i run the script.sh, i was hit with above error ORA-12545.
Can anyone suggest a way to find solution.
In order to find the error, you need to do some experiments.
First, change your password so that it does not contain any meta characters, and then change the contents of file1.sh to suit.
If this connection string fails then you need to look at how $login is evaluated.
If the simplified password passes then you need to further test the use of meta characters and back slashes or the lack thereof, in your script.
Also it would help to know what operating system you are using, and whether you are using ksh, ksh93, or bash, or ???.