# Installation & Upgrade & De-Installation

## Installation

This paragraph describes the installation

### Prerequisites

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

* a successful installation of DMK as it’s the root component of DMK\_DBCREATE

### Software extraction

Based on the dbi services and OFA (Oracle Flexible Architecture) best practices extract the archive under ${ORACLE\_BASE}/local, as explained below: <img src="https://3382315087-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPtQvF2ryopbZznR9blJe%2Fuploads%2Fgit-blob-f614e4ffbf8c785bcb89e5cedc4f0e0acfba291a%2Fwindows_and_linux_logo.png?alt=media" alt="" data-size="line">

```
gzip --decompress dmk-xx-xx-xxxx.tar.gz
tar -xvf dmk-xx-xx-xxxx.tar
```

Typically, ${ORACLE\_BASE} match:

* “/u01/app/oracle ” on Linux/Unix
* “D:\oracle”on Microsoft Windows systems

### Install

To complete the installation you just need to re-source DMK. This can be either achieved by

* <img src="https://3382315087-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPtQvF2ryopbZznR9blJe%2Fuploads%2Fgit-blob-dd45286cda15317dd6e129fcae9cc69c6fb97de7%2Fwindows_logo.png?alt=media" alt="" data-size="line"> restarting the PowerShell Console
* <img src="https://3382315087-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPtQvF2ryopbZznR9blJe%2Fuploads%2Fgit-blob-e73ef37ed7e1f831b1dd8adaf7f6e665a6c59537%2Flinux_logo.png?alt=media" alt="" data-size="line"> sourcing DMK within your shell (alias dmk)

```
oracle@vmoraoel:/home/oracle/ [rdbms11202] dmk
oracle@vmoraoel:/home/oracle/ [rdbms11202] echo ${DMK_DBCREATE}
/u01/app/oracle/local/dmk_dbcreate
```

*Enjoy!*

### Upgrade

dbi services recommend to perform a backup of your DMK\_DBCREATE package before upgrading.

The upgrade process is similar to the installation except that the prerequisites are already fulfilled:

* Extract the software as explained in chapter 3.1.2 Software extraction
* Install DMK as explained in chapter 3.1.3 Install

:warning:**Upgrades of versions prior to the 12-10 require a reinstallation.**

That’s it!

### Upgrades of DBCA Templates

To use DBCA Templates from previous version the following has to be modified:

* In the header now the template version is specified under description:

```
<DatabaseTemplate name="dbi_template_Unix_asm_19" description="Template Version 19-09" version="19.3.0.0.0">
```

* Disabled Autoextend for the UNDOTBS1 tablespace and instead increased the allocation size:(modified values marked yellow)

```
<DatafileAttributes id="&lt;OMF_UNDOTBS1_DATAFILE_0>">
 <tablespace>UNDOTBS1</tablespace>
 <temporary>false</temporary>
 <online>true</online>
 <status>0</status>
 <size unit="MB">2048</size>
 <reuse>true</reuse>
 <autoExtend>false</autoExtend>
 <increment unit="KB">5120</increment>
 <maxSize unit="MB">2048</maxSize>
</DatafileAttributes>
```

* Added the following Oracle parameters:

```
<initParam name="archive_lag_target" value="1200"/>
<initParam name="audit_trail" value="DB"/>
<initParam name="control_file_record_keep_time" value="35"/>
<initParam name="db_files" value="1022"/>
```

* This DBCA template upgrade is now done automatically:

```
Upgrading DBCA template from version 00-00 to latest template version 19-09:
 - Backup Template to /u01/app/oracle/local/dmk_dbcreate/templates/dbca/database/dbi_template_fs_18_00-00.bak ...
 - Upgrading Template /u01/app/oracle/local/dmk_dbcreate/templates/dbca/database/dbi_template_fs_18.dbt ...
 - DONE
 - Below you'll find a simple file differences report:
--------------------------------------------------------------------------------------------------------------
file difference between:
- /u01/app/oracle/local/dmk_dbcreate/templates/dbca/database/dbi_template_fs_18_00-00.bak
+ /u01/app/oracle/local/dmk_dbcreate/templates/dbca/database/dbi_template_fs_18.dbt
--------------------------------------------------------------------------------------------------------------
- <DatabaseTemplate name="dbi_template_Unix_fs_18" description="" version="18.3.0.0.0">
+ <DatabaseTemplate name="dbi_template_Unix_fs_18" description="Template Version 19-09" version="18.3.0.0.0">
+ <initParam name="archive_lag_target" value="1200"/>
+ <initParam name="audit_trail" value="DB"/>
+ <initParam name="control_file_record_keep_time" value="35"/>
+ <initParam name="db_files" value="1022"/>
- <size unit="MB">1024</size>
+ <size unit="MB">2048</size>
- <autoExtend>true</autoExtend>
+ <autoExtend>false</autoExtend>
--------------------------------------------------------------------------------------------------------------
2019-11-11_16-47-44::dmk_dbcreate.pl::dmk_dbcreate.pl ::INFO ==> All scripts will be created in
/opt/oracle/admin/DB18/create with ORACLE_HOME=/opt/oracle/product/18c/dbhome_1
Do you want to continue=[Y/N]:
```

### Upgrade of Database Templates

To use Database Templates from the previous version the following has to be done:

* Add parameter AUDIT\_RETENTION\_DAYS = 31

## De-installation

This paragraph describes the de-installation of the DMK\_ DBCREATE toolkit.

<img src="https://3382315087-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPtQvF2ryopbZznR9blJe%2Fuploads%2Fgit-blob-e73ef37ed7e1f831b1dd8adaf7f6e665a6c59537%2Flinux_logo.png?alt=media" alt="" data-size="line">For Linux:

```
rm -rf $DMK_DBCREATE
```

<img src="https://3382315087-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPtQvF2ryopbZznR9blJe%2Fuploads%2Fgit-blob-dd45286cda15317dd6e129fcae9cc69c6fb97de7%2Fwindows_logo.png?alt=media" alt="" data-size="line"> For Windows:

```
Remove-Item $DMK_DBCREATE
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dbi-services.gitbook.io/dmk-oracle-manual/extension/dmk_dbcreate/installation-and-upgrade-and-de-installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
