When you really need to run one script, at all cost, an annoying error is
ORA-00020: maximum number of processes (40) exceeded, which can even occurs as sysdba.
Test case (21 is a not something to do in real life):
SQL> alter system set processes=21 scope=spfile;
SQL> startup force quiet
ORACLE instance started.
From now on, sqlplus as sysdba is impossible.
$ sqlplus -s -L / as sysdba
ORA-00020: maximum number of processes (40) exceeded
SP2-0751: Unable to connect to Oracle. Exiting SQL*Plus
Okay, if you really really need to run one script, you could connect with sqlplus -prelim and restart the database.
if :|sqlplus / as sysdba|grep ORA-00020
echo shu abort|sqlplus -prelim / as sysdba
echo startup quiet|sqlplus / as sysdba
If ORA-20 is detected, then the database will be restarted.