Re: Working directory in SQL*Plus.

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Mon, 07 Jun 2004 21:22:32 +0200
Message-ID: <ca2f1e$ll8$1_at_news2.tilbu1.nb.home.nl>


Paul wrote:

> gooiditweg_at_nospam.demon.nl says...
>
>
>

>>>But, under windows at least, if I do 'pwd' under SQL*Plus, there is no 
>>>pwd parameter. 'show pwd' doesn't work either.

>
>
>
>>is a command line tool, and doesn't exist in Windows. Just type 
>>host cd

>
>
>
> This shows 'C:\' if I type it while running sqlplus in a dos window, but
> under the GUI, the screen just flashes (presumably, the dos window
> springs up and is closed again immediately). Doing just 'host' on its
> own, puts you into a dos window where you can issue host commands and
> see the output (however, see below).
>
>
> The script does indeed work if I put it in 'C:\', but as you can
> imagine, that's not something that I want to be doing.
>
>
>
>>>I couldn't find that either under windows. I issued the 'show 
>>>parameters;' command which gave me lots of stuff, but nothing of any 
>>>help from what you've offered.

>
>
>
>>either create this as a string value in the registry under
>>hkey\local_machine\software\oracle\<yourhome>

>
>
>
> Set up what exactly in there? I tried putting in a variable 'HOME' and
> gave it the value 'G:\Paul', and put the script in there, but it didn't
> work - even after rebooting.
>
>
>
>>or set this up as an environment variable on the My computer
>>properties 

>
>
>
> I already have a variable 'HOME' = 'C:\Documents and Settings\Paul' in
> there - which is why I was surprised that the script didn't work when I
> put it in there (see original post). What should it be called?
>
>
>
>>Alternatively, you may want to create a shortcut on your desktop, with
>>the correct working directory as the working directory of the
>>shortcut.

>
>
>
> OK - that worked. I now have a shortcut on my desktop which will run the
> script automatically from G:\Paul.
>
> That's great, and thank you for your input.
>
>
> Now, I have one final question - I like to use many rather than few
> directories to organise my scripts &c., and would like to organise them,
> say in Paul\C1, Paul:\C2 &c. for chapters 1, 2 &c...
>
> How do I tell SQL*Plus to move between directories? I've tried 'host cd
> g:\Paul\c1' (to where I removed the script), but when I exit the dos
> window and go back to the gui tool, it appears that it is still stuck in
> g:\Paul. host dir still gives me g:\Paul and the script fails. It also
> fails if I use sqlplus from the dos window.
>
>
>
>>It looks like you may want to improve on your Windows skills

>
>
>
> I don't know if my Windows skills are that bad 8-). I'm on my own here
> and, as I said, going through this book. Now, I can always reinstall if
> I mess up catastrophically, but that takes a long time. For example, I
> assumed that my 'HOME' variable under Windows would be the default one
> for the tool, and was surprised to learn that it was 'C:\', which I
> can't for the life of me understand.
>
>
> Thanks for your help so far.
>
>
> Paul...
>
>
Bottom line:
SQL*Plus (GUI and cl version) looks for scripts in: 1) the current directory ("Start in" property of a

    GUI tool, or the directory the command line (cl)     version was started in.
2) Any directory, mentioned in the SQLPATH variable.

    On Windows, this is a registry entry - you may     set it in your environment (e.g. C:\>set sqlpath=c:\paul\c1)     which takes precedence over the registry value, or     change your registry
[Quoted] Concatenate the std Windows way, using ";": set sqlpath=c:\paul\c1;c:\paul\c2;c:\work\sql etc

[Quoted] The above is ordered, that is look in 1) first, when not found, then 2)

-- 

Regards,
Frank van Bortel
Received on Mon Jun 07 2004 - 21:22:32 CEST

Original text of this message