title: How to check if an SQL Script executed successfully in MS SQL Server?
body: <p>I have created multiple SQL DB Maintenance scripts which I am required to run in a defined order. I have 2 scripts. I want to run the 2nd script, only on successful execution of 1st script. The scripts contain queries that creates tables, stored procedures, SQL jobs etc. </p>
  
  <p>Please suggest an optimal way of achieving this. I am using MS SQL Server 2012. 
  I am trying to implement it without using an SQL job.</p>