You can use the AfterConnect.sql script in the PL/SQL Developer directory to specify SQL statements and PL/SQL blocks that need to be executed when a new connection is made. This will run for all sessions. For example:
Code:
alter session set nls_date_format='dd-mm-yyyy';
begin
dbms_session.set_role('app_role');
end;
/
The Command Window will also execute a login.sql script in the PL/SQL Developer installation directory or from the SQLPATH, just like SQL*Plus.