My current scenario is like this:
- I need to login to sqlplus from a shell script to call a stored procedure.
- After that I need to create a CSV file by SPOOLING data from a table.
- Then I need to check whether the CSV file has been created in a particular directory and depending on the result an update query needs to be run.
I know that this can be checked within sqlplus with the help of UTL_FILE package but unfortunately due to Client policies,the access of this package is restricted in the current system.
Another way is to exit from sqlplus and perform the file check in UNIX and then again log in to sqlplus to perform the rest actions. But this I believe would result in slower execution time and performance is an important factor in this implementation as the tables contain huge volumes of data(in millions).
So is there any other way to check this from sqlplus without exiting from the current session?
OS - Red Hat Enterprise Linux
Database - Oracle 11g