> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/m/microsoft-system-center-operations-manager.md).

# Microsoft System Center Operations Manager

Microsoft System Center Operations Manager (SCOM) stores its data in SQL Server databases. OctoXLabs runs a SQL query that you provide against the SCOM database and adds the result rows to the device inventory.

## Use cases

* List devices read from the SCOM database.

```
Adapters = microsoft-scom
```

## Before you begin

### Network

| Source              | Destination                          | Port                          | Protocol |
| ------------------- | ------------------------------------ | ----------------------------- | -------- |
| OctoXLabs connector | SQL Server host of the SCOM database | 1433 (or the configured port) | TCP      |

### Required permissions

| Scope or role | Permission | Needed for                                                   |
| ------------- | ---------- | ------------------------------------------------------------ |
| Read, Select  | Read       | The SCOM database and the tables or views used in your query |

The frontend instructions do not list exact database permissions. The account needs to run your SELECT query.

## Create credentials in Microsoft System Center Operations Manager

{% stepper %}
{% step %}

### Create a SQL login

Create a login for OctoXLabs on the SQL Server that hosts the SCOM database, or use an Active Directory account with Kerberos.
{% endstep %}

{% step %}

### Grant read access

Give the login read access to the SCOM database and to every table or view your query uses.
{% endstep %}

{% step %}

### Write the query

Prepare a single SELECT (or WITH) statement. The query is mandatory.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                                             | Required    | Type    | Default  | Description                                                                                                                     |
| ----------------------------------------------------- | ----------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- |
| IP (`ip`)                                             | Yes         | String  |          | IP address or hostname of the SQL Server host.                                                                                  |
| Port (`port`)                                         | No          | Integer | 1433     | SQL Server port.                                                                                                                |
| Domain (`domain`)                                     | No          | String  |          | Windows domain. When set, the login is sent as `DOMAIN\username`.                                                               |
| Database (`database`)                                 | Yes         | String  |          | Name of the database to connect to.                                                                                             |
| Username (`username`)                                 | Yes         | String  |          | Account used to connect.                                                                                                        |
| Password (`password`)                                 | Conditional | String  |          | Required for SQL authentication and for Kerberos mode `password`. Optional for Kerberos mode `keytab`.                          |
| Use PyODBC Driver (`use_pyodbc_driver`)               | No          | Boolean | False    | Use pyodbc instead of pymssql. The connector tries ODBC Driver 17, then ODBC Driver 18.                                         |
| Batch Size (`batch_size`)                             | No          | Integer | 300      | Rows fetched per batch.                                                                                                         |
| Query Timeout (`query_timeout`)                       | No          | Integer | 60       | Query timeout in seconds.                                                                                                       |
| Auth Type (`auth_type`)                               | No          | String  | SQL      | Set to `Kerberos` to authenticate with Active Directory.                                                                        |
| Kerberos Mode (`kerberos_mode`)                       | No          | String  | password | `password` requests a ticket with username and password. `keytab` uses an uploaded keytab.                                      |
| Kerberos Realm (`kerberos_realm`)                     | No          | String  |          | Active Directory realm in uppercase. Can be empty when the username is in UPN format.                                           |
| KDC IP (`kdc_ip`)                                     | No          | String  |          | Key Distribution Center host or IP.                                                                                             |
| Kerberos SPN (`kerberos_spn`)                         | No          | String  |          | Service Principal Name override.                                                                                                |
| Keytab (`keytab`)                                     | Conditional | String  |          | Required when Kerberos Mode is `keytab`.                                                                                        |
| Encrypt (`encrypt`)                                   | No          | Boolean | True     | TLS encryption. Applied only when Auth Type is Kerberos.                                                                        |
| Trust Server Certificate (`trust_server_certificate`) | No          | Boolean | True     | Skip certificate chain validation. Applied only when Auth Type is Kerberos.                                                     |
| Query (`query`)                                       | Yes         | SQL     |          | Single read-only SELECT or WITH statement. Name result columns after the OctoXLabs fields you want mapped (see Fields fetched). |

## Troubleshooting

| Error message                                                                                                     | Cause                                                                                        | Fix                                                                     |
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| No ODBC Driver found. Install 'ODBC Driver 17' or 'ODBC Driver 18' for SQL Server.                                | Pyodbc is enabled or Kerberos is used and neither driver is installed on the connector host. | Install ODBC Driver 17 or 18 for SQL Server on the connector host.      |
| Kerberos config failed: SQL Server reports auth\_scheme=''. Check SPN registration in AD and the Encrypt setting. | The connection fell back from Kerberos, for example to NTLM.                                 | Check the SPN registration in Active Directory and the Encrypt setting. |
| Password is required for SQL Server Authentication.                                                               | Auth Type is not Kerberos and Password is empty.                                             | Enter the password.                                                     |
| Keytab is required when kerberos\_mode is 'keytab'.                                                               | Kerberos mode is keytab and no keytab was uploaded.                                          | Upload the keytab file.                                                 |
| Password is required when kerberos\_mode is 'password'.                                                           | Kerberos mode is password and Password is empty.                                             | Enter the password.                                                     |
| It is mandatory to enter a query                                                                                  | The Query parameter is empty.                                                                | Enter a query.                                                          |

## Change history

{% hint style="info" %}
Available starting from version 4.5.0.
{% endhint %}
