Get-MgmtSvcSqlHostingServerConsistency
Get-MgmtSvcSqlHostingServerConsistency
Detects inconsistencies between a SQL Server resource provider and what is currently hosted.
Syntax
Parameter Set: Default
Get-MgmtSvcSqlHostingServerConsistency [-AdminUri] <Uri> [-Token] <String> [-HostingServerId] <String> [-DisableCertificateValidation] [-IncludeInSyncResources] [ <CommonParameters>]
Detailed Description
The Get-MgmtSvcSqlHostingServerConsistency cmdlet detects potential inconsistencies between what the SQL Server resource provider expects and what is currently hosted on the SQL Server fabric, which includes databases, resource pools, workloads, and groups. This cmdlet compares the configured properties of SQL Server resource provider resources to the resources that are provisioned on the SQL hosting server. The response from the cmdlet contains the sync state definitions of each resource displayed in a hierarchical manner.
For SQL Server, the top-level resource types are hosting servers and secondary servers. Secondary servers are only present in the case of always-on.
Each top-level server resource contains two resource types:
-- Databases
-- Resource pools for a resource-governor enabled server. Each resource pool resource also contains the resource type workloadgroup.
A resource sync state definition contains:
-- The ID of the resource in the form <providernamespace>/resourcetype/instance/resourcetype/instance…
-- Configured properties, which are expected properties of the resource from the resource provider perspective. This is Null if the resource is only present in the hosting server.
-- Provisioned properties, which are actual properties of the resource from the hosting server. This is Null is the resource is only present in the resource provider.
-- Nested resource types, which are optional. In the case of a server resource, this contains the databases and resource pools. The database resource type is empty. Workloadgroup is a nested resource type of resourcepool.
-- SyncState, which can have one of the following values:
-- InSync. The configured and provisioned properties are equal. Nested resources, if applicable, are also in sync.
--OutOfSync. The configured and provisioned properties of the current resource are not in sync. You must traverse any nested resources to determine sync status.
--NestedResourceOutofSync. The configured and provisioned properties of the current resource are in sync, but one or more nested resources are out of sync.
Parameters
-AdminUri<Uri>
Specifies the URI of the Windows Azure Pack administrator API. Use the following format: https://< computer>:<port>, where <computer> is the computer on which the administrator API is installed.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true(ByPropertyName) |
Accept Wildcard Characters? |
false |
-DisableCertificateValidation
Disables certificate validation for the Windows Azure Pack installation. If you specify this parameter, you can use self-signed certificates.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-HostingServerId<String>
Specifies the ID of a SQL Server hosting server.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
true(ByPropertyName) |
Accept Wildcard Characters? |
false |
-IncludeInSyncResources
Indicates whether to include InSync resources with the response object.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Token<String>
Specifies an identity token. To create a token, use the Get-MgmtSvcToken cmdlet.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true(ByPropertyName) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- None
Outputs
The output type is the type of the objects that the cmdlet emits.
ConsistencyReport
This cmdlet emits a ConsistencyReport object.
Examples
Example 1: Get a consistency report
For this example, assume you have already created a token by using the Get-MgmtSvcToken cmdlet and stored it in the variable named $Report.
This command gets the consistency data for the hosting server that has an ID of wdp90u. After you run this command you can examine the members of the ConsistencyReport object stored in $Report to view the consistency results.
PS C:\> $Report = Get-MgmtSvcSqlHostingServerConsistency -HostingServerId "wdp90u" -IncludeInSyncResources -AdminUri "https:// Computer01:30004" -Token $Token –DisableCertificateValidation