Database Utilities (MOSC)

MOSC Banner

how to ignore glogin.sql and login.sql when sqlplus connects

I have a shell script, which has contents as follows: 

#===============

sqlplus_output=`sqlplus / as sysdba <<-EOF

-- some sql statements here.

exit;

EOF`

# parse sqlplus_output

# shell commands

#=================


And I have a glogin.sql under $ORACLE_HOME/sqlplus/admin, which includes some commands like 

# ==========

set feedback on;

select name from v$database;

alter session set container=xxx;

# ==================


Since sqlplus always execute glogin.sql before execute my commands in the shell script, The output of glogin.sql has added some unrequired content to sqlplus_output.


Question: 


is there an approach to ignore glogin.sql and login.sql when sqlplus connects? 


Note: I can not remove or update the existing glogin.sql or login.sql, as they are used by other applications. I only want they are ignored when sqlplus is executed by my shell script.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center