SSMS의 코필로트는 SSMS(SQL Server Management Studio)의 사용자가 SQL 데이터베이스를 관리하고 개발할 수 있도록 설계된 고급 AI 도구입니다. 데이터베이스 관리자, 데이터베이스 개발자, 애플리케이션 관리자, 비즈니스 분석가 또는 그 사이에 있든 관계없이 SSMS의 Copilot는 시간을 절약하고 워크플로의 효율성을 높이는 데 도움이 될 수 있습니다.
SSMS의 Copilot를 사용하여 SQL Server, Azure SQL Database, Azure SQL Managed Instance 또는 Fabric의 SQL Database에 있는 데이터베이스에 대한 질문에 답변합니다. NL2SQL( 자연어 )을 사용하여 T-SQL(Transact-SQL) 쿼리 작성에 대한 지원을 요청할 수도 있습니다. 또한 부조종사에서는 오류 메시지, T-SQL 쿼리 문서화, 설명 및 수정을 지원할 수 있습니다.
데이터베이스 및 환경 탐색
부조종사에게 사이드카 채팅에서 어떤 순서로든 질문하십시오. 다음은 그 예입니다.
What version of SQL is this?List the databases on this instance.List server configuration settings that have been changed from the default in table format with the setting and current valueHow do I find out who is connected to this database?What is the compatibility mode for the database?hat's the largest table in the database?What columns store email addresses?How many customers do we have and where are they located?Have any SQL Agent jobs have failed in the last week and if so, which ones?
다중 턴 환경
코필로트에게 이전 답변과 관련되거나 이에 대한 응답으로 각 후속 질문과 함께 일련의 질문을 합니다. 다음은 그 예입니다.
What is the compatibility mode for this database?What is the latest compatibility mode available for this version of SQL?How do I change the compatibility mode?How will this change affect query performance?Give me step-by-step instructions for testing a change in compatibility mode for a query without changing the compatibility mode for the entire database.
스크립팅을 사용한 대화형 다중 턴 경험
Copilot에 일련의 질문을 할 때 토픽과 관련된 쿼리를 만들도록 요청할 수도 있습니다.
What is a database backup?What is the difference between a full and log backup?How do I create a database backup?Does my database need a transaction log backup?How do I create a transaction log backup?Create the script to backup the databaseHow do I automate backups?What should my backup schedule be if the RPO is 30 minutes?Create the script to create SQL Agent jobs for the recommended backup schedule
Transact-SQL 도움을 받으려면 코필로트를 사용하세요.
SSMS의 Copilot 기능은 쿼리 편집기 연결을 기반으로 하는 컨텍스트를 제공하지만, 현재는 쿼리 편집기에 직접 접근할 수는 없습니다. 특히 빈 편집기를 입력해도 코필로트 지원이 호출되지 않습니다. 또한 현재 편집기에서 직접 읽거나(강조 표시된 항목이 있는 경우) 편집기에서 내용을 복사할 수 없습니다.
Transact-SQL 작성
부조종사에서는 사이드카 채팅 내에서 제공하는 프롬프트(T-SQL에 자연어 또는 NLtoSQL)를 사용하여 T-SQL을 작성하는 데 도움을 줄 수 있습니다.
Write a query to return sales information for the last weekWrite a query to find all the customers who placed orders in July 2024 that totaled more than $1000 and order based on total descendingWrite the query to change the ReferenceID column in the Tickets table from an INT to a VARCHAR(25)Give me the query to find how much space is being used in tempdbGive me the query to find all open transactions
T-SQL 쿼리를 다중 턴 환경으로 작성하는 데 도움이 됩니다.
Copilot에게 쿼리 작성에 대한 도움을 요청하는 것 외에도 쿼리를 직접 작성할 수 있는 것과 같은 방식으로 채팅에서 쿼리 개발에 대한 지원을 요청할 수 있습니다.
How many customers spent over $100000 in 2023?Give me the query you ran to find that informationTake the inner query and change it to select customer ID, customer name, and total spent and order it by total spent descendingI forgot I want to include the state where the company is located in the output, please update the query to add that
데이터베이스 개발에 Copilot 사용
Copilot은 데이터베이스에서 개체를 신속하게 개발하는 데 도움을 줄 수 있습니다.
부조종사에게 데이터베이스에 대한 테이블 집합을 만들도록 요청합니다.
We're designing a database for a fictional company called Contoso Wireless. They are similar to existing wireless companies in the sense that they sell cell phones, accessories, phone plans, chargers, headsets, and more. Can you suggest some tables that will support my application? This application will support browsing a website, creating orders, paying bills, tracking customer activity, tracking usage, etc. Please provide scripts to create all the tables you see fit and make sure each table has a clustered index for the primary key.코필로트에게 인덱스를 만들도록 요청합니다.
Are there any indexes you think I need based on the kinds of queries that we will run to find data?부조종사에게 샘플 데이터를 만들도록 요청합니다.
We need to generate data for each of the tables. Each table should have 100-1000 rows. The data needs to be realistic (we can't repeat names, products, etc.). Can you help generate scripts for that? It's ok if the scripts are long. Variability in the data is more important than having a short script. For the customers table, use a combination of 50 first names and 50 last names and also use 30 different city/state combinations.
다른 예제
SQL 또는 T-SQL 작성에 대한 질문을 Copilot에 요청할 수 있습니다. AI가 실수를 할 수 있으므로 실행 전에 항상 스크립트를 검토합니다.
List the 10 largest tables in the database based on row count in a bulleted listWhat are the file sizes for this database, their file growth settings, and how much free space do they have?What are the worst performing queries for the last hour?What queries executed most frequently in the last two hours?List all employes and their email address in comma delimited formatWhat are the top 5 products ordered the most in 2024?Calculate the total number of orders for each company in 2023Create a table named Offices in the Sales schema. It should have the columns officeID, office name, address, city, state, zip code, and office manager ID which is foreign key to the People table.