microsoft / microsoft/sql-server-samples

Error in: samples/manage/azure-arc-enabled-sql-server/modify-license-type/modify-arc-sql-license-type.ps1

Open
#1,405 4 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

Issue: The script uses Search-AzGraph to locate resources. Search-AzGraph does not honor AzContext when executing in Cloud Shell. This is a problem when you have more than 1000 subscriptions. The Search-AzGraph commandlet only returns results from the first 1000 subscriptions even though AzContext is filtered to 1 sub and you have only passed 1 sub to the modify-arc-sql-license-type script.

In my test case, I am attempting to run the script against a device in a specific sub, but it cannot be found. I have access to over 2800 subs and the device I am looking for is not in the first 1000 subs.

Possible solution: Update Search-AzGraph to honor AzContext.

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 samples/manage/azure-arc-enabled-sql-server/modify-license-type/modify-arc-sql-license-type.ps1 and trace its AzContext setup and Search-AzGraph call. Reproduce the Cloud Shell case with access to more than 1,000 subscriptions and a target resource outside the first 1,000. Done means the script can locate that resource while limited to the selected subscription.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.