473,407 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Help Required: To run the attached UNIX script

Am getting this "SP2-0734:: not found" error while runnning following script. Please help.

echo "Enter the CUSTOMER ID, CUSTOMER NAME AND FM/CH:"
read cust_id;
read cust_name;
read fm_ch;

echo "**";
echo $cust_id;
echo $cust_name;
echo $fm_ch;

`sqlplus -s itm_odb/itm_odb<<EOF
set serveroutput on feedback off linesize 1000 pagesize 0;
echo "heloo";
insert into customer_tbl values('$cust_id','$cust_id','$cust_name','$fm_ch' ,'sysdate','sysdate');
EXIT;
EOF
`
Mar 24 '07 #1
6 3255
michaelb
534 Expert 512MB
I think you need to get rid of the backticks around the entire sqlplus command,
and also echo "hello" seems to be misplaced - take it out.
Mar 24 '07 #2
michaelb
534 Expert 512MB
Almost forgot about what very well may be your very first problem:

Unless you have ORACLE_SID set in your environment your login string in the script should probably include the oracle instance. This means that you need to change

sqlplus -s itm_odb/itm_odb
to
sqlplus -s itm_odb/itm_odb@oracle_instance_name

where oracle_instance_name is the actual name of the database instance you connecting to.
Mar 24 '07 #3
Thanks for the reply!
I have modified the statements as per your suggesrtions:
Now it is giving some "./rulesEngine.ksh[21]: insert: not found" error. (name of the script file is "rulesEngine.ksh")

Please help!

echo "Enter the CUSTOMER ID, CUSTOMER NAME AND FM/CH:"
read cust_id;
read cust_name;
read fm_ch;

echo "**";
echo $cust_id;
echo $cust_name;
echo $fm_ch;

sqlplus -s itm_odb/itm_odb@fleetodb@ad.infosys.com<<EOF
set serveroutput on feedback off linesize 1000 pagesize 0;
insert into customer_tbl values('$cust_id','$cust_id','$cust_name','$fm_ch' ,'sysdate','sysdate');
commit;
EXIT;
EOF
`
--------------------------------------
Your Reply:

Almost forgot about what very well may be your very first problem:

Unless you have ORACLE_SID set in your environment your login string in the script should probably include the oracle instance. This means that you need to change

sqlplus -s itm_odb/itm_odb
to
sqlplus -s itm_odb/itm_odb@oracle_instance_name

where oracle_instance_name is the actual name of the database instance you connecting to.
Mar 26 '07 #4
michaelb
534 Expert 512MB
First, check your script for typos. One thing I noticed, you seem to have a stray backtick character following the line with EOF.

There could be more to it, I would expect a different error if backtick was the only problem in the script.
Mar 27 '07 #5
Thanks for bringing it to my notice. I have removed all the backtick character from my script file. Now also it is not working:(

Please suggest!

Thanks,
Shruti

-------------------------------------------
your reply:
First, check your script for typos. One thing I noticed, you seem to have a stray backtick character following the line with EOF.

There could be more to it, I would expect a different error if backtick was the only problem in the script.
Mar 27 '07 #6
Motoma
3,237 Expert 2GB
How isn't it working. Are you getting any error messages? Have you tried entering the commands, exactly as they appear in the script, directly on the command line?


Thanks for bringing it to my notice. I have removed all the backtick character from my script file. Now also it is not working:(

Please suggest!

Thanks,
Shruti

-------------------------------------------
your reply:
Mar 27 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: mcp6453 | last post by:
I am trying to use Jack's FormMail script (http://www.dtheatre.com/scripts/formmail). Since I'm brand new at PHP and not very good at HTML, I have an easy question, which I will narrow down. When...
3
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then...
2
by: ASallade | last post by:
Hello, I've scoured my books and the web, but am still daunted, hopefully some of the users in this newsgroup will have advice for my problem. I am not an experienced javascript programmer,...
14
by: Brandon Hoppe | last post by:
I'm trying to change the src of an ilayer in the parent document from a link inside the ilayer. I'm not able to get it to work. All that happens is Netscape 4 crashes. This is for Netscape 4 only....
7
by: mike | last post by:
Hello, I am kind of new to this javascript stuff and I am constantly having problems trying to get my webpage validated. I have the following <script>printdate();</script> and when I validate it...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
0
by: Erland | last post by:
Hello All, I am using AJAX library( AjaxEngine from http://www.mathertel.de/AJAXEngine/) and having problems and hope someone here can help me. I have some piece of javascript code that I...
0
by: Shruti duggal | last post by:
Hi, This Script contains update statements and running without error. But the update result is not getting reflected in the database. i.e may be Script fails to connect to the database. it...
2
by: hzgt9b | last post by:
I've written a simple javascript page that parses an XML file... (Actually I just modified the "Parsing an XML File" sample from http://www.w3schools.com/dom/dom_parser.asp) The page works great...
2
by: samsalmanu | last post by:
I'm trying to ftp from a Unix machine to a Windows machine.. I've tried the following #!/bin/sh #set -x USER="user1" PASS="pass1" HOSTNAME="host1"
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.