Integrate webtesting and SQLserver managament studio

my project requirement is that while I am doing web testing they need to launch SQL server Management studio 2016 run the script close then get back to web testing. I would like to know the ways in which I can implement this feature. i.e I am going to have to integrate web-database testing in one script.

  1. Can this be done in one script?
  2. Can someone please share information / videos related to this?