Running sql script on UNIX [message #98006] |
Wed, 15 October 2003 14:15 |
rachana
Messages: 27 Registered: August 2003
|
Junior Member |
|
|
Hi All,
I have a sql script (a report) that I want to run on a UNIX server. I will be running the script on the UNIX server, I will be logging into SQLPLUS, and connecting to an reporting (oracle) database that is on a windows NT server.
Now, I am fairly new to this. I have got access to the UNIX server and have reflections installed. Here are my questions-
1. Do I need to have sqlplus installed on the UNIX server or on the WIndows NT (Reporting database) server?
2. How do I check to see if the UNIX server already has the sqlplus installed?
3. what needs to be done if the UNIX server does not have the sqlplus installed?
thanks.
|
|
|
Re: Running sql script on UNIX [message #98007 is a reply to message #98006] |
Wed, 15 October 2003 15:57 |
Manish
Messages: 79 Registered: December 2000
|
Member |
|
|
>1. Do I need to have sqlplus installed on the UNIX >server or on the WIndows NT (Reporting database) >server?
Yes u need to have the client installed on the unix machine, this should also includ net8 ( the networkign layer of Oracle.)
>2. How do I check to see if the UNIX server already >has the sqlplus installed?
>find / -name sqlplus -print 2>/dev/null
if this doesnt return anything then sqlplus is not installed in your environment
>3. what needs to be done if the UNIX server does not >have the sqlplus installed?
Get the media (CDROM) and install the same.
you will have to setup the TNSNAMES to connect to your database on the windows machine.
Manish
|
|
|
Need help: Running sql script on UNIX [message #98008 is a reply to message #98007] |
Thu, 16 October 2003 10:03 |
rachana
Messages: 27 Registered: August 2003
|
Junior Member |
|
|
Thanks Manish. I found where sqlplus is on the Unix box, but get an error when I execute it. Also, I get a different message, when I execute it from my home directory. Can someone help me with this? Thanks!
On the UNIX box, I have the following directory structure-
$ pwd
/opt/oracle/product/8.1.7/bin
-rwxr-xr-x 1 oracle dba 4372 Mar 21 2001 netasst
-rwxr-x--x 1 oracle dba 8663040 Mar 21 2001 sqlplus
-rwxr-xr-x 1 oracle dba 8658944 Sep 15 2000 sqlplusO
$ pwd
/opt/oracle/product/8.1.7/bin
$ sqlplus
Message file sp1<lang>.msb not found
Error 6 initializing SQL*Plus
(I do not know what the above error message means?)
I get the following message, when I execute sqlplus in my home direcotry-
$ pwd
/home/rachana
$ sqlplus
ksh: sqlplus: not found
The following is my .profile file -
# Default user .profile file (/usr/bin/sh initialization).
# Set up the terminal:
if [[ "$TERM" = "" ]]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
PATH=$PATH:.:/opt/oracle/product/8.1.7/bin/sqlplus
export PATH
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
# Set up the shell variables:
EDITOR=vi
export EDITOR
|
|
|
|
Re: Need help: Running sql script on UNIX [message #390028 is a reply to message #389945] |
Wed, 04 March 2009 11:52 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
Oracle 8.1.7 is very old. You need to specify what version of Oracle is installed on Windows. I don't think 8.1.7 client will connect to anything newer than 9.2 database. You'll need a few more Oracle client variables too. SHLIB_PATH vs LD_LIBRARY_PATH varies by *nix OS. Setting both is a good starting point.
export ORACLE_HOME=/opt/oracle/product/8.1.7
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export SHLIB_PATH=$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin
#export TNS_ADMIN=/my-path-to-tnsnames.ora-location
|
|
|
|
|