> For the complete documentation index, see [llms.txt](https://docs.patchmypc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.patchmypc.com/patch-my-pc-publisher/manage/configmgr-apps-tab/scan-configmgr/sql-configuration.md).

# SQL Configuration section of Patch My PC Publisher

*Applies to: Patch My PC Publisher V3.x*

The **SQL CONFIGURATION** section on the **Scan ConfigMgr** tab of Patch My PC (PMPC) Publisher defines how Publisher connects to Microsoft Configuration Manager (ConfigMgr) and where it stores application source content.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2F7TIEPWGOXcPYhHLNfRrP%2Fimage.png?alt=media&amp;token=9fa0a817-d931-4169-b2f2-c286027417d4" alt="&#x27;SQL CONFIGURATION&#x27; section" width="563"><figcaption></figcaption></figure>

## Site Database Server

To configure the scan, Publisher needs the name of the site database server and database name used by ConfigMgr. You can find this information in the ConfigMgr console by navigating to:

**Monitoring | System Status | Site Status**

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FMj6b3DV8OX3ZV1JF0dkN%2Fimage.png?alt=media&amp;token=afe19722-1003-47e2-b77d-15ca04f2b2be" alt="Monitoring | System Status | Site Status" width="563"><figcaption></figcaption></figure>

Select the **Site database server** site system role. The details shown here provide the correct values to enter into Publisher.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FeSXOpW2fSJc2CpDyFv4v%2Fimage.png?alt=media&amp;token=be9e7d03-7447-48fd-9183-ebd090a42bc6" alt="Site Database Server" width="563"><figcaption></figcaption></figure>

By default, no **Limiting Collection** is specified. When you leave this field empty, the scan for supported products runs against **All Systems**.

Optionally, you can limit the scan scope by selecting a specific device collection using the browse button.

{% hint style="info" %}
**Note**

When you select a device collection, only the hardware inventory (HINV) data for devices in that collection is evaluated. This can significantly reduce scan time in large environments or when you want to validate a specific subset of devices rather than scanning the entire estate.
{% endhint %}

## Connect to ConfigMgr SQL Database As

The **Scan ConfigMgr** tab runs direct SQL queries against your ConfigMgr site database to inventory installed software. This scan *does not* use the SMS Provider, so the account performing the scan must have the appropriate SQL permissions on the ConfigMgr database.

<figure><img src="https://3773699522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX7dvS0r_4fc0AikgJS%2Fuploads%2FXteDJIRK5RzlbBXZKbvI%2Fimage.png?alt=media&amp;token=842395f0-7dc1-4651-bee4-1bdd7a64c6ac" alt="&#x27;Connect to ConfigMgr SQL Database As&#x27; section" width="563"><figcaption></figcaption></figure>

Publisher supports multiple ways to authenticate to SQL, allowing flexibility depending on where Publisher is installed and which account has the required permissions:

* [Service Account](#service-account)
* [SQL Authentication](#sql-authentication)
* [Run interactive scan as logged in user](#run-interactive-scan-as-logged-in-user)

### **Service Account**

The **Service Account** option (the default) uses the account under which the Publisher service is running. By default, the Publisher service runs as **SYSTEM**. This option is recommended:

* When Publisher is installed on the site server.
* Windows authentication is used.
* No credentials need to be entered.

{% hint style="info" %}
**Note**

When Publisher is installed on the ConfigMgr site server, the **SYSTEM** account typically already has the required read permissions on the ConfigMgr database views. In most environments, you don't need additional SQL configuration.
{% endhint %}

### **SQL Authentication**

The **SQL Authentication** option allows you to specify a SQL login and password. This option is recommended:

* You want to use SQL authentication instead of Windows authentication.
* If you want to use a SQL login (which needs read access to the required ConfigMgr database views).

This option is less common and generally not recommended unless Windows authentication cannot be used.

### **Run interactive scan as logged in user**

When the **Run interactive scan as logged in user** option is enabled, the scan runs using the currently logged-in user’s Windows credentials instead of Publisher's service account. This option is recommended:

* For troubleshooting permission issues.
* Can be helpful when testing access before granting permissions to the service account.

This option requires the logged-in user to have the necessary SQL SELECT permissions on the required ConfigMgr views.

{% hint style="danger" %}
**Important**

This option does not change how scheduled scans run; it only applies to the interactive scan being executed.
{% endhint %}

{% hint style="info" %}
**Note**

See [Microsoft SQL Permission Requirements](/patch-my-pc-publisher/requirements/configmgr-requirements/permissions.md#microsoft-sql-permission-requirements) for more information.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.patchmypc.com/patch-my-pc-publisher/manage/configmgr-apps-tab/scan-configmgr/sql-configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
