|
1 | 1 | [ |
2 | 2 | { |
3 | 3 | "Name": "Add-DbaAgDatabase", |
4 | | - "Description": "Adds database(s) to an Availability Group on a SQL Server instance.\n\nAfter checking for prerequisites, the commands runs these five steps for every database:\nStep 1: Setting seeding mode if needed.\n If -SeedingMode is used and the current seeding mode of the replica is not in the desired mode, the seeding mode of the replica is changed.\n The seeding mode will not be changed back but stay in this mode.\n If the seeding mode is changed to Automatic, the necessary rights to create databases will be granted.\nStep 2: Running backup and restore if needed.\n Action is only taken for replicas with a desired seeding mode of Manual and where the database does not yet exist.\n If -UseLastBackup is used, the restore will be performed based on the backup history of the database.\n Otherwise a full and log backup will be taken at the primary and those will be restored at the replica.\nStep 3: Add the database to the Availability Group on the primary replica.\nStep 4: Add the database to the Availability Group on the secondary replicas.\nStep 5: Wait for the database to finish joining the Availability Group on the secondary replicas.\n\nUse Test-DbaAvailabilityGroup with -AddDatabase to test if all prerequisites are met.\n\nIn case you need a special setup for the database at the replicas, please do the backup restore part\n\nIf you have special requirements for the setup for the database at the replicas,\nperform the backup and restore part with Backup-DbaDatabase and Restore-DbaDatabase in advance.\nPlease make sure that the last log backup has been restored before running Add-DbaAgDatabase.\n\nKnown limitations:\n\nIt is not possible to use this command to add the database to a newly added replica,\nbecause the command fails if the database is already part of the Availability Group.\nThis limitation will be removed in a later version.", |
| 4 | + "Description": "Adds database(s) to an Availability Group on a SQL Server instance.\n\nAfter checking for prerequisites, the commands runs these five steps for every database:\nStep 1: Setting seeding mode if needed.\n If -SeedingMode is used and the current seeding mode of the replica is not in the desired mode, the seeding mode of the replica is changed.\n The seeding mode will not be changed back but stay in this mode.\n If the seeding mode is changed to Automatic, the necessary rights to create databases will be granted.\nStep 2: Running backup and restore if needed.\n Action is only taken for replicas with a desired seeding mode of Manual and where the database does not yet exist.\n If -UseLastBackup is used, the restore will be performed based on the backup history of the database.\n Otherwise a full and log backup will be taken at the primary and those will be restored at the replica.\nStep 3: Add the database to the Availability Group on the primary replica.\n This step is skipped, if the database is already part of the Availability Group.\nStep 4: Add the database to the Availability Group on the secondary replicas.\n This step is skipped for those replicas, where the database is already joined to the Availability Group.\nStep 5: Wait for the database to finish joining the Availability Group on the secondary replicas.\n\nUse Test-DbaAvailabilityGroup with -AddDatabase to test if all prerequisites are met.\n\nIf you have special requirements for the setup for the database at the replicas,\nperform the backup and restore part with Backup-DbaDatabase and Restore-DbaDatabase in advance.\nPlease make sure that the last log backup has been restored before running Add-DbaAgDatabase.", |
5 | 5 | "Tags": [ |
6 | 6 | "AG", |
7 | 7 | "HA" |
|
52 | 52 | ], |
53 | 53 | [ |
54 | 54 | "Secondary", |
55 | | - "Not required - the command will figure this out. But use this parameter if secondary replicas listen on a non default port.", |
| 55 | + "Not required - the command will figure this out. But use this parameter if secondary replicas listen on a non default port.\r\nThis parameter can be used to only add the databases on specific secondary replicas.", |
56 | 56 | "", |
57 | 57 | false, |
58 | 58 | "false", |
@@ -22172,12 +22172,12 @@ |
22172 | 22172 | "CommandName": "Get-DbaNetworkCertificate", |
22173 | 22173 | "Availability": "Windows only", |
22174 | 22174 | "Links": "https://dbatools.io/Get-DbaNetworkCertificate", |
22175 | | - "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaNetworkCertificate\nGets computer certificates on localhost that are candidates for using with SQL Server\u0027s network encryption\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaNetworkCertificate -ComputerName sql2016\nGets computer certificates on sql2016 that are being used for SQL Server network encryption", |
| 22175 | + "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaNetworkCertificate -SqlInstance sql2016\nGets computer certificate for the standard instance on sql2016 that is being used for SQL Server network encryption\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eGet-DbaNetworkCertificate -SqlInstance server1\\sql2017\nGets computer certificate for the named instance sql2017 on server1 that is being used for SQL Server network encryption", |
22176 | 22176 | "Params": [ |
22177 | 22177 | [ |
| 22178 | + "SqlInstance", |
| 22179 | + "The target SQL Server instance or instances. Defaults to standard instance on localhost. If target is a cluster, you must specify the distinct nodes.", |
22178 | 22180 | "ComputerName", |
22179 | | - "The target SQL Server instance or instances. Defaults to localhost. If target is a cluster, you must specify the distinct nodes.", |
22180 | | - "", |
22181 | 22181 | false, |
22182 | 22182 | "true (ByValue)", |
22183 | 22183 | "$env:COMPUTERNAME", |
|
22202 | 22202 | "" |
22203 | 22203 | ] |
22204 | 22204 | ], |
22205 | | - "Syntax": "Get-DbaNetworkCertificate [[-ComputerName] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]" |
| 22205 | + "Syntax": "Get-DbaNetworkCertificate [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-Credential] \u003cPSCredential\u003e] [-EnableException] [\u003cCommonParameters\u003e]" |
22206 | 22206 | }, |
22207 | 22207 | { |
22208 | 22208 | "Name": "Get-DbaNetworkConfiguration", |
|
46965 | 46965 | ], |
46966 | 46966 | "Syntax": "Remove-DbaDbSynonym [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-ExcludeDatabase] \u003cString[]\u003e] [[-Schema] \u003cString[]\u003e] [[-ExcludeSchema] \u003cString[]\u003e] [[-Synonym] \u003cString[]\u003e] [[-ExcludeSynonym] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]" |
46967 | 46967 | }, |
| 46968 | + { |
| 46969 | + "Name": "Remove-DbaDbTable", |
| 46970 | + "Description": "Removes database table(s), with supported piping from Get-DbaDbTable.", |
| 46971 | + "Tags": [ |
| 46972 | + "Table", |
| 46973 | + "Database" |
| 46974 | + ], |
| 46975 | + "Synopsis": "Removes database table(s) from each database and SQL Server instance.", |
| 46976 | + "Alias": "", |
| 46977 | + "Author": "Andreas Jordan (@JordanOrdix), ordix.de", |
| 46978 | + "CommandName": "Remove-DbaDbTable", |
| 46979 | + "Availability": "Windows, Linux, macOS", |
| 46980 | + "Links": "https://dbatools.io/Remove-DbaDbTable", |
| 46981 | + "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaDbTable -SqlInstance localhost, sql2016 -Database db1, db2 -Table table1, table2, table3\nRemoves table1, table2, table3 from db1 and db2 on the local and sql2016 SQL Server instances.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$tables = Get-DbaDbTable -SqlInstance localhost, sql2016 -Database db1, db2 -Table table1, table2, table3\nPS C:\\\u003e $tables | Remove-DbaDbTable\nRemoves table1, table2, table3 from db1 and db2 on the local and sql2016 SQL Server instances.", |
| 46982 | + "Params": [ |
| 46983 | + [ |
| 46984 | + "SqlInstance", |
| 46985 | + "The target SQL Server instance or instances.", |
| 46986 | + "", |
| 46987 | + false, |
| 46988 | + "false", |
| 46989 | + "", |
| 46990 | + "" |
| 46991 | + ], |
| 46992 | + [ |
| 46993 | + "SqlCredential", |
| 46994 | + "Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).\nWindows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.\nFor MFA support, please use Connect-DbaInstance.", |
| 46995 | + "", |
| 46996 | + false, |
| 46997 | + "false", |
| 46998 | + "", |
| 46999 | + "" |
| 47000 | + ], |
| 47001 | + [ |
| 47002 | + "Database", |
| 47003 | + "The target database(s).", |
| 47004 | + "", |
| 47005 | + false, |
| 47006 | + "false", |
| 47007 | + "", |
| 47008 | + "" |
| 47009 | + ], |
| 47010 | + [ |
| 47011 | + "Table", |
| 47012 | + "The name(s) of the table(s).", |
| 47013 | + "", |
| 47014 | + false, |
| 47015 | + "false", |
| 47016 | + "", |
| 47017 | + "" |
| 47018 | + ], |
| 47019 | + [ |
| 47020 | + "InputObject", |
| 47021 | + "Allows piping from Get-DbaDbTable.", |
| 47022 | + "", |
| 47023 | + false, |
| 47024 | + "true (ByValue)", |
| 47025 | + "", |
| 47026 | + "" |
| 47027 | + ], |
| 47028 | + [ |
| 47029 | + "EnableException", |
| 47030 | + "By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.\r\nThis avoids overwhelming you with \"sea of red\" exceptions, but is inconvenient because it basically disables advanced scripting.\r\nUsing this switch turns this \"nice by default\" feature off and enables you to catch exceptions with your own try/catch.", |
| 47031 | + "", |
| 47032 | + false, |
| 47033 | + "false", |
| 47034 | + "False", |
| 47035 | + "" |
| 47036 | + ], |
| 47037 | + [ |
| 47038 | + "WhatIf", |
| 47039 | + "Shows what would happen if the command were to run. No actions are actually performed.", |
| 47040 | + "wi", |
| 47041 | + false, |
| 47042 | + "false", |
| 47043 | + "", |
| 47044 | + "" |
| 47045 | + ], |
| 47046 | + [ |
| 47047 | + "Confirm", |
| 47048 | + "Prompts you for confirmation before executing any changing operations within the command.\r\nThis is the default. Use -Confirm:$false to suppress these prompts.", |
| 47049 | + "cf", |
| 47050 | + false, |
| 47051 | + "false", |
| 47052 | + "", |
| 47053 | + "" |
| 47054 | + ] |
| 47055 | + ], |
| 47056 | + "Syntax": "Remove-DbaDbTable [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-Database] \u003cString[]\u003e] [[-Table] \u003cString[]\u003e] [[-InputObject] \u003cTable[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]" |
| 47057 | + }, |
46968 | 47058 | { |
46969 | 47059 | "Name": "Remove-DbaDbTableData", |
46970 | 47060 | "Description": "This command does a batch delete of table data using the technique described by Aaron Bertrand here: https://sqlperformance.com/2013/03/io-subsystem/chunk-deletes. The main goal of this command is to ensure that the log file size is controlled while deleting data. This command can be used for doing both very large deletes or small deletes. Foreign keys are not temporarily removed, so the caller needs to perform deletes in the correct order with dependent tables or enable cascading deletes. When a database is using the full or bulk_logged recovery model this command will take log backups at the end of each batch if the -LogBackupPath or -AzureBaseUrl param is specified. If the database is using the simple recovery model then CHECKPOINTs will be performed for on-prem SQL Server databases. The object returned will contain metadata about the batch deletion process including the log backup details.\n\nThere are two categories of use cases for this command:\n1. Simplistic deletions from a table. In this scenario use the -Table and -BatchSize parameters. The DELETE statement is auto-generated by the this command.\n2. Complex deletions based on a join, where clause, or an order by clause. In this scenario use the -DeleteSql parameter to specify the DELETE statement.", |
|
47749 | 47839 | ], |
47750 | 47840 | "Syntax": "Remove-DbaLinkedServer [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-LinkedServer] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-Force] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]" |
47751 | 47841 | }, |
| 47842 | + { |
| 47843 | + "Name": "Remove-DbaLinkedServerLogin", |
| 47844 | + "Description": "Removes a linked server login.", |
| 47845 | + "Tags": [ |
| 47846 | + "Security", |
| 47847 | + "Server" |
| 47848 | + ], |
| 47849 | + "Synopsis": "Removes a linked server login.", |
| 47850 | + "Alias": "", |
| 47851 | + "Author": "Adam Lancaster https://github.com/lancasteradam", |
| 47852 | + "CommandName": "Remove-DbaLinkedServerLogin", |
| 47853 | + "Availability": "Windows, Linux, macOS", |
| 47854 | + "Links": "https://dbatools.io/Remove-DbaLinkedServerLogin", |
| 47855 | + "Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eRemove-DbaLinkedServerLogin -SqlInstance sql01 -LinkedServer linkedServer1 -LocalLogin linkedServerLogin1 -Confirm:$false\nRemoves the linkedServerLogin1 from the linkedServer1 linked server on the sql01 instance.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e$instance = Connect-DbaInstance -SqlInstance sql01\nPS C:\\\u003e$instance | Remove-DbaLinkedServerLogin -LinkedServer linkedServer1 -LocalLogin linkedServerLogin1 -Confirm:$false\nPasses in a SqlInstance via pipeline and removes the linkedServerLogin1 from the linkedServer1 linked server.\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$linkedServer1 = Get-DbaLinkedServer -SqlInstance sql01 -LinkedServer linkedServer1\nPS C:\\\u003e$linkedServer1 | Remove-DbaLinkedServerLogin -LocalLogin linkedServerLogin1 -Confirm:$false\nPasses in a linked server via pipeline and removes the linkedServerLogin1.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003e$linkedServerLogin1 = Get-DbaLinkedServerLogin -SqlInstance sql01 -LinkedServer linkedServer1 -LocalLogin linkedServerLogin1\nPS C:\\\u003e$linkedServerLogin1 | Remove-DbaLinkedServerLogin -Confirm:$false\nPasses in a linked server login via pipeline and removes it.", |
| 47856 | + "Params": [ |
| 47857 | + [ |
| 47858 | + "SqlInstance", |
| 47859 | + "The target SQL Server instance or instances. This can be a collection and receive pipeline input to allow the function\r\nto be executed against multiple SQL Server instances.", |
| 47860 | + "", |
| 47861 | + false, |
| 47862 | + "false", |
| 47863 | + "", |
| 47864 | + "" |
| 47865 | + ], |
| 47866 | + [ |
| 47867 | + "SqlCredential", |
| 47868 | + "Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).\nWindows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.\nFor MFA support, please use Connect-DbaInstance.", |
| 47869 | + "", |
| 47870 | + false, |
| 47871 | + "false", |
| 47872 | + "", |
| 47873 | + "" |
| 47874 | + ], |
| 47875 | + [ |
| 47876 | + "LinkedServer", |
| 47877 | + "The name(s) of the linked server(s).", |
| 47878 | + "", |
| 47879 | + false, |
| 47880 | + "false", |
| 47881 | + "", |
| 47882 | + "" |
| 47883 | + ], |
| 47884 | + [ |
| 47885 | + "LocalLogin", |
| 47886 | + "The name(s) of the linked server login(s).", |
| 47887 | + "", |
| 47888 | + false, |
| 47889 | + "false", |
| 47890 | + "", |
| 47891 | + "" |
| 47892 | + ], |
| 47893 | + [ |
| 47894 | + "InputObject", |
| 47895 | + "Allows piping from Connect-DbaInstance, Get-DbaLinkedServer, and Get-DbaLinkedServerLogin.", |
| 47896 | + "", |
| 47897 | + false, |
| 47898 | + "true (ByValue)", |
| 47899 | + "", |
| 47900 | + "" |
| 47901 | + ], |
| 47902 | + [ |
| 47903 | + "EnableException", |
| 47904 | + "By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.\r\nThis avoids overwhelming you with \"sea of red\" exceptions, but is inconvenient because it basically disables advanced scripting.\r\nUsing this switch turns this \"nice by default\" feature off and enables you to catch exceptions with your own try/catch.", |
| 47905 | + "", |
| 47906 | + false, |
| 47907 | + "false", |
| 47908 | + "False", |
| 47909 | + "" |
| 47910 | + ], |
| 47911 | + [ |
| 47912 | + "WhatIf", |
| 47913 | + "Shows what would happen if the command were to run. No actions are actually performed.", |
| 47914 | + "wi", |
| 47915 | + false, |
| 47916 | + "false", |
| 47917 | + "", |
| 47918 | + "" |
| 47919 | + ], |
| 47920 | + [ |
| 47921 | + "Confirm", |
| 47922 | + "Prompts you for confirmation before executing any changing operations within the command.", |
| 47923 | + "cf", |
| 47924 | + false, |
| 47925 | + "false", |
| 47926 | + "", |
| 47927 | + "" |
| 47928 | + ] |
| 47929 | + ], |
| 47930 | + "Syntax": "Remove-DbaLinkedServerLogin [[-SqlInstance] \u003cDbaInstanceParameter[]\u003e] [[-SqlCredential] \u003cPSCredential\u003e] [[-LinkedServer] \u003cString[]\u003e] [[-LocalLogin] \u003cString[]\u003e] [[-InputObject] \u003cObject[]\u003e] [-EnableException] [-WhatIf] [-Confirm] [\u003cCommonParameters\u003e]" |
| 47931 | + }, |
47752 | 47932 | { |
47753 | 47933 | "Name": "Remove-DbaLogin", |
47754 | 47934 | "Description": "Tries a bunch of different ways to remove a Login or two or more.", |
|
0 commit comments