Is there a difference between COMMIT and END TRANSACTION ?

I have a batch process that commits sets of 25 pre-built sql scripts
on a timed basis.  I have been wrapping the execution of all 25 sets
in a single begin...end transaction set.  The problem is that if any
of those scripts fails to execute properly, than all 25 scripts are
rolled back.  It would be nice to get a bit better granuality, with
partial commits or something.

Enter COMMIT.  Does it allow you to commit portions of the sql
scripts?  I.e., could I start a BEGIN TRANSACTION;  then at the end of
each script execute a COMMIT to successfully commit that portion, and
then proceed to the end, and END TRANSACTION.  That way, if somewhere
down the line, I lose the 15th file, at least the first 14 are in the
database.

Or is COMMIT a synonym for END TRANSACTION?

-- Keith
******************************************************
- Ever notice how 'big' isn't, compared to 'small'?

- I'm not a professional; I just get paid to do this.

- Rules for programming:
   1.  Get it working, right?
   2.  Get it working right.

- Things I've learned about multithreaded programming:

    123...   PPArrvooottieedcc ttm  ueelvvteeirrtyyhtt
rhheiianndgge  dwi hnpi rctohhg eri aslm omscitanalgt 
 iowcbh,je engceltvo ebwrah lip,co hso srci abonlt ehb
.ee^Nr waicscee snsoetd  'aotb jtehcet -slaomcea lt'il
m^Ne from two or more threads
******************************************************

Reply via email to