AfterConnect.sql Search Path

gpz

Member
I am not able to edit the AfterConnect.sql file in the installation folder of my work computer. I have tried modifying the file that exists in my "%AppData%\PLSQL Developer 15" folder but it does not get executed. My assumption is that the software has been installed for the current user so the %AppData% folder may not be referenced as it does in our Citrix-type environment. I have also tried suggestions mentioned in other threads. I have tried setting the Directories for Command file and SQL scripts under Preferences but neither of those appeared to work. I have also tried checking the settings for ORACLE_PATH and SQLPATH but neither of those folders are accessible to me.

Is there a search path the application uses when attempting locate the AfterConnect.sql file? If so, that may allow me to place the AfterConnect.sql file in a different location.
 
The %APPDATA%\PLSQL Developer 15\AfterConnect.sql file will be executed. Note that the commands in the script must be terminated by a semi-colon or a slash. I tested with the following command in %APPDATA%\PLSQL Developer 15\AfterConnect.sql:

alter session set nls_language=dutch;

When executing a command with an error in a SQL Window, the error message is now in Dutch.
 
Thanks for your help, Marco.

My issue turned out to be related to the fact that I need to determine the schema owner based upon the database connected. Doing this meant that I had to set the schema owner using EXECUTE IMMEDIATE. I had defined the connection with the read-only properly enabled which, much to my surprise, did not allow the EXECUTE IMMEDIATE statement to run. Once I removed the read-only property, everything is now working fine.

Thanks again for your support. I had been trying to make this work for many weeks.
 
Back
Top