in reply to SQLPLUS connect database

My script is only to verify database connection, database and listen is up.

Even for that purpose, I would use DBI and DBD::Oracle. It avoids messing with the default shell, and it avoids messing with SQLplus, which is absolutely not designed to be scripted.

DBI->connect(...) either works or fails, put that in a loop and report the collected pass/fail information.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^2: SQLPLUS connect database
by ytjPerl (Scribe) on Jul 24, 2019 at 13:49 UTC
    unfortunately, DBI would not be my option. I do not have internet access in Cloud.