# Sessions, devices and locks

<a id="database.ossession"></a>

## ossession

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Active sessions (login sessions) — see [krn.SessionEnum](../krn.md#krn.SessionEnum).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `sessionguid` | `nvarchar` | 32 |  |
| `serverid` | `int` | — |  |
| `stationid` | `nvarchar` | 32 |  |
| `userid` | `int` | — |  |
| `userguid` | `nvarchar` | 32 |  |
| `usertype` | `nvarchar` | 32 |  |
| `sessionstart` | `int` | — |  |
| `preserveterm` | `int` | — |  |
| `instance` | `nvarchar` | 255 |  |

<a id="database.oswebsessions"></a>

## oswebsessions

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Active web-client sessions (cookies/tokens).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `session_id` | `nvarchar` | 32 |  |
| `user_id` | `int` | — |  |
| `ostimestamp` | `int` | — |  |
| `server_name` | `nvarchar` | 50 |  |
| `server_port` | `int` | — |  |
| `licenses` | `nvarchar` | 100 |  |
| `flags` | `int` | — |  |
| `webserver` | `nvarchar` | 50 |  |
| `webalias` | `nvarchar` | 128 |  |
| `user_session` | `nvarchar` | 32 |  |
| `remote_addr` | `nvarchar` | 50 |  |

<a id="database.osstations"></a>

## osstations

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Registered client stations (workstation master data).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `stationid` | `nvarchar` | 32 |  |
| `stationname` | `nvarchar` | 255 |  |
| `description` | `nvarchar` | 255 |  |
| `lastlogin` | `int` | — |  |

<a id="database.osstationnc"></a>

## osstationnc

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Station network cards (registered MAC addresses per station).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `stationid` | `nvarchar` | 32 |  |
| `ipaddr` | `nvarchar` | 255 |  |
| `nc_guid` | `nvarchar` | 255 |  |

<a id="database.osclienttypes"></a>

## osclienttypes

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Known client types (web client, Win client, mobile, …).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `clienttypeid` | `nvarchar` | 32 |  |
| `name` | `nvarchar` | 255 |  |

<a id="database.osmobilepns"></a>

## osmobilepns

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Mobile push-notification targets (device tokens).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `osguid` | `nvarchar` | 32 |  |
| `lastNotificationTime` | `int` | — |  |
| `currentBadgeNumber` | `int` | — |  |
| `deviceIds` | `nvarchar` | max |  |
| `blackList` | `nvarchar` | max |  |

<a id="database.oslockedres"></a>

## oslockedres

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Active locks on resources (e.g. license-locked modules).

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `sessionguid` | `nvarchar` | 32 |  |
| `resourceid` | `nvarchar` | 32 |  |
| `locktime` | `int` | — |  |
| `preserveterm` | `int` | — |  |
| `flags` | `int` | — |  |
| `params` | `nvarchar` | 255 |  |

<a id="database.oslockedtabs"></a>

## oslockedtabs

> **Warning:** This page was automatically generated from the database schema dump and may be incomplete or incorrect.

Active locks on tabs / masks.

### Columns

| Name | Type | Length | Description |
|---|---|---|---|
| `tableid` | `int` | — |  |
| `tablename` | `nvarchar` | 255 |  |
| `locktype` | `int` | — |  |
| `serverid` | `int` | — |  |
| `threadid` | `int` | — |  |
| `locktime` | `int` | — |  |
| `lockcount` | `int` | — |  |
