Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Oracle 10g XE on my Windows Server 2008 R2. Now I would like to configure SQL Plus to use login.sql for login settings. I created a login.sql file and put it into a


folder, but it does not seem to work. Where should I put this configuration file in Windows environment? My login.sql file is as follows:

SET pagesize 2000
SET LONG 10000
SET linesize 1000
COLUMN last_name format a20
COLUMN total format 999,999,999
SET feedback ON
alter session set nls_date_format = 'yyyy-mm-dd hh:mi:ssPM'
COLUMN global_name new_value gname
SELECT LOWER(USER) || '@' || global_name||CHR(10)||'SQL> ' AS global_name
FROM   global_name;
share|improve this question
up vote 4 down vote accepted

You need to set the environment variable SQLPATH (through the Control Panel) to tell SQL*Plus where to find the file:


Setting environment variables is explained here:

share|improve this answer
could you clarify where this needs to be added? – Aaron Bertrand May 23 '14 at 16:36
@AaronBertrand: I added a link to the Microsoft knowledge base – a_horse_with_no_name May 23 '14 at 16:43
Thanks! A different user posted an answer asking about it - and they didn't have enough rep to comment. Cheers. – Aaron Bertrand May 23 '14 at 16:47
@AaronBertrand: to be honest: that link shows up as the first or second when searching for it. It's hard to believe someone can't find it by himself. It seems despite all popularity of Google and Co, searching for answers is a dying skill – a_horse_with_no_name May 23 '14 at 16:58
True, but you could pick any random question on the site and with a good measure of accuracy say the same thing... – Aaron Bertrand May 23 '14 at 16:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.