i am trying to connect Oracle database from Linux server where environment variables and tnsnames.ora cannot be modified.
I am using following code to connect which is working fine and i am able to connect database using sqlplus.
export ORACLE_HOME=/opt/oracle/product/112030_cl_64/cl
export PATH=/opt/oracle/product/112030_cl_64/cl/bin:$PATH
sqlplus myuser/mypass@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(Host=x)(Port=x)))(CONNECT_DATA=(SERVICE_NAME=x)))
Now i am not able to find any solution how can i execute it so that i don't need to execute it manually every time and i don't want to share the password with anyone else. i want to connect db using sqlplus from a shell script to spool data.
any lead would be appreciable. Thanks in advance.
ps?