> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query SolarWinds Database

Retrieve specific data from the SolarWinds database by providing a custom SWQL (SolarWinds Query Language) query.

You can either enter a simple query directly or use a referenced query that leverages the `Parameters` field.

Examples:

**Query without parameters:**

```
SELECT Uri FROM Orion.Pollers ORDER BY PollerID WITH ROWS 1 TO 3 WITH TOTALROWS
```

**Query with parameters**

```
SELECT Uri FROM Orion.Pollers WHERE PollerID=@p ORDER BY PollerID WITH ROWS 1 TO 3 WITH TOTALROWS
```

<Note>
  External Documentation

  To learn more, visit the [SolarWinds Information Service documentation](https://solarwinds.github.io/OrionSDK/swagger-ui/?urls.primaryName=2024.4#/Query/QueryWithParameters).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter  | Description                                                                                                                                                                                                                                                                                                                                             |
  | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Parameters | Key-value pairs that correspond to the parameters referenced within the SWQL query.<br /><br />Example:<br /><pre><code>\{<br />  "p": 9<br />}</code></pre>                                                                                                                                                                                            |
  | Query      | A custom SWQL (SolarWinds Query Language) query to retrieve data based on specified criteria. The query may include parameter references, which should then be inserted into the `Parameters` field.<br /><br />Example:<br /><pre><code>SELECT Uri FROM Orion.Pollers WHERE PollerID=@p ORDER BY PollerID WITH ROWS 1 TO 3 WITH TOTALROWS</code></pre> |
</div>

## Example Output

```json theme={"dark"}
{
	"results": [
		{}
	],
	"totalRows": 0
}
```

## Workflow Library Example

[Query Solarwinds Database with Solarwinds Information Service and Send Results Via Email](https://library.blinkops.com/workflows/query-solarwinds-database-with-solarwinds-information-service-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/query-solarwinds-database-with-solarwinds-information-service-and-send-results-via-email/canvas" />
</div>
