Hi,
How to Validate SQL scripts?
I am having set of sql files i wish to run one by one if there is any error at one file i need to notify to the user.I have created Bat file in-order to execute in a sequence.how to validate in bat file
say
01.sql ---Sucess
02.sql --- Fail -- intimate and not to execute rest of sql files
03.sql
04.sql
Thanks!
How to validate SQL scripts
Moderator: DosItHelp
Re: How to validate SQL scripts
this will only work, if your SQL program sets an exit code OR creates new tables, reports etc. in case of success.
-
- Posts: 4
- Joined: 07 May 2013 00:13
Re: How to validate SQL scripts
That is what i am asking how to do so if there was an errror. Validation on the script.
Re: How to validate SQL scripts
Are you using SQLPlus?
-
- Posts: 4
- Joined: 07 May 2013 00:13
Re: How to validate SQL scripts
The files are oracle file. I have saved in .SQL format.
Re: How to validate SQL scripts
How are you executing the queries?
Above you were told by Endoro that the method you use had to return an errorlevel, or test by existence of the files, and that sounds reasonable to me.
We aren't mind readers - you have to provide details for people to give advice on.
Above you were told by Endoro that the method you use had to return an errorlevel, or test by existence of the files, and that sounds reasonable to me.
We aren't mind readers - you have to provide details for people to give advice on.