BEGIN TRANSACTION [Tran1]
BEGIN TRY
-- sql statements(update/insert...)
COMMIT TRANSACTION [Tran1]
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION [Tran1]
SELECT ERROR_MESSAGE() AS ErrorMessage;
END CATCH