Running a .sql file
Posted: Mon Nov 22, 2010 11:10 am
Hi,
I have a .sql file say Query.sql file , it contains a series of sql queries which include cursors , looping etc.
I need to run this Query.sql file from datastage.
Currently i am storing it in Unix and using the below command in before job subroutine to invoke it from a dummy job.
sqlplus USER_NAME/PWD@DSN_NAME #$FilePath#Query.sql
It runs file , the problem is the dummy job wont get aborted when the query in the Query.sql fails to run.
How to abort the dummy job ? Or is there any better way to do this.
As a simple solution we can write a stored proc and run it from datastage,but the clinet is adamant to use the same Query.sql and not interested in creating procs
Thanks
I have a .sql file say Query.sql file , it contains a series of sql queries which include cursors , looping etc.
I need to run this Query.sql file from datastage.
Currently i am storing it in Unix and using the below command in before job subroutine to invoke it from a dummy job.
sqlplus USER_NAME/PWD@DSN_NAME #$FilePath#Query.sql
It runs file , the problem is the dummy job wont get aborted when the query in the Query.sql fails to run.
How to abort the dummy job ? Or is there any better way to do this.
As a simple solution we can write a stored proc and run it from datastage,but the clinet is adamant to use the same Query.sql and not interested in creating procs
Thanks