Implementing GitHub Copilot Agents for SQL Server DBAs - Ahsan-Research/Dev GitHub Wiki
Implementing GitHub Copilot Agents for SQL Server DBAs
An Instructor-Led, Beginner-Friendly Training Guide
Audience: SQL Server DBAs, Database Developers, and Data Engineers
in the USA and Europe
Level: Beginner
Tools: Visual Studio Code, GitHub Copilot, Microsoft MSSQL
extension
Format: Instructor explanation, guided demonstration, hands-on labs,
safety checkpoints
Welcome: Why Are We Discussing AI in a DBA Training Session?
Imagine it is 2:00 AM. An application team reports that a business-critical process is running slowly. The incident channel is filling up, someone has posted a screenshot of a spinning progress indicator, and the familiar question arrives: "Can the DBA check what is happening?"
You begin checking active requests, blocking, recent deployments, execution plans, and monitoring history. This is normal DBA work. It is also the kind of work where an AI assistant may help you move faster---by drafting diagnostic queries, explaining unfamiliar code, summarizing schema relationships, or organizing a troubleshooting plan.
Let's set expectations now: AI is not a replacement for database knowledge, production judgment, or change control. It can produce useful SQL, misleading SQL, or a confident explanation that is simply wrong. The DBA remains responsible for the decision.
In this session, we will learn how GitHub Copilot Agent Mode works with the Microsoft MSSQL extension in Visual Studio Code. We will begin in a development environment, use bounded read-only examples, inspect proposed actions, and finish with a repeatable safety checklist.
Instructor says: "Today is not about asking AI to take over your database. It is about giving a capable assistant a clear task, checking its work, and keeping the keys to the kingdom in human hands."
IMPORTANT NOTE --- Training environment first
Use a local, sandbox, or development SQL Server instance for this workshop. Do not use production credentials or connect to production simply because an exercise appears harmless. A read-only intention in a prompt is not the same thing as a technical permission boundary.
1. Learning Objectives
By the end of this session, learners should be able to:
- Explain what Copilot Agent Mode can and cannot do for SQL Server work.
- Distinguish Ask Mode, Agent Mode, Plan Mode, and inline code completion.
- Install and verify VS Code, GitHub Copilot, and the Microsoft MSSQL extension.
- Connect to a development database with an appropriately limited account.
- Ask schema-aware questions and request diagnostic T-SQL.
- Review a proposed tool call before approving it.
- Run a basic read-only diagnostic query and explain its limitations.
- Identify security, privacy, permission, and change-management risks.
- Validate AI-generated SQL before using it in a real workflow.
How the session works
Each section follows four steps:
- Understand: the instructor explains the concept.
- Watch: the instructor demonstrates.
- Try: learners complete a short exercise.
- Inspect: the class checks the result and discusses possible risks.
You do not need to be an AI specialist. You do need to be willing to read the SQL before running it.
2. What Is GitHub Copilot Agent Mode?
GitHub Copilot is an AI coding assistant. When integrated with the Microsoft MSSQL extension for VS Code, it can help explain database code, draft queries, explore schema information, and coordinate multi-step database workflows.
Agent Mode goes beyond a simple text suggestion. It can plan a task and use tools contributed by the MSSQL extension---for example, to list connections, retrieve schema metadata, or execute a query. The documented MSSQL Agent Mode workflow requires user approval for tool invocations.
That approval is a checkpoint, not a guarantee of safety. Inspect the tool name, parameters, target connection, database context, and proposed SQL before approving anything.
Think of it as a junior teammate
Imagine a junior DBA sitting beside you. You can ask them to investigate a question, draft a query, or summarize a stored procedure. They can be fast and helpful, but you would not give them unrestricted production access and then walk away for coffee.
Treat Agent Mode with the same professional discipline.
What it may help with
- Drafting and explaining T-SQL.
- Exploring tables, columns, and relationships visible to the connected account.
- Summarizing stored procedures, views, and functions.
- Preparing read-only diagnostic queries.
- Organizing a troubleshooting plan.
- Reviewing schema designs and database code.
- Suggesting performance concerns for a human to investigate.
What it does not guarantee
- That every generated query is correct.
- That a suggested index will improve the workload.
- That the model understands every business rule.
- That a diagnostic snapshot explains an incident's full history.
- That prompt wording prevents destructive actions.
- That using an AI assistant automatically satisfies security or compliance requirements.
IMPORTANT NOTE --- Assistant, not authority
Copilot can assist with analysis and implementation. It does not assume the DBA's accountability. Validate generated code against your SQL Server version, schema, workload, permissions, and change-management process.
3. Choose the Right Copilot Surface
Choosing the right interaction mode matters. Using a powerful multi-step agent for a one-line explanation may be unnecessary; asking for a simple inline completion when you need database context may be insufficient.
Surface Best use Key point
Ask Mode with Explain SQL, ask a Schema-aware when
@mssql question, or draft a connected and using the
query MSSQL context
Agent Mode Coordinate a multi-step Can invoke MSSQL tools; task using available inspect each invocation tools
Plan Mode Think through a design Useful before or sequence before generating DDL or implementation planning changes
Inline completions Receive code Does not see the suggestions while connected database typing schema
MSSQL commands Connect, switch Useful when you already database, or run know the action you structured actions want
Instructor explanation: schema awareness
Suppose you type:
SELECT *
FROM dbo.Customer;
An inline suggestion may offer a plausible continuation, but it does not
automatically know the exact schema in your connected database. The
@mssql chat participant can use active database context to provide
schema-aware assistance.
Schema awareness is helpful, not infallible. Similar table names may exist in multiple schemas, the wrong database may be selected, and the assistant may misunderstand your business intent. Confirm the connection and verify object names.
PAUSE & INSPECT
If Copilot suggests a column called
CustomerStatus, how will you confirm it exists in the intended database? Inspect the actual schema or catalog metadata, confirm the active connection, and test safely---do not simply trust the suggestion.
Official reference: GitHub Copilot integration overview for the MSSQL extension
4. Prerequisites
Prepare these items before the workshop:
- Visual Studio Code installed using your organization's approved process.
- A GitHub account with access to GitHub Copilot.
- GitHub Copilot and GitHub Copilot Chat extensions, as required by your current setup.
- The official Microsoft SQL Server (
mssql) extension for VS Code. - Access to a local, sandbox, or development SQL Server or supported Azure SQL environment.
- A database account with only the permissions required for the lab.
- An organization-approved approach for handling source code, schema metadata, query text, and sensitive information.
Microsoft's current documentation lists support for SQL Server 2019, SQL Server 2022, and SQL Server 2025, as well as several Azure SQL and Microsoft Fabric scenarios. Check the live documentation before delivering this training because product capabilities and supported environments can change.
Instructor preparation checklist
Before learners arrive:
- Confirm VS Code and required extensions are installed.
- Confirm Copilot access works for the learner accounts.
- Test the development database connection.
- Prepare a sample database without real customer or regulated data.
- Confirm learners cannot accidentally modify production.
- Make sure learners can identify the active server, database, and login.
- Review organizational policy for AI tools and code sharing.
IMPORTANT NOTE --- Access is not one thing
A successful sign-in does not mean you have permission to use every feature or connect to every database. Subscription access, extension availability, network access, and SQL Server permissions are separate considerations.
5. Lab 1 --- Install and Verify the Tools
Objective: Install the required extensions and confirm that Copilot Chat is available.
Step 1: Install VS Code
- Download Visual Studio Code from the official website.
- Install it using your organization's approved software process.
- Open VS Code and confirm that it launches.
Instructor says: "If you already use VS Code, don't spend ten minutes reinstalling it. Confirm that it supports the features we need and move on."
Step 2: Install GitHub Copilot
- Open the Extensions view in VS Code.
- Search for GitHub Copilot and install the official extension.
- Search for GitHub Copilot Chat and install it if it is not already available in your setup.
- Sign in to GitHub when prompted.
- Complete any authorization steps.
- Open Copilot Chat and confirm you can enter a prompt.
Extension packaging and UI labels can change. If your interface differs, consult current official documentation rather than installing an unofficial extension with a similar name.
Step 3: Install the Microsoft MSSQL extension
- Open the Extensions view.
- Search for
mssql. - Select the official Microsoft SQL Server (
mssql) extension. - Install it and reload VS Code if prompted.
- Locate the MSSQL connections view or connection commands.
Step 4: Verify
- VS Code opens.
- GitHub Copilot is signed in and available.
- Copilot Chat opens.
- The Microsoft MSSQL extension is installed and enabled.
- You can find the database connection interface.
Micro-Challenge 1
Task: Explain the difference between Copilot Chat and the MSSQL extension.
Expected understanding: Copilot provides the AI assistance experience. The MSSQL extension contributes SQL-specific connection and database tools. Together, they allow AI assistance to use database context and supported tools when appropriate.
If something fails: Check sign-in status, extension enablement, organizational policy, network restrictions, and current documentation. Do not bypass an enterprise restriction by installing an unofficial tool.
6. Lab 2 --- Connect to a Development Database
Objective: Connect to a safe database and confirm the active context.
Step 1: Open the MSSQL connection interface
Use the MSSQL extension's Connections view or connection command. Create a profile or select an existing development profile according to your environment.
Step 2: Enter connection details carefully
Use your approved development server and database. Select the authentication method required by your organization. Do not put passwords or tokens into chat prompts, SQL scripts, screenshots, or shared notes.
Step 3: Connect and verify
Confirm the server or connection profile, database name, authentication identity where visible, and environment type. Do not assume that a familiar profile still points to the same target it did last week.
Step 4: Run a small verification query
SELECT
@@SERVERNAME AS ServerName,
DB_NAME() AS CurrentDatabase,
ORIGINAL_LOGIN() AS OriginalLogin,
SUSER_SNAME() AS CurrentLogin;
Review the output before moving forward.
- Does
ServerNamematch the expected server? - Does
CurrentDatabasematch the intended database? - Is the login the expected development identity?
Depending on authentication configuration, ORIGINAL_LOGIN() and
SUSER_SNAME() can provide different information. Interpret them in
context, especially with contained database users or specialized
authentication arrangements.
IMPORTANT NOTE --- Verify the target every time
Before any database-related agent task, confirm the active server and database. A beautifully written query against the wrong database is still the wrong query.
Micro-Challenge 2
Switch to another approved development database and rerun the verification query.
Success criteria: You can show which server and database are active without guessing.
7. Lab 3 --- Ask Schema-Aware Questions with @mssql
Objective: Use Ask Mode to request explanations or draft queries without giving the assistant an open-ended implementation task.
Step 1: Open Copilot Chat
Start a chat and select or mention the @mssql participant when
available. Confirm that the intended database connection is active.
Step 2: Use a bounded prompt
I am connected to my development SQL Server database. Summarize the tables and relationships you can actually identify from the current connection. If you cannot access a detail, say so instead of guessing. Do not modify data or database objects. Show me any proposed query and explain what it does before execution.
Compare the response with the actual schema.
Step 3: Ask for a query draft
Draft a read-only T-SQL query that lists table names and schemas in the current database. Explain each selected column and any permission requirements. Do not execute the query yet.
One possible query is:
SELECT
s.name AS SchemaName,
t.name AS TableName
FROM sys.tables AS t
INNER JOIN sys.schemas AS s
ON s.schema_id = t.schema_id
ORDER BY
s.name,
t.name;
This reads catalog metadata for tables visible to the current principal. Metadata visibility can be restricted by permissions, so the results may not show every object in the database.
Step 4: Review before execution
Ask yourself:
- Is the query read-only?
- Does it target the expected database?
- Does it reference valid objects?
- Is the result set limited to what we need?
- Does the login have the required permissions?
- Could the output expose sensitive metadata?
For a simple catalog query, risk is usually low in development. The review habit matters because the next query may be much more complex.
Instructor talking point: "We asked for an explanation, requested a draft, and reviewed the SQL. We did not ask the AI to 'fix everything.' Specific tasks produce answers that are easier to inspect."
Pause & Inspect
Identify one assumption in the assistant's response that you would independently verify. Examples include object visibility, schema names, relationship interpretation, business meaning, or the active connection.
8. Lab 4 --- Use Agent Mode for a Controlled DBA Workflow
Objective: Understand how Agent Mode coordinates multiple steps while the DBA reviews each tool invocation.
Agent Mode is useful for related tasks such as checking a connection, listing visible databases, reviewing schema metadata, and preparing a diagnostic plan.
Step 1: Select Agent Mode
Open Copilot Chat and select Agent Mode using the current VS Code interface. Confirm that the MSSQL extension is active. Keep manual review enabled for this workshop.
Step 2: Submit a bounded prompt
Act as a cautious SQL Server DBA assistant. In my development environment, identify the active server and database, list user databases and tables visible to my current account, and propose a read-only health-check plan. For each proposed query, explain its purpose, expected output, and required permissions. Do not modify data, create or drop objects, change permissions, restart services, or execute administrative commands. Show me the planned action and SQL before execution. I will review each tool invocation.
Critical distinction: Prompt wording is not a security control. Enforce safety through least-privilege credentials, appropriate VS Code approval settings, environment isolation, and organizational policy.
Step 3: Review every proposed tool call
Before approving:
- Read the tool name.
- Inspect its input parameters.
- Confirm the intended server and database.
- Review any SQL statement.
- Check that the action is within scope.
- Approve only if you understand and accept it.
- Review the returned result before continuing.
If an action is unclear, broader than requested, or unexpectedly destructive, do not approve it. Ask for an explanation or a safer alternative.
Step 4: Review the final summary
Compare the summary with the actual tool results. Check that the agent has not confused an unavailable result with an empty result or presented an inference as a confirmed fact.
IMPORTANT NOTE --- Be careful with auto-approval
VS Code provides permission and tool-approval controls. Automatically approving actions may reduce interruptions but also removes important review steps. For database work, especially while learning, keep manual approval enabled and inspect tool parameters. Do not enable broad "allow all" behavior simply to make a demo faster.
Official reference: Manage approvals and permissions in VS Code
Micro-Challenge 3
Ask Agent Mode to list tables visible to your current account. Before approving, explain to a partner what the proposed tool call will do and which database it will affect.
Success criteria: You can explain the action before you approve it.
9. Lab 5 --- Build a Basic Read-Only Diagnostic Query
Objective: Ask Copilot to help prepare a query showing a current snapshot of active requests and potential blocking.
SELECT
r.session_id,
r.status,
r.command,
r.blocking_session_id,
r.wait_type,
r.wait_time,
r.wait_resource,
DB_NAME(r.database_id) AS DatabaseName
FROM sys.dm_exec_requests AS r
WHERE r.session_id <> @@SPID
ORDER BY
r.wait_time DESC;
How to read the output
Column Meaning
session_id Session identifier for the active
request
status Current request status
command Type of command being executed
blocking_session_id Session reported as blocking the
request, if any
wait_type Type of wait currently associated
with the request
wait_time Current wait duration reported for
the request
wait_resource Resource associated with the wait,
when available
DatabaseName Database associated with the
request, when available
Instructor explanation: a snapshot is not a root-cause analysis
This query captures a moment in time. A request may finish before you run it. A blocking chain may involve multiple sessions. A long wait is not automatically proof of a problem, and this query does not provide a complete historical record.
For a real incident, correlate this snapshot with application symptoms, monitoring history, execution plans, wait statistics, transaction details, recent deployments, and other relevant evidence.
Permissions matter
Access to dynamic management views depends on SQL Server version,
configuration, and the view being queried. Newer versions may require
VIEW SERVER PERFORMANCE STATE for some performance-related views,
while older versions may use VIEW SERVER STATE. Check the
documentation for your exact version and view before granting access.
Do not grant broad server permissions just to make an AI-generated query run. Ask your DBA or security team for the narrowest approved access that supports the task.
Ask Copilot to review the query
Review this T-SQL query as a senior SQL Server DBA. Explain what it measures, what it does not prove, which permissions may be required on my SQL Server version, and what additional evidence I should collect before declaring a blocking incident. Do not rewrite it unless you explain why a change is needed.
Then compare the answer with the query and official documentation.
Pause & Inspect
- Could this query miss a blocking event that ended moments ago?
- Does a high
wait_timealone identify the root cause? - What additional information is needed before terminating a session?
- Would you allow an agent to kill a production session without a formal review?
Expected conclusion: This query is a starting point, not an automatic remediation script. Terminating sessions can roll back transactions and affect users. Treat it as a controlled operational decision.
10. A Repeatable Prompt Pattern for DBA Work
A useful prompt defines the role, target, scope, constraints, expected output, and review requirement. Think of it as a small work request rather than a wish.
Role: Act as a cautious SQL Server DBA assistant.
Environment: I am working in a verified development environment.
Task: [Describe one specific task.]
Scope: Use only objects and metadata available to the current connection.
Safety: Do not modify data, change schema, alter permissions, or perform administrative actions.
Output: Explain the approach, provide T-SQL, describe the expected result, and state permissions and assumptions.
Review: Show the planned action before execution. I will review each tool invocation.
Example prompts
Explain a stored procedure
Explain this stored procedure section by section. Identify inputs, outputs, table dependencies, transaction behavior, error handling, and potential risks. Separate confirmed facts from assumptions. Do not change the code.
Review query performance
Review this query for potential performance issues. Explain likely causes and the evidence needed to confirm them. Do not promise improvement without testing. Do not create indexes or change database settings.
Prepare an index discussion
Based on the query text and execution-plan information I provide, list possible indexing considerations. Explain write overhead, storage cost, selectivity, key order, included columns, and overlap with existing indexes. Treat each recommendation as a hypothesis to test.
Prepare a deployment review
Review this proposed database deployment script. Identify destructive statements, locking or downtime concerns, rollback limitations, permission changes, and dependencies. Do not execute the script. Provide a pre-deployment checklist.
Investigate blocking
Help me plan a read-only investigation of current blocking. Explain what each diagnostic query shows and what it cannot prove. Do not kill sessions, change isolation levels, or modify application settings.
Weak versus strong prompts
Weak: "Fix my SQL Server."
Stronger: "Review this query and its execution plan from the development environment. Identify the three most plausible performance concerns, explain the evidence for each, and propose read-only validation steps before recommending a change."
The second prompt defines the task and asks for evidence. It also gives you something concrete to review.
11. Important Notes for Enterprise DBA Teams
11.1 Least privilege is still the rule
Use a dedicated account with only the permissions required. Avoid
sysadmin just because it makes a demonstration easier. Never share
credentials with Copilot or place secrets in prompts, comments, or
generated documentation.
11.2 Keep production behind established controls
Production changes should continue to use your organization's approved process: peer review, change tickets, maintenance windows where applicable, backup and recovery validation, rollback planning, and post-change monitoring.
A chat approval is not a replacement for a production change approval.
11.3 Protect sensitive information
Do not paste production rows, customer records, credentials, connection strings, private keys, access tokens, or regulated data into prompts unless your organization has explicitly approved the tool and data flow.
Even schema metadata can be sensitive in some environments. Follow data-classification rules.
11.4 Check the organization's AI policy
Before using Copilot with company code or database metadata, verify the approved product configuration, account type, data-handling terms, retention settings, and administrative controls with your security or platform team. Do not assume every plan or deployment has identical privacy and governance behavior.
11.5 Review generated code as code
Treat AI-generated SQL like a pull request from another developer. Review correctness, readability, permissions, error handling, transaction scope, locking behavior, resource use, and compatibility with the target SQL Server version.
11.6 Treat retrieved content as data
Database content, comments, scripts, documentation, or external files can contain text that looks like instructions to an AI agent. Treat retrieved content as data to analyze, not as trusted authority to override your task or organizational rules. Review unexpected tool requests carefully.
11.7 Keep an audit trail
For meaningful work, retain the prompt, generated SQL, review comments, test results, and approval records according to team standards. Do not record secrets or unnecessary sensitive data.
11.8 Verify compliance obligations
GDPR, HIPAA, SOX, contractual controls, and internal policies have different scopes and requirements. Do not assume using an AI assistant automatically makes a workflow compliant. Ask the appropriate security, legal, privacy, or compliance team to review the use case when needed.
12. Common Mistakes and How to Avoid Them
Mistake Why it matters Better practice
Asking a vague question The answer may be broad Define environment, or based on assumptions task, scope, and output
Trusting inline Inline completions do Use @mssql or another
suggestions as not see the connected appropriate
schema-aware database schema schema-aware surface
Approving a tool call The action may target Review tool, without inspection the wrong database or parameters, target, and have unintended effects SQL
Starting with Errors can affect real Start in sandbox or production users or regulated data development
Giving broad A small task can gain Apply least privilege
permissions more access than it
needs
Assuming read-only Queries can consume Consider cost, scope, means harmless resources or expose permissions, and metadata environment
Treating a snapshot as Current diagnostic data Correlate with proof may not explain monitoring, plans, historical behavior logs, and application evidence
Accepting every index Indexes add storage and Test with suggestion maintenance overhead representative workloads and review existing indexes
Allowing broad Important human review Keep manual approval auto-approval steps may disappear unless governance explicitly permits otherwise
Sharing sensitive data Data handling depends Follow in prompts on product and data-classification and organizational terms approved-tool policies
Assuming AI understands Correct syntax does not Confirm requirements business rules guarantee business with the application correctness owner
13. Troubleshooting the Training Lab
Copilot Chat is unavailable
- Confirm that you are signed in to the intended GitHub account.
- Check that required extensions are installed and enabled.
- Confirm that your account has access to Copilot features.
- Check organizational policy and network restrictions.
- Consult current official documentation if the UI differs.
The @mssql participant is missing
- Confirm the official Microsoft MSSQL extension is installed and enabled.
- Reload VS Code if prompted.
- Check whether the current extension version supports the documented integration.
- Review current extension troubleshooting guidance.
The database connection fails
- Verify server name, port, database, and authentication method.
- Check VPN, firewall, network, and server availability.
- Confirm the account is authorized.
- Do not paste passwords or connection secrets into chat.
- Ask the platform team for help instead of bypassing security controls.
The query returns no tables
No rows do not always mean the database has no tables. You may be connected to the wrong database, the account may not see the expected metadata, or the database may genuinely have no user tables. Verify server, database, permissions, and object visibility.
Agent Mode proposes an unexpected action
Do not approve it merely to keep the workflow moving. Ask for an explanation, request a read-only alternative, or stop the session. Report a possible policy or permission issue through the normal team process.
A generated query fails
Read the error. Check object names, data types, permissions, SQL Server version, database context, and prompt assumptions. Ask Copilot to explain the error and suggest a correction---but review that correction before executing it.
14. Final Hands-On Exercise --- The Responsible DBA Assistant
Scenario
Your development team reports that a test process is running slowly. You are asked to prepare an initial investigation, not to change the system.
Your task
- Verify the active server and database.
- Identify tables visible to your account.
- Draft a read-only query to inspect current active requests.
- Explain the diagnostic output and its limitations.
- List the next evidence you would collect.
- Document permissions, assumptions, and risks.
- Prepare a short summary for an incident ticket.
Rules
- Do not connect to production.
- Do not change data or schema.
- Do not alter permissions or server settings.
- Do not terminate sessions.
- Do not approve a tool call until you understand it.
- Do not include sensitive data in prompts or final notes.
- Distinguish observed facts from hypotheses.
Incident summary template
Environment:
- Server:
- Database:
- Time observed:
Observed facts:
- [Record only what the tools actually showed.]
Potential concerns:
- [List hypotheses, not confirmed root causes.]
Evidence still needed:
- [Monitoring history, execution plan, application timing, etc.]
Safety and permissions:
- [Record account context and limitations.]
Recommended next step:
- [Propose a reviewable, non-destructive action.]
Debrief questions
- Which task did Copilot make easier?
- Which result did you verify independently?
- Did the assistant make assumptions?
- Did you understand every tool call you approved?
- What must change before using this workflow in production?
- What should be recorded in the incident ticket?
Instructor takeaway: The goal is not to make AI do the maximum amount of work. The goal is to make work faster while keeping it understandable, testable, secure, and accountable.
15. DBA Readiness Checklist
Environment and identity
- I verified the server and database.
- I know which account is being used.
- I am in an approved environment.
- The account follows least privilege.
Prompt and plan
- The task is specific and bounded.
- The prompt identifies the intended scope.
- The assistant has been asked to state assumptions.
- I can distinguish facts from suggestions.
Tool approval and execution
- I inspected the tool name and parameters.
- I reviewed SQL before execution.
- The action is necessary and within scope.
- I understand likely resource and data-access impact.
- I have not enabled broad auto-approval for convenience.
Results and governance
- I validated important results independently.
- I considered SQL Server version and permission differences.
- I protected secrets and sensitive data.
- I followed change control for any proposed change.
- I recorded useful evidence without unnecessary sensitive data.
If you cannot check an item, pause and resolve the gap before proceeding.
16. Official References
Use official documentation for current feature availability, installation instructions, UI changes, permissions, and security controls.
-
GitHub Copilot integration overview for the MSSQL extension
https://learn.microsoft.com/en-us/sql/tools/visual-studio-code-extensions/github-copilot/overview -
How GitHub Copilot works with the MSSQL extension
https://learn.microsoft.com/en-us/sql/tools/visual-studio-code-extensions/github-copilot/how-it-works -
Quickstart: Use GitHub Copilot Agent Mode
https://learn.microsoft.com/en-us/sql/tools/visual-studio-code-extensions/github-copilot/agent-mode -
Manage approvals and permissions in Visual Studio Code
https://code.visualstudio.com/docs/agents/run/approvals -
Visual Studio Code download
https://code.visualstudio.com/ -
GitHub Copilot documentation
https://docs.github.com/en/copilot
Product behavior, extension packaging, supported platforms, and UI labels can change. Recheck these references before delivering the training in a future quarter.
Closing Message --- Keep the Human in the Loop
AI assistance can make routine database work more efficient. It can help a DBA draft a query, understand unfamiliar code, explore schema relationships, and organize an investigation. Agent Mode adds the ability to coordinate supported tools across multiple steps.
The professional advantage does not come from accepting every suggestion. It comes from knowing what to ask, how to inspect the answer, when to stop, and what evidence is required before making a change.
The next time Copilot offers you a query, take a breath and read it. Confirm the target. Check the permissions. Understand the result. Then decide whether it deserves to run.
A good DBA knows how to investigate a database problem. A forward-looking DBA also knows how to use AI responsibly---without becoming the person who has to explain why an unreviewed suggestion caused the next incident.
Remember: Let AI help with the work. Keep professional judgment in charge of the outcome.