# LockfyDB

## Connection Requirements

{% stepper %}
{% step %}

### IP or Domain

Lockfy DB IP Address.
{% endstep %}

{% step %}

### Port

Port number (optional, default: 1433).
{% endstep %}

{% step %}

### Domain

Domain FQDN.
{% endstep %}

{% step %}

### Database

Base database.
{% endstep %}

{% step %}

### Username

Value provided username in MSSQL server.

To create a User:

* Open MSSQL Server Management Studio.
* Select the authentication used in the server.
* Fill in the details and select your database in Default Database.
* Save User.
* Login to the database with this user once to avoid an error.

{% hint style="info" %}
🔵 **"Read"**\
The user must have , "Select" and "List" privileges.
{% endhint %}
{% endstep %}

{% step %}

### Password

The Password of the provided username.
{% endstep %}

{% step %}

### View Name

The view name of SQL Server.
{% endstep %}

{% step %}

### Custom Query

The custom query field for SQL Server.

{% hint style="info" %}
🔵 **Attention**\
If the custom query and view name are left empty, the default query for the enabled asset type (device or user) will be executed, and the data returned by this query will be displayed on Assets page.
{% endhint %}
{% endstep %}

{% step %}

### Fetch Devices

Workstations will be fetch when this option is enabled (default: True).
{% endstep %}

{% step %}

### Fetch Users

Users will be fetch when this option is enabled (default: False).
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
⚠️ **Attention**\
Please perform a **connection test** to ensure there is a valid connection to the host.\
When the discovery operation is finalized, you will be able to see the details on the **Assets** page.
{% endhint %}
