SQL Scripts Manager 2

Worked example - running a script and saving the results

In this example, we'll run the Version and uptime for an instance script, and save the results to a file.

The Version and uptime for an instance script is provided with SQL Scripts Manager along with more than 25 other scripts written by recognized SQL Server experts. You can read more about each script in the Scripts reference.

Run the script and save the results

  1. Start SQL Scripts Manager if it is not already running.
    The right-hand pane shows all the available scripts, and the left-hand pane lists the tags and author names that are associated with the scripts.

    Select a tag or author name to display only the matching scripts.
  2. Scroll to the bottom of the list and locate the Version and uptime for an instance script.
    This script, and all the other scripts, include:
    • An Open button: displays the script's form (GUI); this is where you select an instance/database, and set any parameters required by the script
    • A Script details link: displays the Details dialog for the script; this includes a description, the source code for the script (SQL, IronPython, SMO, or Powershell), and information about the author
    • A Preset list: contains previously saved settings for each script
  3. Click Open.
    If this is the first time you have run this script on the local computer, the Details dialog is displayed, along with a warning message to check whether you have considered the implications of running the script. (If you have already run this script on the local computer, the Run dialog is displayed.)
    Once you have reviewed the information on the Description tab, click Continue to proceed to the Run dialog box.
  4. On the Server drop-down list, select the SQL Server instance you want to check.
  5. Select the relevant authentication details, and type your User name and Password if required.
  6. Click Run.
    The Results dialog box is displayed, and SQL Scripts Manager runs the Version and uptime for an instance script.
  7. When the script has finished running (shown by the 'Success' message), click Export to CSV to open a file browser, then type or select a file name that will store the results, and click Save.
    The script results are now saved in comma separated value (CSV) format.
  8. Click Close to return to the main SQL Scripts Manager window.

Didn't find what you were looking for?