in UNIX Shell script I am inside one directory ex:- cd /usr/was/scr, then after i connect to the SQLPLUS to login into the Database to run the SQL script file xyz.sql from different directory location ex:- /usr/was/abcd. How to execute the xyz.sql after login into the database. Here i the sample code.
cd /usr/was/scr
sqlplus -s <schema>/<user>@<tns> << EOF
exec xyz.sql
spool xyz.log
exit;
EOF
xyz.sql file is in /usr/was/abcd directory.
exec /usr/was/abcd/xyz.sqlwork? Why do you want tocdin the first place anyway?