microsoft / microsoft/sql-server-samples

DataSyncLog Runbook without specify SyncGroup

Open
#291 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
11.2k
Forks
9.1k
Avg merge
2d 7h
Merged PRs (30d)
14

Description

In sql-server-samples/samples/features/sql-data-sync/DataSyncLogPowerShellRunbook.ps1 when I don't specify a SyncGroup and it tries to run the following line in testing environment.

$SyncGroupName = Get-AzureRmSqlSyncGroup -ResourceGroupName $ResourceGroup -ServerName $Server -DatabaseName $Database | select -ExpandProperty SyncGroupName

I run into the below exception. I'm not a PS expert, but this is defined I believe. https://docs.microsoft.com/en-us/powershell/module/azurerm.sql/get-azurermsqlsyncgroup?view=azurermps-4.4.0

Get-AzureRmSqlSyncGroup : The term 'Get-AzureRmSqlSyncGroup' is not recognized as the name of a cmdlet, function, 
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:165 char:38
+                     $SyncGroupName = Get-AzureRmSqlSyncGroup -Resourc ...
+                                      ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-AzureRmSqlSyncGroup:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sql-server-samples/samples/features/sql-data-sync/DataSyncLogPowerShellRunbook.ps1 around line 165, then review the linked Get-AzureRmSqlSyncGroup documentation. Run the runbook in the reported testing scenario without specifying a SyncGroup and investigate the missing-command exception. Done means that scenario no longer fails at the SyncGroup lookup.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell, sql
Domain
cloud, databases, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.