Re: Setting Directory Path in SQL*Plus

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 4 Jun 2002 21:31:57 +0200
Message-ID: <ufq5hp87ll3121_at_corp.supernews.com>


"Justin Wigg" <justin_at_icsmultimedia.com.au> wrote in message news:adh8gc$1146cm$1_at_ID-71863.news.dfncis.de...
> Hi all...
>
> I am trying to write an master installation script that will install many
> tables, packages etc into an Oracle 8.1.7 database by calling several
large
> subscripts in sequence.
>
> A certain directory structure has been created (for a good reason) to
store
> these subscripts in different places but all within a master directory.
> What I am trying to do is set the master script up so that it can point
> itself to a different sub-directory and call a script but to do so
relative
> to the original directory.
>
> This will be running on Windows 2000 Server, but I don't want to actually
> hard code the directory path into the script as there is no guarantee that
> the drive names will be the same etc, so I don't just want to say
> "_at_E:\etc\etc\etc".
>
> Is there any way I can change directories in an SQL script by using a
> DOS-style command or something to do something like "cd
> ..\..\scripts\blah\blah"? Is there maybe an environment variable I can't
> find that will do this?
>
> Many thanks...
> --
> "Managing senior programmers is | Justin Wigg - Hobart, AUSTRALIA
> like herding cats." - Dave Platt | Reply: justin_at_icsmultimedia.com.au
>
>

The SQLPATH registry key will do this.
If you call a 'sub'script by using _at_@ it is assumed it is in the same directory as the calling script.
As usual reading the manual would have saved time.

Regards

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Tue Jun 04 2002 - 21:31:57 CEST

Original text of this message