# Functionalities & Features

## Automatic activation of the profile

A profile template is delivered with DMK. Follow the instructions to configure DMK sourcing at login time.

### Linux/Unix login-Shell profile:

Depending on your SHELL the profile file can be called “.profile” or “.bash\_profile”.

```bash
cat ${DMK_HOME}/templates/profile/dmk.mysql.profile >> ~/.profile
```

### Alias & Variable Management : ${DMK\_HOME}/etc/dmk.conf

DMK set the environment using “${DMK\_HOME}/etc/dmk.conf” in 3 steps

<figure><img src="https://1648827094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkFTMxEkRyDO1dsQ1qR3%2Fuploads%2Fgit-blob-6ad068c04fe36ac72d800e51b9109a62ab462b2a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

All these steps match to a section from the “${DMK\_HOME}/etc/dmk.conf” file. Which are defined by brackets “\[…]”, example follows:

{% code overflow="wrap" fullWidth="true" %}

```bash
[GLOBAL]

var::MYSQL_CNF::=::nooption::"/u01/app/mysql/etc/my.cnf"::

…

alias::vic::novar_noforce::"vi ${MYSQL_CNF}"::


[SID]

var::DMK_MYSQL_ADMIN::=::nowarn::"${MYSQL_BASE}/admin/${MYSQL_SERVER}/log"::

…

alias::cda::var_noforce::'cd ${MYSQL_BASE}/admin/${MYSQL_SERVER}'::


[mysqld2]

var::MYSQL_BASE::=::nowarn::"/u01/app/mysql"::# location of global mysql base

…

alias::mq::novar_noforce::"mysql --defaults-file=${MYSQL_BASE}/admin/${MYSQL_SERVER}/.my.cnf'":
```

{% endcode %}

The database section \[+ASM1] is set specially for the environment of the database “+ASM1”. If aliases or variables overwrite a defined one from any other section, it will be re-initialized by switching to next environment.

## Automatic creation of aliases and variables for modules

DMK interacts with other dbi services toolkits (DMK\_HA,DMK\_DBBACKUP,DMK\_SQL, aso ….), **this interaction feature is available for customers on Linux/Unix platforms**.

Details of the feature:

* Directories located under ${MYSQL\_BASE}/local
* Creates an alias and a variable with the name of the directory in Uppercase
* The System variable ${PATH} is extended with the “bin” directory

{% code overflow="wrap" fullWidth="true" %}

```bash
mysql@vmoraoel:/home/mysql/ [rdbms1120] ls -d /u01/app/mysql/local/demo/*

/u01/app/mysql/local/demo/bin

mysql@vmoraoel:/u01/app/mysql/local/ [rdbms112] alias demo

alias demo='cd /u01/app/mysql/local/demo'

mysql@vmoraoel:/u01/app/mysql/local/ [rdbms112] echo ${PATH}

...:/u01/app/mysql/local/demo/bin

mysql@vmoraoel:/u01/app/mysql/local/ [rdbms112] echo ${SQLPATH}

...:/u01/app/mysql/local/demo/sql

mysql@vmoraoel:/u01/app/mysql/local/ [rdbms112] echo ${DEMO}

/u01/app/mysql/local/demo
```

{% endcode %}

:warning: Aliases won’t be created for directories containing the hyphen “-“ character.
