ℹ️Appendix

DMK - Sql*Plus profile login.sql

By default, the Oracle SQL_Plus utility can take advantage of a login profile. DMK delivers a template script with some basic settings. To activate the DMK SQL_Plus profile copy the template script as follows:

cp -r ${DMK_HOME}/templates/sql ${DMK_HOME}

DMK – Linux/Unix Colored prompt

By default, the Linux/Unix prompt (variable PS1) customized by DMK does not include any colors. However, nowadays most Linux Oracle database servers have BASH shell installed per default and almost all kind of terminal supports colors.

# standard Linux prompt colors: 00=normal, 01=bold, 30-37 textcolor, 40-47 background
# var::PS1BASH::=::nowarn::'\\[\\033[00;36m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in light blue (cyan)
# var::PS1BASH::=::nowarn::'\\[\\033[00;30m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in black
# var::PS1BASH::=::nowarn::'\\[\\033[00;31m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in red
# var::PS1BASH::=::nowarn::'\\[\\033[00;32m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in green
# var::PS1BASH::=::nowarn::'\\[\\033[00;33m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in yellow/brown
# var::PS1BASH::=::nowarn::'\\[\\033[01;33m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in bright yellow
# var::PS1BASH::=::nowarn::'\\[\\033[01;33;40m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in yellow on black (useful for a bright background)
# var::PS1BASH::=::nowarn::'\\[\\033[00;34m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in blue
# var::PS1BASH::=::nowarn::'\\[\\033[00;35m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in magenta
# var::PS1BASH::=::nowarn::'\\[\\033[00;37m\\u@\\h:\\w/ [${ORACLE_SID}${DMK_SID_PDB}]\\033[00m\\] '::
#prompt in white

Copy the desired prompt definition to $etc/dmk.conf.local;

Default aliases

Name
Description

c

Clear console

cda

Changes directory to ${ORACLE_BASE}/admin/${ORACLE_SID}

cdal

Changes directory to ${DMK_ORA_SID_LOG} – alert*.log directory

cdb

Changes directory to ${ORACLE_BASE}

cdd

Changes directory to ${DMK_BASE}

cddi

Changes directory to ${DMK_DIAG_DEST}

cdh

Changes directory to ${ORACLE_HOME}

cdl

Changes directory to ${ORACLE_BASE}/local

cdt

Changes directory to ${ORACLE_BASE}/network/admin

dmkhelp <package name>

Displays all default aliases/variables categorized by the DMK package you are looking for. The help is available for all packages.

f

Executes fdisk.ksh

lspdb

Lists Oracle Pluggable Databases for the current environment

rmanc

Launch rman with catalog/nocatalog connection if the rman.conf is present

sqh

Sqlplus with history

sq

Sqlplus without history

sta/ser/u

Print Oracle components status: “sta” by status “ser” by service “u” a faster variant of “ser” (no differentiation between the database states OPEN/MOUNT/NOMOUNT)

g

Print Oracle GoldenGate groups status details for Manager, Extract, Replicat and for Goldengate monitor Jagent

taa/via

Tail/Edit the alert*.log

adr/viadr

Tail/Edit the dr*.log (Dataguard broker log file)

vid

Edit the ${DMK_HOME}/etc/dmk.conf

vil

Edit the ${TNS_ADMIN}/listener.ora

vio

Edit the ORATAB

Other aliases are created automatically for directories under the “${DMK_BASE}”.

As explained in paragraph 4.2 Automatic creation of aliases and variables for modules.

Default variables

Name
Description

DMK_BASE

Match the directory level above “${DMK_HOME}” Match typically the “${ORACLE_BASE}/local”

DMK_HOME

Installation directory

ORACLE_BASE

O.F.A , Software root directory

TNS_ADMIN

Match the directory “${ORACLE_BASE}/network”

DMK_ORA_ADMIN

Match the directory “${ORACLE_BASE}/admin”

DMK_ORA_ADMIN_SID

Match the directory “${ORACLE_BASE}/admin/${ORACLE_SID}”

DMK_ORA_SID_LOG

Match the alert*.log directory regardless of the database release

DMK_DIAG_DEST

Oracle 11g diagnostic dest Match typically the ${ORACLE_BASE}/diag

Other variables are created automatically for directories under the “${DMK_BASE}”.

As explained in paragraph 4.2 Automatic creation of aliases and variables for modules.

Microsoft Windows specifics

Utility
Description

tail.exe

Open Source real-time log viewer

tar.exe

GNU tar

gunzip.exe

Open Source gunzip

vi.exe

“VImproved”, Open Source text editor

Microsoft Windows Task Scheduler

Microsoft Windows scheduled tasks doesn’t launch directly the PowerShell layer. However starting PowerShell from the DOS layer shall be achieved using the following syntax:

powershell.exe –noprofile \\
–command "housekeeping.ksh"

The PowerShell profile is similar to the Unix/Linux user profile (~/.profile, ~/.bash_profile).

The “-noprofile” option bypass the sourcing of the user profile.

Support Matrix Release 2.0.0

Operating System
Support Level
Oracle Releases

MS Windows 2003

Supported

10.2, 11.2

MS Windows 2008

Supported

10.2, 11.2,12.1

MS Windows 2012

Supported

11.2, 12.1

Oracle Enterprise Linux

Certified

All releases supported by Oracle

Red Hat Enterprise Linux

Certified

All releases supported by Oracle

Suse Enterprise Linux

Supported

All releases supported by Oracle

IBM AIX

Supported (IBM & Intel)

10.1, 10.2, 11.1, 11.2

Sun Solaris

Supported (ipc86 & SPARC)

10.2, 11.2

HP-UX

Supported (Itanium)

10.2, 11.2

The current release 2.0.0 is only tested with Linux. Maybe It works with AIX/Solaris/HPUX, but It Is not tested. With Windows, it definitely does not work --> use a former release of DMK.

Last updated