When the 'glogin.sql' script has a statement "set define off;", and a script is run from the Editor via F5 (Execute as Script), even though it doesn't prompt for substitution variables, the compiled code has those strings with '&' characters as UPPERCASE.
Example:
CREATE PROCEDURE x
AS
a VARCHAR2 (10);
BEGIN
a := '&abc';
END;
The file 'glogin.sql' has the statement "set define off;" and can be checked in Toad Options | Scripts | glogin.sql.
Here's how the glogin.sql file looks like:
SET ECHO ON;
SET DEFINE OFF;
When run as F5, this is the output:
SQL> set define off
SQL> CREATE PROCEDURE x
AS
a VARCHAR2 (10);
BEGIN
a := '&ABC';
END;
Procedure created.
The string inside single quotes changed and is now stored as UPPERCASE in the procedure in the database.
Note that manually running set define off before compilation doesn't have a problem. It's only when the glogin.sql file has 'set define off;', that the case being changed to uppercase.
Also note that "Execute via SQL Plus" does not have this problem and correctly preserves the case when using glogin.sql.