Page 1 of 1

Problem in connecting sqlplus via cmd (based on versions of sqlplus)

Posted: 26 Jan 2017 12:56
by bufoss
Hi all,
I am writing a batch program to connect to multiple sids for the same hostname.
The issue I have is that while the script runs perfectly for me,when I give to other colleagues
to use it they complaints that it does not work


Version 11

:==> it works for me
exit | sqlplus -s user/password@hostname:portnumber/sid as SYSDBA @script.sql

:==> it does not work for me
sqlplus -s user@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=portnumber))(CONNECT_DATA =(SID = sid)) as SYSDBA @script.sql


Version 8

:==> it does not work
exit | sqlplus -s user/password@hostname:portnumber/sid as SYSDBA @script.sql

:==> it works , but a new open is opened in each execution
sqlplus -s user@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=portnumber))(CONNECT_DATA =(SID = sid)) as SYSDBA @script.sql

Is there any way to check the version of sqlplus inside the script without connecting ?

Any ideas ?

Thanks a lot