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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
bufoss
Posts: 8
Joined: 22 Nov 2016 13:46

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

#1 Post by bufoss » 26 Jan 2017 12:56

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

Post Reply