# How to activate Adabas as a service in LINUX, if the database has a user exit defined?

**URL:** <https://techcommunity.softwareag.com/t/how-to-activate-adabas-as-a-service-in-linux-if-the-database-has-a-user-exit-defined/296443>\
**Category:** Knowledge base\
**Tags:** Adabas-Natural, Adabas, Adabas-on-Linux, Tuesday-troubleshooting\
**Created:** [June 4, 2024, 8:52am UTC](https://techcommunity.softwareag.com/t/how-to-activate-adabas-as-a-service-in-linux-if-the-database-has-a-user-exit-defined/296443 "2024-06-04T08:52:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Community-admin](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/community-admin/32/6908_2.png) [@Community-admin](https://techcommunity.softwareag.com/u/Community-admin)\
**Post date:** [June 4, 2024, 8:52am UTC](https://techcommunity.softwareag.com/t/how-to-activate-adabas-as-a-service-in-linux-if-the-database-has-a-user-exit-defined/296443/1 "2024-06-04T08:52:13Z")

</div>

## Introduction

When configuring Adabas as a service in Linux, you may encounter challenges related to user exits. In this guide, we’ll explore the steps to activate Adabas as a service while considering user exits. (In this case, uex4).

## Pre-requisites

| Product | Adabas |
| --- | --- |
| Versions | 7.0.1, 7.1.1, 7.2, 7.3 |
| Platforms | Linux and Cloud |

## Problem

You may encounter such an issue by creating a daemon (as example db012.service) with the command:  
`create_systemd_service_file.sh 012 sag`

and starting the database as a service with:  
`systemctl start db012`

## Cause

If the adanuc.log entries include “shared library ADAUEX\_4, path name () could not be loaded” and “invalid environment variable” error messages, it implies difficulties in starting the database as a service, with a user exit defined.

Setting the environment variable ADAUEX\_4 in a command shell is not adequate when the database is configured as a systemd service. To solve this stumbling block, define an entry in the DBXXX.INI file of the database in the [ENVIRONMENT] section.

The inability to start a database with a user exit defined could manifest in the form of loading errors in the shared library ADAUEX\_4.

## Resolution

Setting the environment variable ADAUEX\_4 in a command shell is not sufficient when a database is configured as a systemd service.  
A possible solution is to define an entry in the DBXXX.INI file of the database in the section [ENVIRONMENT]:

### Example:

```auto
[ENVIRONMENT]
...
ADAUEX_4 = <SAG directory>/Adabas/examples/libadauex4.so
...
[ENVIRONMENT-END]

(This requires an entry "USEREXITS = 4" in the [NUCPARMS] session, too)

[NUCPARMS]
...
USEREXITS = 4
...
[NUCPARMS-END] 

```
