Folks,
I just logged the following Enhancement Request with the EM team. If you think this is a good idea, please feel comment and let Oracle know you'd like this.
Desirability: Extremely Desirable Feature
Release Status: Production
Enhancement Request:
A SQL select statement in a glogin.sql or login.sql prevents EM from starting that database. Since the database is down, SQL Plus returns an error for the select statement. EM captures and returns the error that SQL Plus gets to EM and doesn't start the database.
In the extremely common case where a select statement is run (often to set a prompt) in SQL Plus during database startup, EM should handle (basically ignore) this error (Possibly with a message to EM that any select statement run before the database was started was ignored) and allow the database to start in the same way that this 'error' would be ignored if SQL Plus was used to start the database without EM.
Basically we want to handle this type of thing:
column global_name new_value gname
define gname=idle
set termout off
SELECT LOWER(user) || '@' ||
SUBSTR ( global_name, 1, decode (dot, 0, length(global_name), dot-1))
as global_name
from
(select global_name, instr(global_name,'.') as dot from global_name );
set sqlprompt '&gname> '
set termout on
Business Needs: Without this feature we are forced to choose between 1) The ability to start an EM managed database with the console, or 2) An extremely common and useful set prompt feature of sqlplus that is very often put into a login.sql or glogin.sql.