Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Regarding glogin.sql

Hi
I have created $ORACLE_HOME/sqlplus/admin/glogin.sql and I am trying to execute the below script from the sqlprompt
whenever sqlerror exit sql.sqlcode
connect / as sysdba
set echo on
select status from v$instance;
SQL Command> $ORACLE_HOME/bin/sqlplus / as sysdba @script.sql
I have purposely shut down the database and jave executed the above script and I get the below ouput
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to an idle instance.
Connected to an idle instance.
Disconnected
if the glogin .sql script was not present the output woruld differ to
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to an idle instance.
Connected to an idle instance.
SQL> select status from v$instance;
select status from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

Can someone explain me whey is the change of behavior with glogin and without the same script.

Comments
Post Details
Added on Jul 21 2022
2 comments
242 views