Link to home
Start Free TrialLog in
Avatar of stanlip
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
Avatar of rajeXsh
rajeXsh

AT the begining of SQL session you can set

SQL>SET EDITFILE /home/rajesh/afiedt.buf

Or Any other directory where you have permissions

-- rajeXsh
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"?
Avatar of stanlip

ASKER

Here is the shell script I run

. /home/dba/etc/sls_batch.prof
sqlplus -s system/******* @/home/dba/adhoc/ins_sls_user.sql
exit ;

Here is what is in the profile sls_batch.prof


# #############################################################################
# AIX specific
# #############################################################################
PATH=usr/bin:/etc:/usr/sbin:/ucb:$HOME/bin:/usr/bin/X11:/sbin:.:/usr/lpp/X11/lib/R5/Motif1.2:\
:/usr/lbin:/home/dba/bin:/home/dba/etc:/ora734/app/oracle/product/734/bin:\
/ora734/app/oracle/product/734/sqlplus/admin:.
export PATH

#PRINTER=DMP
#export PRINTER


# #############################################################################
# ORACLE specific
# #############################################################################

ORACLE_SID=sls
export ORACLE_SID

export ORACLE_HOME=/ora734/app/oracle/product/734


Thanks
This looks fine. I guess it's something in the SQL script which causes the error... Can you post that?
Avatar of stanlip

ASKER

spool /home/dba/log/ins_sls_users.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
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...
Avatar of stanlip

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
ASKER CERTIFIED SOLUTION
Avatar of pennnn
pennnn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stanlip

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
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