Real Men edit the Registry ... SQLPATH
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Real Men edit the Registry ... SQLPATH

  1. #1
    Join Date
    Jan 2000
    Location
    Chester, England.
    Posts
    818

    Real Men edit the Registry ... SQLPATH

    The Windows registry entry: HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\SQLPATH for a 9.2 install on Windows XP PC.

    This defaults to 'oracle\ora92\dbs'

    According to the docs this key "specifies the location of SQL scripts...SQL*Plus searches for SQL scripts in the current directory and then in the directories specified by SQLPATH parameter...You can specify any directories on any drive as valid values for SQLPATH". Sounds simple enough. When I run SQL scripts the current directory is 'ora92\bin' as I'm using SQLPLUSW on my PC. As I have a lot of scripts in a sub-folder called DBA, I have to type @dba\myscript.sql ... so I thought I'd change SQLPATH to 'oracle\ora92\bin\dba'.

    Okay so far - however this has the side effect of hiding the 'SQL>' prompt. Issuing 'sqlplus /nolog' from the command line puts you into SQL*Plus with no 'SQL>' prompt. So issuing @myscript.sql immediately after the 'sqlplus /nolog' only sets the prompt to '@myscript.sql>' and then it sits there!

    I reset the SQLPATH key to 'oracle\ora92\dbs' and 'sqlplus /nolog' invokes SQL*Plus with the 'SQL>' prompt again.

    Anyone else come across this, or do I have a weird Oracle/Windows combination?

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Quote Originally Posted by JMac
    do I have a weird Oracle/Windows combination?
    insert favorite windows joke here...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Jan 2000
    Location
    Chester, England.
    Posts
    818
    Quote Originally Posted by marist89
    insert favorite windows joke here...
    I was waiting for/fearing that response.

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Quote Originally Posted by JMac
    Anyone else come across this, or do I have a weird Oracle/Windows combination?
    On my exact same environment (WinXP, Ora92EE) your procedure works as it should. No SQL prompt missing, SQLPath env variable set as expected, no problem running SQL scripts directly from that SQLPath. In short, for me it works like expected.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  5. #5
    Join Date
    Nov 2005
    Location
    Indianapolis
    Posts
    24

    Works for me too...

    This scenario has worked for me too on XP with 9.2. My only thought would be to look for a login.sql script in the \dbs directory and see if it is changing the sqlprompt setting in sqlplus?

  6. #6
    Join Date
    May 2002
    Posts
    2,645
    Why bother with the registry when you can simply set SQLPATH as an environment variable, system or user, take your pick?

  7. #7
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    you have a login.sql in your new SQLPATH?

  8. #8
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Quote Originally Posted by pando
    you have a login.sql in your new SQLPATH?
    Now, THAT is a briliant hypotesis. That realy could explain the reason for OP's problem.

    Kudos, pando!
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  9. #9
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    I have that sort of "problem" (I dont call it problem really) with my SQLPATH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width