(SQL Plus|SQL Developer)- SQLPATH


Setting up the SQLPATH environment variable in the windows environemnt tell SqlPlus - SqlPlus Command to search the file in this directories.

The startup files (login.sql,…) must be located in this directories.

Bug: SQLPlus doesn't search in the subdirectory and the length of the variable must not be greater than 254 (The reality is between 241 and 278)

SQLPATH can be by default created in the registry (in 12c it's the case) with this value: oracle_home\dbs

SQLPLUS first searches:

  • the user's current working directory,
  • then uses the following user-defined environment variable if defined:
    • ORACLE_PATH for Unix environment or
    • SQLPATH for Windows environment.
  • otherwise it will use the registry value for windows (HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0)

SQL Developer

Tools > Preference:

Example on my computer

echo %SQLPATH%

Powered by ComboStrap