Thanks all. The replies have been really helpful.
Reuben D. Budiardja.
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Reuben D. Budiardja
INET: [EMAIL PROTECTED]
Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California--
Title: RE: How to tell Oracle the directories of script files
Use SQLPATH.
Alan Martin
Defense Logistics Info Service
Battle Creek, MI
-Original Message-
From: Reuben D. Budiardja [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 14, 2003 2:09 PM
To: Multiple recipients of list
Yes there is a way. In UNIX environments (I think this works in NT/2000 as
well) you can set the environment variable SQLPATH to a list of directories
that contain SQL files. SQLPlus will search this path if the file is not
found in the current directory.
RWB
RDB,
It is always best to include the path for the script that you want to
execute. That way you make sure that you execute your script and not
someone else's. There can be many scripts of the same name in the
directory path.
Ron
[EMAIL PROTECTED] 08/14/03 03:19PM
Yes there is a way. In UNIX
@/usr/local/bin/my_sql_script
Allan
-Original Message-
Sent: Thursday, August 14, 2003 1:09 PM
To: Multiple recipients of list ORACLE-L
Hello,
Suppose I have some SQL scripts in my /home/user directories,
/usr/local/bin
directories, etc.
If I start 'sqlplus' from console in
It's known as SQLPATH.
Dick Goulet
Senior Oracle DBA
Oracle Certified 8i DBA
-Original Message-
Sent: Thursday, August 14, 2003 2:09 PM
To: Multiple recipients of list ORACLE-L
Hello,
Suppose I have some SQL scripts in my /home/user directories, /usr/local/bin
directories, etc.
If I
I have setup an environment variable (actually a number of them)
DBS=/ora/app/dba/scripts ; export DBS
In my case this is where the majority of my scripts are stored
when I am in sqlplus
SQL @$DBS/scriptname
Darren
-Original Message-
Sent: Thursday, August 14, 2003 11:09 AM
To:
export SQLPATH=/usr/users/oracle/dba/scripts:/app/oracle/admin
before you run SQL*Plus
HTH
Stephen
[EMAIL PROTECTED] 08/14/03 11:09AM
Hello,
Suppose I have some SQL scripts in my /home/user directories,
/usr/local/bin
directories, etc.
If I start 'sqlplus' from console in /home/user
Btw, did you know that you can use:
@http://www.servername.com/script.sql and
@ftp://ftp.servername.com/dir/script.sql in 9i sqlplus :)
It can be nice in environment where you continously have to work with random
different servers and cant copy your script set over every time..
Tanel.
-
Keep in mind that, unless they've changed the function, spool also searches the
sqlpath for files.
If you say:
spool modify_users.sql
select 'alter user '||username||'whatever;' from dba_users;
spool off
Spool just looked in your current directory for a file named modify_users.sql to
replace,
COOL! I've learned something new today. Can I go home
Ron Thomas
Hypercom, Inc
[EMAIL PROTECTED]
Each new user of a new system uncovers a new class of bugs. -- Kernighan
11 matches
Mail list logo