Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Where should place my sql scripts?

Re: Where should place my sql scripts?

From: Brian Peasland <oracle_dba_at_remove_spam.peasland.com>
Date: Tue, 22 Apr 2003 18:00:42 GMT
Message-ID: <3EA5834A.490B7C85@remove_spam.peasland.com>


Another tidbit is to use the SQLPATH environment variable. Set this variable as you would a normal PATH environment variable. When you just run an SQL script (i.e. "@scriptname.sql"), SQL*Plus will look in your current directory first. Then it will look in any directories in the order specified by your SQLPATH environment variable. Works for both Unix and Windows.

HTH,
Brian

Karsten Farrell wrote:
>
> peter_at_nomorenewsspammin.ca said...
> > Sqlplus is complaining that it cannot find my scipts.
> > Can I specify where the scripts are in the sql command?
> >
> I assume you're referring to the GUI sqlplus. Allison's response is
> correct (of course, since she's the one who's in charge of sqlplus).
> However, there are a couple of other things you can do in addition to
> specifying the full path to the script.
>
> 1. Do a File / Open... and navigate to any script in the directory where
> you script is. It will display on your screen; but more importantly, it
> will set the working directory to wherever you opened the file. Ctrl-C
> to exit, and then do your @script (path no longer needed).
>
> 2. Alternatively, you can tell where sqlplus will look for script files
> by typing 'host' (without quotes). That will open a DOS window to the
> place where it's expecting to see the scripts. Of course, you'll then
> realize that it's the place you specified in the shortcut's properties
> page for the "starting in" parameter. So you can right-click your
> sqlplus shortcut icon, select Properties, and set your starting
> directory to where your scripts are. Then the next time you start
> sqlplus from that shortcut, you'll be where your scripts are.
> --
> /Karsten
> DBA > retired > DBA
Received on Tue Apr 22 2003 - 13:00:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US