commands

^

New-DbaDiagnosticAdsNotebook

Author Gianluca Sartori (@spaghettidba)
Availability Windows, Linux, macOS

 

Synopsis

Creates a new Diagnostic Jupyter Notebook for use with Azure Data Studio

Description

Creates a new Jupyter Notebook for use with Azure Data Studio, based on Glenn Berry's popular Diagnostic queries

Syntax

New-DbaDiagnosticAdsNotebook
    [[-SqlInstance] <DbaInstanceParameter>]
    [[-SqlCredential] <PSCredential>]
    [[-TargetVersion] <String>]
    [-Path] <String>
    [-IncludeDatabaseSpecific]
    [-EnableException]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

 

Examples

 

Example: 1
PS C:\> New-DbaDiagnosticAdsNotebook -SqlInstance localhost -Path c:\temp\myNotebook.ipynb

Creates a new Jupyter Notebook named "myNotebook" based on the version of diagnostic queries found at localhost

Example: 2
PS C:\> New-DbaDiagnosticAdsNotebook -TargetVersion 2016SP2 -Path c:\temp\myNotebook.ipynb

Creates a new Jupyter Notebook named "myNotebook" based on the version "2016SP2" of diagnostic queries

Example: 3
PS C:\> New-DbaDiagnosticAdsNotebook -TargetVersion 2017 -Path c:\temp\myNotebook.ipynb -IncludeDatabaseSpecific

Creates a new Jupyter Notebook named "myNotebook" based on the version "2017" of diagnostic queries, including database-specific queries

Required Parameters

-Path

Specifies the output path of the Jupyter Notebook

Alias
Required True
Pipeline false
Default Value

Optional Parameters

-SqlInstance

The target SQL Server instance or instances. Defaults to the default instance on localhost.

Alias
Required False
Pipeline false
Default Value
-SqlCredential

Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential). Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported. For MFA support, please use Connect-DbaInstance.

Alias
Required False
Pipeline false
Default Value
-TargetVersion

If you are not creating the notebook for a specific instance of SQL Server, you can specify the version that you want to create the notebook for. Must be one of "2005", "2008", "2008R2", "2012", "2014", "2016", "2016SP2", "2017", "2019", "AzureSQLDatabase"

Alias
Required False
Pipeline false
Default Value
Accepted Values 2005,2008,2008R2,2012,2014,2016,2016SP2,2017,2019,AzureSQLDatabase
-IncludeDatabaseSpecific

If this switch is enabled, the notebook will also include database-specific queries. Defaults to $false.

Alias
Required False
Pipeline false
Default Value False
-EnableException

By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message. This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting. Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.

Alias
Required False
Pipeline false
Default Value False
-WhatIf

Shows what would happen if the command were to run. No actions are actually performed.

Alias wi
Required False
Pipeline false
Default Value
-Confirm

Prompts you for confirmation before executing any changing operations within the command.

Alias cf
Required False
Pipeline false
Default Value

 

Want to see the source code for this command? Check out New-DbaDiagnosticAdsNotebook on GitHub.
Want to see the Bill Of Health for this command? Check out New-DbaDiagnosticAdsNotebook.