Query Texts - List By Query
Gets a query's text.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/topQueries/{queryId}/queryText?api-version=2014-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
database
|
path | True |
string |
The name of the database. |
query
|
path | True |
string |
The id of the query |
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
server
|
path | True |
string |
The name of the server. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
Examples
Get a query
Sample request
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/databases/db1/topQueries/19/queryText?api-version=2014-04-01
Sample response
{
"value": [
{
"name": "current",
"queryText": "select 1",
"type": "Microsoft.Sql/servers/databases/topQueries/queryText"
}
]
}
Definitions
Name | Description |
---|---|
Query |
|
Query |
Represents the response to a get query text request. |
QueryText
Name | Type | Description |
---|---|---|
name |
string |
Resource name. |
queryText |
string |
Query text. |
type |
string |
Resource type. |
QueryTextListResult
Represents the response to a get query text request.
Name | Type | Description |
---|---|---|
value |
The query text. |