stanlip
asked on
afiedt.buf not found
I am trying to run a cron job in AIX connecting to
a oracle 734 database using the sqlplus -S option.
I keep receiving a message 'afiedt.buf' not found.
The first hting I do in the shell script is to run
the profile for the oracle user id.
What am I doing wrong
a oracle 734 database using the sqlplus -S option.
I keep receiving a message 'afiedt.buf' not found.
The first hting I do in the shell script is to run
the profile for the oracle user id.
What am I doing wrong
Can you post the shell script, so we can take a look?
What do you mean by "run the profile for the oracle user id"?
What do you mean by "run the profile for the oracle user id"?
ASKER
Here is the shell script I run
. /home/dba/etc/sls_batch.pr of
sqlplus -s system/******* @/home/dba/adhoc/ins_sls_u ser.sql
exit ;
Here is what is in the profile sls_batch.prof
# ########################## ########## ########## ########## ########## ########## #
# AIX specific
# ########################## ########## ########## ########## ########## ########## #
PATH=usr/bin:/etc:/usr/sbi n:/ucb:$HO ME/bin:/us r/bin/X11: /sbin:.:/u sr/lpp/X11 /lib/R5/Mo tif1.2:\
:/usr/lbin:/home/dba/bin:/ home/dba/e tc:/ora734 /app/oracl e/product/ 734/bin:\
/ora734/app/oracle/product /734/sqlpl us/admin:.
export PATH
#PRINTER=DMP
#export PRINTER
# ########################## ########## ########## ########## ########## ########## #
# ORACLE specific
# ########################## ########## ########## ########## ########## ########## #
ORACLE_SID=sls
export ORACLE_SID
export ORACLE_HOME=/ora734/app/or acle/produ ct/734
Thanks
. /home/dba/etc/sls_batch.pr
sqlplus -s system/******* @/home/dba/adhoc/ins_sls_u
exit ;
Here is what is in the profile sls_batch.prof
# ##########################
# AIX specific
# ##########################
PATH=usr/bin:/etc:/usr/sbi
:/usr/lbin:/home/dba/bin:/
/ora734/app/oracle/product
export PATH
#PRINTER=DMP
#export PRINTER
# ##########################
# ORACLE specific
# ##########################
ORACLE_SID=sls
export ORACLE_SID
export ORACLE_HOME=/ora734/app/or
Thanks
This looks fine. I guess it's something in the SQL script which causes the error... Can you post that?
ASKER
spool /home/dba/log/ins_sls_user s.log
insert into system.sls_users
select a.username,a.osuser
from v$session a
Where a.osuser not in
(select b.osuser from system.sls_users b)
;
spool off
insert into system.sls_users
select a.username,a.osuser
from v$session a
Where a.osuser not in
(select b.osuser from system.sls_users b)
;
spool off
Do you get the same error when you run the shell script manually or only when you run it from cron?
I really don't see what the reason for the error might be...
I really don't see what the reason for the error might be...
ASKER
I can run the whole shell manually without any errors.
I can run the sql script without any errors from sqlplus
this only happens when I am running from cron. I suspect
it has something to do with running the os-user profile
in AIX
I can run the sql script without any errors from sqlplus
this only happens when I am running from cron. I suspect
it has something to do with running the os-user profile
in AIX
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem was in my crontab entry my entry looked like
this
00,15,30,45 * * * * * /path/script.sh >/path/log/script.log
It shoud have been and now is
00,15,30,45 * * * * /path/script.sh >/path/log/script.log
Thanks for your help
this
00,15,30,45 * * * * * /path/script.sh >/path/log/script.log
It shoud have been and now is
00,15,30,45 * * * * /path/script.sh >/path/log/script.log
Thanks for your help
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept pennnn's comment as answer
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jpkemp
EE Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
Accept pennnn's comment as answer
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
jpkemp
EE Cleanup Volunteer
SQL>SET EDITFILE /home/rajesh/afiedt.buf
Or Any other directory where you have permissions
-- rajeXsh