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?
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?
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?
Bookmarks