Installation & Upgrade & De-installation

This chapter describes all installation/upgrade/de-installation steps.

Installation / Upgrade

This paragraph describes the installation / upgrade.

Prerequisites

This paragraph describes all necessary steps which must be completed before you start the DMK installation.

DMK requires the Korn-shell (ksh) for its scrips.

The shell for interactive work (login shell) can be ksh or bash.

We recommend the "bash" shell (possibility for command-completion).

DMK requires a standard Perl for initial startup.

  • We recommend having a perl binary reachable via the the $PATH variable;

  • alternatively specify it with "export PERL_EXEC=/path/to/perl" (e.g. in .bash_profile).

  • Do not hardcode the path to a perl in a $ORACLE_HOME (it can be deinstalled…)

  • As fallback, DMK looks for a perl in the first ORACLE_HOME found in /etc/oratab.

  • The ~/.DMK_PERL file of older DMK releases is no longer used.

Hint: After the initial startup, DMK uses the Perl of the current ORACLE_HOME.

Software extraction

unzip dmk-xx-xx-xxxx.zip

Typically, ${ORACLE_BASE} match:

  • “/u01/app/oracle” on Linux/Unix

  • “D:\oracle”on Microsoft Windows systems

Installation or upgrade

If you upgrade a former installation, we recommend backing up your old installation.

oracle@vmoraoel:/u01/app/oracle/local/#> tar zcvf _dmkold.tgz dmk

Or to do a new installation and hide the old installation.

oracle@vmoraoel:/u01/app/oracle/local/#> mv dmk .dmkold

⚠️IMPORTANT: move it to a hidden directory (beginning with a dot '.')! Otherwise DMK thinks it is an additional DMK package and integrates it in the environment :-(

We recommend to cleanup the oratab file. Remove dummy-entries, remove PDB's from the SID-entries. The dmk.oratab can be removed, it Is no longer used. It Is now handled in new configuration files, see later.

oracle@vmoraoel:/u01/app/oracle/local/dmk/bin/#> echo $SHELL
/bin/bash
oracle@vmoraoel:/u01/app/oracle/local/dmk/bin/#> . ./dmk.sh

Hint for upgrade: If you used dmk.bash / dmk.ksh in your scripts: There is no need to update it to dmk.sh; It references the same code (symlink).

DMK tries to automatically configure the environment. It detects the ORACLE_HOME's, the SIDs, then it creates the configuration files.

In case of an upgrade:

The former dmk.conf file will be converted to dmk.conf.local and the old file is renamed to dmk.conf.old; In the new file there are only the lines you changed/added. The unchanged lines from the template are removed.

The template lines are now in dmk.conf.default (do NOT change this file! it will be overwritten with the next update).

The oratab file must no longer be edited. After the upgrade you can remove the old dmk specific adaptations.

Finally, add the line to source DMK to your profile (.profile, .bash_profile) to have DMK automatically activated in each new shell, or if you do not like to activate it automatically, add an alias to source DMK.

Refer to the paragraph 4.1 Automatic activation of the profile.

DMK as "root" or another user

DMK doesn’t only belong to a unique/specific user, if the necessary privileges are correctly set (especially write-access to $ORACLE_BASE/local/dmk/log), you can start DMK from another user as presented below.

Install and source DMK under the target user

[root@vmoraoel ~]# . /u01/app/oracle/local/dmk/bin/dmk.bash

Once installed it can be sourced using the DBA’s login profile

[root@vmoraoel ~]# . /home/oracle/.profile

De-installation

This paragraph describes the de-installation of the DMK toolkit.

rm ~/.DMK_*
rm -rf $DMK_HOME
Remove-Item "HKLM:\\\\Software\\\\dbiservices" -recurse
Remove-Item $DMK_HOME

In both cases do not forget to remove the profile from your environment and logout to complete to de-installation.

Last updated