Running scripts in SQL Server Management Studio

From EHS Help
Jump to: navigation, search


This is a Technical (IT) Instructions topic


Instructions here are specifically for the IBID Training Centre in Wythenshawe, but the principles apply to any installation.

Running Scripts from Files

Use these instructions if you have an .SQL file.

  • Start remote desktop and login to UHSM-IBID2.
  • Start MS SQL Server Management Studio
  • Select File > Open > File from the menu (or press CTRL + O) (or press the Open button on the toolbar)
  • In the Open File window, pick the .sql file and press Open
  • On the Toolbar, ensure that the database drop down list is showing the name of the database you want the script to act upon.
  • Press Execute on the toolbar.


Running Scripts via copy & paste

Use these instructions if the SQL you need is on a web-page or in another application.

  • Start remote desktop and login to UHSM-IBID2.
  • Start MS SQL Server Management Studio
  • Copy the SQL script to the clipboard from another program, e.g. the web - being careful to include all characters.
  • Press the New Query button on the toolbar.
  • Paste the SQL into the query window by pressing CTRL + V (or selecting Edit > Paste from the menu)
  • On the Toolbar, ensure that the database drop down list is showing the name of the database you want the script to act upon.
  • Press Execute on the toolbar.