Hello To Ctkroeker and Catkin,
Thanks so much for your effort. The
./exp command here is used to start the export utility; to collect all the required exported data for the In-House-Application. For example: after I have logged on as oracle9i from the SSH Client side, these are displayed:
Last login: Thu May 20 15:07:47 2010 from <IP_Address>
Sun Microsystems Inc. SunOS 5.9 Generic May 2002
-sh: /usr/ccs/bin,: not found
-sh: dbhome: not found
ORACLE_HOME = [] ?
Then I pass this path /opt/oracle9i/app/oracle/product/9.2.0/oradata as the ORACLE_HOME. On hitting the Return key, this is what displays:
SQL*Plus: Release 9.2.0.1.0 - Production on Fri May 21 12:39:57 2010
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL>
After database instance has started then I exit from the SQL prompt to the shell prompt
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
$ printenv
to see the environment variables
CLASSPATH=/opt/oracle9i/app/oracle/product/9.2.0/oradata/jlib/oembase-9_2_0.jar:/opt/oracle9i/app/oracle/product/9.2.0/oradata/jlib/oemlt-9_2_0.jar
emtools-9_2_0.jar
HOME=/export/home/oracle9i
LD_LIBRARY_PATH=/opt/oracle9i/app/oracle/product/9.2.0/oradata/lib32
LD_LIBRARY_PATH_64=/opt/oracle9i/app/oracle/product/9.2.0/oradata/lib
LOGNAME=oracle9i
ORACLE_BASE=/opt/oracle9i/app/oracle
ORACLE_HOME=/opt/oracle9i/app/oracle/product/9.2.0/oradata
ORACLE_SID=ORA_SID
PATH=/usr/bin:/usr/ucb:/etc:.:/opt/oracle9i/app/oracle/product/9.2.0/oradata/bin
SHELL=/bin/sh
TERM=vt100
TNS_ADMIN=/opt/oracle9i/app/oracle/product/9.2.0/oradata/network/admin
TZ=Africa/Accra
USER=oracle9i
From the environment variables, you'll realize that the
HOME=/export/home/oracle9i and the
ORACLE_HOME=/opt/oracle9i/app/oracle/product/9.2.0/oradata. So I cd $ORACLE_HOME/bin where the
exp utility is invoked with
./exp and followed by the In-House-Application name and Password to be exported. In the
/bin directory is where I run the export. For example:
./exp apps_name/apps_passwd@ORA_SID statistics=none And by hitting the return key, export of the applicatiion specified begins. After all the tables and data or information in the database based on that particular application have been gathered, the
expdat.dmp file is created within the
/bin directory. To allow for the next application information to be gathered, I move the expdat.dmp file to a different directory and after renaming it. For example:
mv /data2/in_hse_apps_exports/apps_name.dmp hereby the expdat.dmp file has been renamed and stored in the specified directory.
Code/Command:
$ pwd
/opt/oracle9i/app/oracle/product/9.2.0/oradata/bin
$ ./exp apps_name/apps_passwd@ORA_SID statistics=none
$ mv /data2/in_hse_apps_exports/apps_name.dmp
Whenever I run these commands directly from the
/opt/oracle9i/app/oracle/product/9.2.0/oradata/bin directory, no errors are generated, but whenever I use the script, then the errors:
./exp: not found
mv: cannot access expdat.dmp
The Crontab file executing this script is in the
/export/home/oracle9i/mycrontab . Here, mycrontab is the name of the crontab file I created.
Brethren, I think I have given you a clearer picture now. So I'm not misusing the export command, but this is the scenario at the moment. I will get back to you as soon as all is set for the time being. I'm still using your advice and directives.
Thank you,
sam4classic