04-03-2008
Lets start all again.. with vino's addition:
What do you know about unix in general? (may help us understand your pain... and answer accordingly...)
vino suggest you set some env variable:
the best for you in this case is to edit using vi your .profile
on a standard HP system you should be using ksh (or posix..)
so in your home directory do a vi of .profile:
look for this line:
# Set up the search paths:
#### and add now:
ORACLE_HOME=/usr/oracle/u01/8.1.7
#### and complete the PATH:
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME PATH
### save -> :wq
now execute . ./.profile
env
you should see the modified path and the new variable
which sqlplus should say /usr/oracle/u01/8.1.7/bin/sqlplus (If you are sure its in that directory...)
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am looking to loop round a load of files and execute each in sqlplus, I have looked at the forum to see what was posted in the past, but most of the examples seem to use the sql being passed in through the script, which is not really what I am looking for, can someone tell me if the code below is... (9 Replies)
Discussion started by: LiquidChild
9 Replies
2. UNIX for Advanced & Expert Users
Hi,
Ho do I differentiate system call from library call?
for example if I am using chmod , how do I find out if it is a system call or library call?
Thanks
Muru (2 Replies)
Discussion started by: muru
2 Replies
3. Shell Programming and Scripting
Hi,
I am writing a script to test database connection. If the first try fails, it will wait for 1 minutes and then try again. The script is as following:
........
for i in $ORACLE_SID
do
$ORACLE_HOME/bin/sqlplus $username/$password@$i <<! >/dev/null
select * from tab;
exit
if ; then... (3 Replies)
Discussion started by: beaniebear
3 Replies
4. UNIX for Dummies Questions & Answers
I have a .sh file which acts as an all set for a couple of oracle scripts i want to call. Basically it has 3 variables, the user Id, the password, and the oracle instance to connect to.. the problem is I cant seem to get the connection string format properly.. the program essentially is this:
... (1 Reply)
Discussion started by: JohnZ1385
1 Replies
5. Infrastructure Monitoring
Hello,
I have a problem with package and name space.
require "/Mehran/DSGateEngineLib/general.pl";
use strict;
sub System_Status_Main_Service_Status_Intrusion_Prevention
{
my %idpstatus;
my @result;
&General_ReadHash("/var/dsg/idp/settings",\%idpstatus);
#print... (4 Replies)
Discussion started by: Zaxon
4 Replies
6. UNIX for Dummies Questions & Answers
Why do I need to call make if I call gcc ?
I thought gcc already compiles the sources.
thanks (1 Reply)
Discussion started by: aneuryzma
1 Replies
7. Shell Programming and Scripting
When i run the following script am getiing the output correct but i want to get it in the form of a table, could any one help me please. the script is a s follows
count=`sqlplus -s $ORACLE_ACCOUNT << EOF
set heading off
set wrap on
set feedback off
column ChangeNumber format a12
column... (9 Replies)
Discussion started by: jhon1257
9 Replies
8. Shell Programming and Scripting
i am using bash shell
Whenever i declare an array, and then using sqlplus, i am getting sqlplus error and return code 127.
IFS=","
declare -a Arr=($Variable1);
SQLPLUS=sqlplus -s "${DBUSER}"/"${DBPASS}"@"${DBASE}
echo "set head off ; " > ${SQLCMD}
echo "set PAGESIZE 0 ;" >> ${SQLCMD}... (6 Replies)
Discussion started by: arghadeep adity
6 Replies
9. UNIX and Linux Applications
Hi all,
i face an error related to my server ""it's running server"" when i use sqlplus command
$ sqlplus
bash: sqlplus: command not found
the data base is up and running i just need to access the sqlplus to import the dump file as a daily backup.
i already check the directory... (4 Replies)
Discussion started by: clerck
4 Replies
env(1) User Commands env(1)
NAME
env - set environment for command invocation
SYNOPSIS
/usr/bin/env [-i | -] [name=value...] [ utility [ arg... ]]
/usr/xpg4/bin/env [-i | -] [name=value...] [ utility [ arg... ]]
DESCRIPTION
The env utility obtains the current environment, modifies it according to its arguments, then invokes the utility named by the utility op-
erand with the modified environment.
Optional arguments are passed to utility. If no utility operand is specified, the resulting environment is written to the standard output,
with one name=value pair per line.
/usr/bin
If env executes commands with arguments, it uses the default shell /usr/bin/sh (see sh(1)).
/usr/xpg4/bin
If env executes commands with arguments, it uses /usr/xpg4/bin/sh (see ksh(1)).
OPTIONS
The following options are supported:
-i | - Ignores the environment that would otherwise be inherited from the current shell. Restricts the environment for utility to
that specified by the arguments.
OPERANDS
The following operands are supported:
name=value Arguments of the form name=value modify the execution environment, and are placed into the inherited environment before
utility is invoked.
utility The name of the utility to be invoked. If utility names any of the special shell built-in utilities, the results are unde-
fined.
arg A string to pass as an argument for the invoked utility.
EXAMPLES
Example 1: Invoking utilities with new PATH values
The following utility:
example% env -i PATH=/mybin mygrep xyz myfile
invokes the utility mygrep with a new PATH value as the only entry in its environment. In this case, PATH is used to locate mygrep, which
then must reside in /mybin.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of env: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
PATH Determine the location of the utility. If PATH is specified as a name=value operand to env, the value given shall be used in the
search for utility.
EXIT STATUS
If utility is invoked, the exit status of env is the exit status of utility. Otherwise, the env utility returns one of the following exit
values:
0 Successful completion.
1-125 An error occurred.
126 utility was found but could not be invoked.
127 utility could not be found.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
/usr/bin
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
/usr/xpg4/bin
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWxcu4 |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
ksh(1), sh(1), exec(2), profile(4), attributes(5), environ(5), standards(5)
SunOS 5.10 2 Jan 2002 env(1)