• [Script Of Jan. 21] How to get the scripts of all the SQL Server Agent jobs

    Jan.
    21
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-get-the-of-all-the-81859696.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This PowerShell script will demonstrate how to get the scripts of all the SQL Server Agent jobs.

    To get all the job scripts, we need to perform the following steps: 1.Connect to SQL Server 2.Press F7 to open the Object Explorer Details 3.Select all the jobs and then right click on them 4.Select Script Job as->create job to->file But some people want to know if there is a simpler way to do it. Therefore here we provide them with a script so that they can get all the job scripts with one step.

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script Of Jan. 20] How to attach a user database in SQL Server (PowerShell)

    Jan.
    20
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-attach-a-user-28a47521.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This PowerShell script will demonstrate how to attach a user database in SQL Server.

    This script will demonstrate how to attach a user database in SQL Server. As some people asked how to do this in TechNet, it will be much more convenient if we provide a script for them.

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script Of Jan. 17] How to sum the child nodes for a parent node in a SQL Server table

    Jan.
    17
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-sum-the-child-nodes-9430fb12.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This script is to sum the child nodes for a parent node in a SQL Server table.

    As some people asked how to get the sum of total child nodes for a parent node, this script will demonstrate how to do this by creating a sample table.

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script Of Jan. 16] How to detach all user databases in SQL Server

    Jan.
    16
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-detach-all-user-2ac10717.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This script is to detach all user databases in a SQL Server instance.

    As some people asked how to detach all user databases in a SQL Server instance, this script can be used to achieve this goal when there is no session in any user database.

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

  • [Script Of Jan. 15] How to check if a SQL Server is running on a physical or virtual machine

    Jan.
    15
    image
    image

    Script Download:  
    The script is available for download from https://gallery.technet.microsoft.com//How-to-check-if-a-SQL-6ba95335.  You can also use  Microsoft Script Browser for Windows PowerShell ISE to download the sample with one button click from within your scripting environment. 

    This script is to check if a SQL Server is running on a physical or virtual machine.

    As some people asked how to check if a SQL Server is running on a physical or virtual machine, this script will provide some help.

    You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery