Hi Marco,
Great job on PL/SQL Developer 12! Lots of nice enhancements, that have got me exploring all the other features I ignored, such as the Command Window. I like it enough that I want to try using this as a replacement for my trusted SQL*Plus.
In putting the Command Window into production, I've struggled with the SQL Prompt setting. Since I manage multiple databases, it is very important to me to identify the User and DB with each prompt. I discovered that that my old prompt logic did not work:
SET TERMOUT OFF
COLUMN RTN_CHAR NEW_VALUE RTN_CHR
SELECT ''||CHR(10)||'' RTN_CHAR FROM DUAL;
COLUMN SQL_PRMPT NEW_VALUE SQL_PRMPT
SELECT 'SQL> ' SQL_PRMPT FROM DUAL;
COLUMN CONNECT_ID NEW_VALUE CONNECT_ID
SELECT UPPER('_CONNECT_IDENTIFIER') CONNECT_ID FROM DUAL;
set sqlprompt "_USER@&&CONNECT_ID &&RTN_CHR&&SQL_PRMPT"
SET TERMOUT ONI was hoping to see
ADMIN@MYSCHEMA
SQL>Instead, the variables were treated like literals and the resulting prompt was
_USER@&&CONNECT_ID &&RTN_CHR&&SQL_PRMPT> Fortunately, I discovered this PSD syntax in another thread:
set sqlprompt [user]@[db]But when I put it into AfterConnect.sql, it still did not work. I even tried adding various useful startup queries like
SELECT COUNT(*) FROM DAILY_ERROR_LOG;I noticed that when I ran the Command Window, a little notification appeared at the bottom indicating that "login.sql" had executed. I use login.sql in my Oracle SQL*Plus configuration, and I couldn't understand how PSD was finding it, or how I could change it.
After an hour or so of debugging and reviewing documentation, I realized that Command Window uses it's own login.sql file.
So, my question:
What is the difference between login.sql and AfterConnect.sql, and how are they to be used? Also, what other variables are available? Can Command Window handle breaks and computes?
A document on this would be nice.