> For the complete documentation index, see [llms.txt](https://dbi-services.gitbook.io/dmk-oracle-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dbi-services.gitbook.io/dmk-oracle-manual/appendix.md).

# 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               | <p>Print Oracle components status:<br>“sta” by status<br>“ser” by service<br>“u” a faster variant of “ser”<br>(no differentiation between the database states OPEN/MOUNT/NOMOUNT)</p> |
| 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            | <p>Match the directory level above “${DMK\_HOME}”<br>Match typically the “${ORACLE\_BASE}/local”</p> |
| 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      | <p>Oracle 11g diagnostic dest<br>Match typically the ${ORACLE\_BASE}/diag</p>                        |

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

### Unix utilities

| 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 |

There are more utilities in dmk\bin\wbin\ directory.\
Additional utilities can be extracted from [UnxUtils.zip](https://unxutils.sourceforge.net/UnxUtils.zip)

### Powershell

`dmk.Ps1` will set the environment for PowerShell.\
There is no need to have powershell specific scripts. The `*.cmd` scripts (e.g. housekeeping.cmd) can be used in powershell and cmd.exe\
How does it work: All the variables $ENV:variablename will be propagated to the called program, so a myscript.cmd has set the %variablename% in the process. The same applies for Perl scripts.

### Microsoft Windows Task Scheduler

DMK Scheduler-enabled scripts can be run directly without setting a dmk environment before (e.g. houskeeping.cmd). It will set the environment inside the script. How to see if it is scheduler-enabled? If it runs from a cmd.exe without sourcing dmk, it is scheduler-enabled.\
Microsoft Windows scheduled tasks doesn’t launch directly the PowerShell layer. So use the \*.cmd scripts instead. If you only have a Ps1 script, you have to explicitly invoke PowerShell:

```
powershell.exe –noprofile –command "yourcommand.Ps1"
```

## 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.
