begin tran
begin try
script..........
end try
begin catch
print ERROR_MESSAGE() ROLLBACK tran
end catch
commit