Adding and Sharing Scripts
Why not join the experts? Add your own scripts to SQL Scripts Manager to share with your colleagues, and the wider SQL Server community.
For scripts which run against a server or a database, without any other parameters, it's simple and straightforward to add and upload your scripts. Simply follow the steps below:
- Grab the relevant template XML file for either running a script against a SQL Server instance or running a script against a specific database on a SQL Server instance, and save a copy with a sensible filename
- In your favorite XML editor (for example XMLPad or Notepad++ - set the language to XML in the menu, to get the best experience with this tool), simply change the script name, description, your name, and any relevant details like homepage and twitter handle
- Copy / paste your script into the identified place in the script
- Test that the script works OK...
- ...and then upload it to SQL Server Central
For further tips on adding your scripts, particularly for more complicated scripts, see the links below:
- To get expert advice on how to add your own scripts, read through this article from William Brewer.
- William Brewer has also written an article about how to add PowerShell scripts to SQL Scripts Manager. This will also allow access to SQL Server Management Objects (SMO).
- See our SQL Server Central wiki to upload your own scripts and download scripts from your peers.
- There is also useful information in the Support Center about adding in your own scripts.