|
288 | 288 | "Synopsis": "Migrates SQL Server databases from one SQL Server to another.",
|
289 | 289 | "Name": "Copy-DbaDatabase",
|
290 | 290 | "Links": "https://dbatools.io/Copy-DbaDatabase",
|
291 | | - "Examples": "\r\n-------------------------- EXAMPLE 1 --------------------------\r\n\r\nPS C:\\\u003eCopy-DbaDatabase -Source sqlserver2014a -Destination sqlserver2014b -Database TestDB -BackupRestore \r\n-NetworkShare \\\\fileshare\\sql\\migration\r\n\r\nMigrates a single user database TestDB using Backup and restore from instance sqlserver2014a to sqlserver2014b. Backup \r\nfiles are stored in \\\\fileshare\\sql\\migration.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 2 --------------------------\r\n\r\nPS C:\\\u003eCopy-DbaDatabase -Source sqlserver2014a -Destination sqlcluster -DetachAttach -Reattach\r\n\r\nDatabases will be migrated from sqlserver2014a to sqlcluster using the detach/copy files/attach method.The following \r\nwill be performed: kick all users out of the database, detach all data/log files, move files across the network over an \r\nadmin share (\\\\SqlSERVER\\M$\\MSSql...), attach file on destination server, reattach at source. If the database files \r\n(*.mdf, *.ndf, *.ldf) on *destination* exist and aren\u0027t in use, they will be overwritten.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 3 --------------------------\r\n\r\nPS C:\\\u003eCopy-DbaDatabase -Source sqlserver2014a -Destination sqlcluster -ExcludeDatabase Northwind, pubs \r\n-IncludeSupportDbs -Force -BackupRestore -NetworkShare \\\\fileshare\\sql\\migration\r\n\r\nMigrates all user databases except for Northwind and pubs by using backup/restore (copy-only). Backup files are stored \r\nin \\\\fileshare\\sql\\migration. If the database exists on the destination, it will be dropped prior to attach.\r\n\r\nIt also includes the support databases (ReportServer, ReportServerTempDb, distribution).\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n" |
| 291 | + "Examples": "\r\n-------------------------- EXAMPLE 1 --------------------------\r\n\r\nPS C:\\\u003eCopy-DbaDatabase -Source sql2014a -Destination sql2014b -Database TestDB -BackupRestore -NetworkShare \r\n\\\\fileshare\\sql\\migration\r\n\r\nMigrates a single user database TestDB using Backup and restore from instance sql2014a to sql2014b. Backup files are \r\nstored in \\\\fileshare\\sql\\migration.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 2 --------------------------\r\n\r\nPS C:\\\u003eCopy-DbaDatabase -Source sql2012 -Destination sql2014, sql2016 -DetachAttach -Reattach\r\n\r\nDatabases will be migrated from sql2012 to both sql2014 and sql2016 using the detach/copy files/attach method.The \r\nfollowing will be performed: kick all users out of the database, detach all data/log files, move files across the \r\nnetwork over an admin share (\\\\SqlSERVER\\M$\\MSSql...), attach file on destination server, reattach at source. If the \r\ndatabase files (*.mdf, *.ndf, *.ldf) on *destination* exist and aren\u0027t in use, they will be overwritten.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 3 --------------------------\r\n\r\nPS C:\\\u003eCopy-DbaDatabase -Source sql2014a -Destination sqlcluster, sql2016 -BackupRestore -UseLastBackups -Force\r\n\r\nMigrates all user databases to sqlcluster and sql2016 using the last Full, Diff and Log backups from sql204a. If the \r\ndatabases exists on the destinations, they will be dropped prior to attach.\r\n\r\nNote that the backups must exist in a location accessible by all destination servers, such a network share.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 4 --------------------------\r\n\r\nPS C:\\\u003eCopy-DbaDatabase -Source sql2014a -Destination sqlcluster -ExcludeDatabase Northwind, pubs -IncludeSupportDbs \r\n-Force -BackupRestore -NetworkShare \\\\fileshare\\sql\\migration\r\n\r\nMigrates all user databases except for Northwind and pubs by using backup/restore (copy-only). Backup files are stored \r\nin \\\\fileshare\\sql\\migration. If the database exists on the destination, it will be dropped prior to attach.\r\n\r\nIt also includes the support databases (ReportServer, ReportServerTempDb, distribution).\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n" |
292 | 292 | },
|
293 | 293 | {
|
294 | 294 | "CommandName": "Copy-DbaDatabaseAssembly",
|
|
2465 | 2465 | "Links": "https://dbatools.io/Get-DbaSsisEnvironmentVariable",
|
2466 | 2466 | "Examples": "\r\n-------------------------- EXAMPLE 1 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV -Folder DWH_ETL\r\n\r\nGets variables of \u0027DEV\u0027 environment located in \u0027DWH_ETL\u0027 folder on \u0027localhost\u0027 Server\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 2 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV -Folder DWH_ETL, DEV2, QA\r\n\r\nGets variables of \u0027DEV\u0027 environment(s) located in folders \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \u0027localhost\u0027 server\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 3 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV -FolderExclude DWH_ETL, DEV2, QA\r\n\r\nGets variables of \u0027DEV\u0027 environments located in folders other than \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \u0027localhost\u0027 server\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 4 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -Environment DEV, PROD -Folder DWH_ETL, DEV2, QA\r\n\r\nGets variables of \u0027DEV\u0027 and \u0027PROD\u0027 environment(s) located in folders \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \u0027localhost\u0027 server\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 5 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -EnvironmentExclude DEV, PROD -Folder DWH_ETL, DEV2, QA\r\n\r\nGets variables of environments other than \u0027DEV\u0027 and \u0027PROD\u0027 located in folders \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \u0027localhost\u0027 \r\nserver\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 6 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaSsisEnvironmentVariable -SqlInstance localhost -EnvironmentExclude DEV, PROD -FolderExclude DWH_ETL, \r\nDEV2, QA\r\n\r\nGets variables of environments other than \u0027DEV\u0027 and \u0027PROD\u0027 located in folders other than \u0027DWH_ETL\u0027, \u0027DEV2\u0027 and \u0027QA\u0027 on \r\n\u0027localhost\u0027 server\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 7 --------------------------\r\n\r\nPS C:\\\u003e\u0027localhost\u0027 | Get-DbaSsisEnvironmentVariable -EnvironmentExclude DEV, PROD\r\n\r\nGets all SSIS environments except \u0027DEV\u0027 and \u0027PROD\u0027 from \u0027localhost\u0027 server. The server name comes from pipeline\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 8 --------------------------\r\n\r\nPS C:\\\u003e\u0027SRV1\u0027, \u0027SRV3\u0027 | Get-DbaSsisEnvironmentVariable\r\n\r\nGets all SSIS environments from \u0027SRV1\u0027 and \u0027SRV3\u0027 servers. The server\u0027s names come from pipeline\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 9 --------------------------\r\n\r\nPS C:\\\u003e\u0027SRV1\u0027, \u0027SRV2\u0027 | Get-DbaSsisEnvironmentVariable DEV | Out-GridView\r\n\r\nGets all variables from \u0027DEV\u0027 Environment(s) on servers \u0027SRV1\u0027 and \u0027SRV2\u0027 and outputs it as the GridView.\r\nThe server names come from the pipeline.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 10 --------------------------\r\n\r\nPS C:\\\u003e\u0027localhost\u0027 | Get-DbaSsisEnvironmentVariable -EnvironmentExclude DEV, PROD | Select-Object -Property Name, Value \r\n| Where-Object {$_.Name -match \u0027^a\u0027} | Out-GridView\r\n\r\nGets all variables from Environments other than \u0027DEV\u0027 and \u0027PROD\u0027 on \u0027localhost\u0027 server,\r\nselects Name and Value properties for variables that names start with letter \u0027a\u0027 and outputs it as the GridView\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
|
2467 | 2467 | },
|
| 2468 | + { |
| 2469 | + "CommandName": "Get-DbaSsisExecutionHistory", |
| 2470 | + "Description": "This command gets execution history for SSIS executison given one or more instances and can be filtered by Project, Environment,Folder or Status.", |
| 2471 | + "Tags": [ |
| 2472 | + "Migration", |
| 2473 | + "SSIS" |
| 2474 | + ], |
| 2475 | + "Author": "Chris Tucker (ChrisTucker, @ChrisTuc47368095)", |
| 2476 | + "Synopsis": "Get-DbaSsisHistory Retreives SSIS project and package execution History, and environments from one SQL Server to another.", |
| 2477 | + "Name": "Get-DbaSsisExecutionHistory", |
| 2478 | + "Links": "https://dbatools.io/Get-DbaSsisExecutionHistory", |
| 2479 | + "Examples": "\r\n-------------------------- EXAMPLE 1 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaSsisExecutionHistory -SqlInstance SMTQ01 -Folder SMTQ_PRC\r\n\r\nGet all history items for SMTQ01 in folder SMTQ_PRC.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 2 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaSsisExecutionHistory -SqlInstance SMTQ01 -Status Failed,Cancelled\r\n\r\nGets all failed or canceled executions for SMTQ01.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 3 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaSsisExecutionHistory -SqlInstance SMTQ01,SMTQ02 -Status Failed,Cancelled -Whatif\r\n\r\nShows what would happen if the command were executed and would return the SQL statement that would be executed per \r\ninstance.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n" |
| 2480 | + }, |
2468 | 2481 | {
|
2469 | 2482 | "CommandName": "Get-DbaStartupParameter",
|
2470 | 2483 | "Description": "Displays values for a detailed list of SQL Server Startup Parameters including Master Data Path, Master Log path, Error Log, Trace Flags, Parameter String and much more.\n\nThis command relies on remote Windows Server (SQL WMI/WinRm) access. You can pass alternative Windows credentials by using the -Credential parameter.\n\nSee https://msdn.microsoft.com/en-us/library/ms190737.aspx for more information.",
|
|
2754 | 2767 | "Synopsis": "Imports a new Performance Monitor Data Collector Set Template either from the dbatools repository or a file you specify.",
|
2755 | 2768 | "Name": "Import-DbaPfDataCollectorSetTemplate",
|
2756 | 2769 | "Links": "https://dbatools.io/Import-DbaPfDataCollectorSetTemplate",
|
2757 | | - "Examples": "\r\n-------------------------- EXAMPLE 1 --------------------------\r\n\r\nPS C:\\\u003eImport-DbaPfDataCollectorSetTemplate -SqlInstance sql2017 -Template \u0027Long Running Query\u0027\r\n\r\nCreates a new data collector set named \u0027Long Running Query\u0027 from the dbatools repository on the SQL Server sql2017.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 2 --------------------------\r\n\r\nPS C:\\\u003eImport-DbaPfDataCollectorSetTemplate -SqlInstance sql2017 -Template \u0027Long Running Query\u0027 -DisplayName \u0027New Long \r\nrunning query\u0027 -Confirm\r\n\r\nCreates a new data collector set named \"New Long Running Query\" using the \u0027Long Running Query\u0027 template. Forces a \r\nconfirmation if the template exists.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 3 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaPfDataCollectorSet -SqlInstance sql2017 -Session db_ola_health | Remove-DbaData collector set\r\n\r\nImport-DbaPfDataCollectorSetTemplate -SqlInstance sql2017 -Template db_ola_health | Start-DbaData collector set\r\n\r\nImports a session if it exists, then recreates it using a template.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 4 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaPfDataCollectorSetTemplate | Out-GridView -PassThru | Import-DbaPfDataCollectorSetTemplate -SqlInstance \r\nsql2017\r\n\r\nAllows you to select a Session template then import to an instance named sql2017.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 5 --------------------------\r\n\r\nPS C:\\\u003eImport-DbaPfDataCollectorSetTemplate -SqlInstance sql2017 -Template \u0027Long Running Query\u0027 -Instance SHAREPOINT\r\n\r\nCreates a new data collector set named \u0027Long Running Query\u0027 from the dbatools repository on the SQL Server sql2017 for \r\nboth the default and the SHAREPOINT instance.\r\n\r\nIf you\u0027d like to remove counters for the default instance, use Remove-DbaPfDataCollectorCounter.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n" |
| 2770 | + "Examples": "\r\n-------------------------- EXAMPLE 1 --------------------------\r\n\r\nPS C:\\\u003eImport-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template \u0027Long Running Query\u0027\r\n\r\nCreates a new data collector set named \u0027Long Running Query\u0027 from the dbatools repository on the SQL Server sql2017.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 2 --------------------------\r\n\r\nPS C:\\\u003eImport-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template \u0027Long Running Query\u0027 -DisplayName \u0027New Long \r\nrunning query\u0027 -Confirm\r\n\r\nCreates a new data collector set named \"New Long Running Query\" using the \u0027Long Running Query\u0027 template. Forces a \r\nconfirmation if the template exists.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 3 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaPfDataCollectorSet -ComputerName sql2017 -Session db_ola_health | Remove-DbaPfDataCollectorSet\r\n\r\nImport-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template db_ola_health | Start-DbaPfDataCollectorSet\r\n\r\nImports a session if it exists, then recreates it using a template.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 4 --------------------------\r\n\r\nPS C:\\\u003eGet-DbaPfDataCollectorSetTemplate | Out-GridView -PassThru | Import-DbaPfDataCollectorSetTemplate -ComputerName \r\nsql2017\r\n\r\nAllows you to select a Session template then import to an instance named sql2017.\r\n\r\n\r\n\r\n\r\n-------------------------- EXAMPLE 5 --------------------------\r\n\r\nPS C:\\\u003eImport-DbaPfDataCollectorSetTemplate -ComputerName sql2017 -Template \u0027Long Running Query\u0027 -Instance SHAREPOINT\r\n\r\nCreates a new data collector set named \u0027Long Running Query\u0027 from the dbatools repository on the SQL Server sql2017 for \r\nboth the default and the SHAREPOINT instance.\r\n\r\nIf you\u0027d like to remove counters for the default instance, use Remove-DbaPfDataCollectorCounter.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n" |
2758 | 2771 | },
|
2759 | 2772 | {
|
2760 | 2773 | "CommandName": "Import-DbaRegisteredServer",
|
|
3313 | 3326 | "Directory",
|
3314 | 3327 | "Folder"
|
3315 | 3328 | ],
|
3316 | | - "Author": "Chrissy LeMaire (@cl), netnerds.net", |
| 3329 | + "Author": "Stuart Moore", |
3317 | 3330 | "Synopsis": "Creates new path as specified by the path variable",
|
3318 | 3331 | "Name": "New-DbaSqlDirectory",
|
3319 | 3332 | "Links": "https://dbatools.io/New-DbaSqlDirectory",
|
|
0 commit comments