Running scripts in SQL Server Management Studio
From EHS Help
_NOTOC__
This is a Technical (IT) Instructions topic
Running Scripts from Files
Instructions here are specifically for the IBID Training Centre in Wythenshawe, but the principles apply to any installation.
- 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
- 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.