Home » SQL & PL/SQL » SQL & PL/SQL » SQL*Plus Question
SQL*Plus Question [message #198667] Wed, 18 October 2006 03:35 Go to next message
collis
Messages: 11
Registered: October 2006
Junior Member
I hope it's okay if I ask a SQL*Plus question here...

I was wondering how to change the directory SQL*Plus is looking at. I know you can use HOST to bring up a cmd window, but if I try to CD to a different directory there, and then close the cmd window, SQL*Plus still thinks I'm in the oracle bin directory.

What I normally do to work around this is File->Open to open a script in the desired directory, which then gives me this error:

SP2-0423: Illegal GET command


The result, though, is that SQL*Plus has then changed the directory it's pointing to. Is there an easier way to achieve this result? ( without entering a full path name to a script on the command line )

Thanks.
Re: SQL*Plus Question [message #198708 is a reply to message #198667] Wed, 18 October 2006 05:32 Go to previous messageGo to next message
collis
Messages: 11
Registered: October 2006
Junior Member
From what I've been able to piece together, there is no easy way to do what I want. I can however alter the SQLPATH registry entry to include the directory of my scripts. That way calling @init.sql will look in the directory as well as the oracle bin directory for init.sql.

This is of course entirely not useful for environments where I don't have access to such things. But alas, at least it makes things easier on my test environment.

[Updated on: Wed, 18 October 2006 05:33]

Report message to a moderator

Re: SQL*Plus Question [message #198713 is a reply to message #198708] Wed, 18 October 2006 05:41 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
You can also set SQLPATH as an environment variable.
Re: SQL*Plus Question [message #198744 is a reply to message #198713] Wed, 18 October 2006 07:24 Go to previous messageGo to next message
collis
Messages: 11
Registered: October 2006
Junior Member
ebrian wrote on Wed, 18 October 2006 05:41
You can also set SQLPATH as an environment variable.


Okay, well that is easier than updating the registry. Still the script I'm writing is going to be run in an environment where there is really zero access to screw with anything. Which is why it would be nicer to just have a simple command line solution.

But oh well. Thanks.
Re: SQL*Plus Question [message #198745 is a reply to message #198744] Wed, 18 October 2006 07:28 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
CD to the right directory before you invoke SQL*Plus. That's what I usually do when I'm messing with test scripts for the forum.

MHE
Re: SQL*Plus Question [message #198748 is a reply to message #198745] Wed, 18 October 2006 07:33 Go to previous message
collis
Messages: 11
Registered: October 2006
Junior Member
Maaher wrote on Wed, 18 October 2006 07:28
CD to the right directory before you invoke SQL*Plus. That's what I usually do when I'm messing with test scripts for the forum.

MHE


Okay - perfect. Thanks
Previous Topic: In SQL/Oracle 'SELECT' command belongs to which category?
Next Topic: Constraint Naming
Goto Forum:
  


Current Time: Fri Dec 02 20:43:39 CST 2016

Total time taken to generate the page: 0.10359 seconds