< Back
New-DbaDiagnosticAdsNotebook
Post
NAME New-DbaDiagnosticAdsNotebook
SYNOPSIS
Creates a new Diagnostic Jupyter Notebook for use with Azure Data Studio
SYNTAX
New-DbaDiagnosticAdsNotebook [[-SqlInstance] <DbaInstanceParameter>] [[-SqlCredential] <Pscredential>]
[[-TargetVersion] <String>] [-Path] <String> [-IncludeDatabaseSpecific <Switch>] [-EnableException <Switch>]
[<CommonParameters>]
DESCRIPTION
Creates a new Jupyter Notebook for use with Azure Data Studio, based on Glenn Berry's
popular Diagnostic queries
PARAMETERS
-EnableException [<Switch>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-IncludeDatabaseSpecific [<Switch>]
If this switch is enabled, the notebook will also include database-specific queries. Defaults to $false.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Path [<String>]
Specifies the output path of the Jupyter Notebook
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-SqlCredential [<Pscredential>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-SqlInstance [<DbaInstanceParameter>]
The target SQL Server instance or instances. Defaults to the default instance on localhost.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-TargetVersion [<String>]
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"
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Tags: Community, GlennBerry, Notebooks, AzureDataStudio
Author: Gianluca Sartori (@spaghettidba)
Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- 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
RELATED LINKS
https://dbatools.io/New-DbaDiagnosticAdsNotebook
SYNOPSIS
Creates a new Diagnostic Jupyter Notebook for use with Azure Data Studio
SYNTAX
New-DbaDiagnosticAdsNotebook [[-SqlInstance] <DbaInstanceParameter>] [[-SqlCredential] <Pscredential>]
[[-TargetVersion] <String>] [-Path] <String> [-IncludeDatabaseSpecific <Switch>] [-EnableException <Switch>]
[<CommonParameters>]
DESCRIPTION
Creates a new Jupyter Notebook for use with Azure Data Studio, based on Glenn Berry's
popular Diagnostic queries
PARAMETERS
-EnableException [<Switch>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-IncludeDatabaseSpecific [<Switch>]
If this switch is enabled, the notebook will also include database-specific queries. Defaults to $false.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Path [<String>]
Specifies the output path of the Jupyter Notebook
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-SqlCredential [<Pscredential>]
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.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-SqlInstance [<DbaInstanceParameter>]
The target SQL Server instance or instances. Defaults to the default instance on localhost.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-TargetVersion [<String>]
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"
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Tags: Community, GlennBerry, Notebooks, AzureDataStudio
Author: Gianluca Sartori (@spaghettidba)
Website: https://dbatools.io
Copyright: (c) 2018 by dbatools, licensed under MIT
License: MIT https://opensource.org/licenses/MIT
-------------------------- 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
RELATED LINKS
https://dbatools.io/New-DbaDiagnosticAdsNotebook