Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Any updated script that can be used for azure sql db connection?

Open
#92 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Read the linked Azure SQL guidance and locate the diagnostic script containing CollectionDBDiagnosticScripts\IndexingUnitData.sql. Review the many Invoke-Sqlcmd calls and determine how Azure managed identity can be supported while retaining on-premises use. Done means the script can connect to both Azure SQL Database and on-premises SQL Server.

Written by the indexing model from the issue text.

Description

https://learn.microsoft.com/en-us/azure/devops/server/install/install-azure-sql?view=azure-devops-2022
It's possible to use ADO server with azure SQL db. but elastic search scipt provided here only works for onprem environment.

e.g.
$SqlFullPath = Join-Path $PWD -ChildPath 'CollectionDBDiagnosticScripts\IndexingUnitData.sql'
$queryResults = Invoke-Sqlcmd -InputFile $SqlFullPath -serverInstance $SQLServerInstance -database $CollectionDatabaseName

Invoke-Sqlcmd here uses windows logon, not azure managed identity. And there are many places in the script using Invoke-Sqlcmd. Hence it cannot connect to azure sql db.

Could you modify the script and share an updated version which can be used for azure sql db connection as well?

Dominant language
PowerShell
Stars
57
Forks
68
PR merge metrics
No merged PRs in 30d

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.

More from microsoft/Code-Search

All issues in microsoft/Code-Search

Similar issues

More Cloud issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.