AzureSQLDataSyncHealthChecker

所属分类:数据库系统
开发工具:PowerShell
文件大小:0KB
下载次数:0
上传日期:2022-11-28 19:10:28
上 传 者sh-1993
说明:  此PowerShell脚本将检查中心和成员的所有元数据是否都到位,并根据信息验证作用域...,
(This PowerShell script will check if all the metadata of a hub and member is in place and also validate the scopes against the information we have on the sync metadata database (among other validations). This script will not make any changes, will just validate data sync and user objects. It will also gather some useful information for faster)

文件列表:
AzureSQLDataSyncHealthChecker.ps1 (140979, 2023-11-27)
CONTRIBUTING.md (920, 2023-11-27)
LICENSE (1162, 2023-11-27)
PRIVACY (937, 2023-11-27)
SECURITY.md (2757, 2023-11-27)

# Azure SQL Data Sync Health Checker This PowerShell script will check if all the metadata of a hub and member is in place and also validate the scopes against the information we have on the sync metadata database (among other validations). This script will not make any changes, will just validate data sync and user objects. It will also gather some useful information for faster troubleshooting during a support request. **In order to run it you need to:** 1. Open Windows PowerShell ISE 2. Open a New Script window 3. Paste the following in the script window (please note that, except databases and credentials, the other parameters are optional): ```powershell $parameters = @{ ## Databases and credentials # Sync metadata database credentials (Only SQL Authentication is supported) SyncDbServer = '.database.windows.net' SyncDbDatabase = '' SyncDbUser = '' SyncDbPassword = '' # Hub credentials (Only SQL Authentication is supported) HubServer = '.database.windows.net' HubDatabase = '' HubUser = '' HubPassword = '' # Member credentials (Azure SQL DB or SQL Server) MemberServer = '' MemberDatabase = '' MemberUser = '' MemberPassword = '' # set MemberUseWindowsAuthentication to $true in case you wish to use integrated Windows authentication (MemberUser and MemberPassword will be ignored) MemberUseWindowsAuthentication = $false ## Optional parameters (default values will be used if ommited) ## Health checks HealthChecksEnabled = $true #Set as $true (default) or $false ## Monitoring MonitoringMode = 'AUTO' #Set as AUTO (default), ENABLED or DISABLED MonitoringIntervalInSeconds = 20 MonitoringDurationInMinutes = 2 ## Tracking Record Validations ExtendedValidationsTableFilter = @('All') #Set as "All" or the tables you need using '[dbo].[TableName1]','[dbo].[TableName2]' ExtendedValidationsEnabledForHub = $true #Set as $true (default) or $false ExtendedValidationsEnabledForMember = $true #Set as $true (default) or $false ExtendedValidationsCommandTimeout = 900 #seconds (default) ## Other SendAnonymousUsageData = $true #Set as $true (default) or $false DumpMetadataSchemasForSyncGroup = '' #leave empty for automatic detection DumpMetadataObjectsForTable = '' #needs to be formatted like [SchemaName].[TableName] } $scriptUrlBase = 'https://raw.githubusercontent.com/Microsoft/AzureSQLDataSyncHealthChecker/master' cls Write-Host 'Trying to download the script file from GitHub (https://github.com/Microsoft/AzureSQLDataSyncHealthChecker), please wait...' try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -bor [Net.SecurityProtocolType]::Tls11 -bor [Net.SecurityProtocolType]::Tls Invoke-Command -ScriptBlock ([Scriptblock]::Create((Invoke-WebRequest ($scriptUrlBase +'/AzureSQLDataSyncHealthChecker.ps1') -UseBasicParsing -TimeoutSec 60).Content)) -ArgumentList $parameters } catch { Write-Host 'ERROR: The script file could not be downloaded:' -ForegroundColor Red $_.Exception Write-Host 'Confirm this machine can access https://github.com/Microsoft/AzureSQLDataSyncHealthChecker/' -ForegroundColor Yellow Write-Host 'or use a machine with Internet access to see how to run this from machines without Internet. See how at https://github.com/Azure/SQL-Connectivity-Checker/' -ForegroundColor Yellow } #end ``` 4. Set the parameters on the script, you need to set server names, database names, users and passwords. 5. Run it. 6. The major results can be seen in the output window. If the user has the permissions to create folders, a folder with all the resulting files will be created. When running on Windows, the folder will be opened automatically after the script completes. When running on Azure Portal Cloud Shell the files will be stored in the file share (clouddrive). A zip file with all the files (AllFiles.zip) will be created. ## Roadmap 1. Detect issues and export action plans automatically is the next major goal. ## Data / Telemetry This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://go.microsoft.com/fwlink/?LinkId=521839) to learn more. Telemetry can be disabled by setting the parameter SendAnonymousUsageData = $false (default value is $true). ## Reporting Security Issues Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at [secure@microsoft.com](mailto:secure@microsoft.com). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the [MSRC PGP](https://technet.microsoft.com/en-us/security/dn606155) key, can be found in the [Security TechCenter](https://technet.microsoft.com/en-us/security/default). ## License Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the [MIT License](./LICENSE).

近期下载者

相关文件


收藏者