> 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/extension/dmk_dbduplicate/example.md).

# Example

## Requirement

1. Create the spfile for the auxiliary database
2. Start the auxiliary database on the level nomount
3. Add the parameter db\_create\_file\_dest , db\_create\_online\_log\_dest\_1 and db\_create\_online\_log\_dest\_2 in the spfile of the new database
4. Create the directories in oradata
5. Configure the Listener and the Tnsnames on the both sides

## Listener

### On the target database

```
# listener.ora Network Configuration File:
D:\\oracle\\grid\\network\\admin\\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = srvoraclewinasm)(PORT = 1521))
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
 )
 )

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER=SUBNET # line added by Agent
```

### On the auxiliary database

```
# listener.ora Network Configuration File:
/u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
LISTENER =
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = srvoracle)(PORT = 1521))
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
 )
 )
SID_LIST_LISTENER =
```

## Tnsnames

### On the target database

```
DB1 =
(DESCRIPTION =
 (ADDRESS= (PROTOCOL = TCP)(HOST = srvoraclewinasm )(PORT = 1521))
 (CONNECT_DATA =
 (SID = DB1)
 )
)
DBTEST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.102)(PORT = 1521))
 (CONNECT_DATA =
 (SID = DBTEST)
 )
)
```

### On the auxiliary database

```
DBTEST =
(DESCRIPTION =
 (ADDRESS= (PROTOCOL = TCP)(HOST = srvoracle )(PORT = 1521))
 (CONNECT_DATA =
 (SID = DBTEST)
 )
)
DB1 =
(DESCRIPTION =
 (ADDRESS= (PROTOCOL = TCP)(HOST = 192.168.56.109 )(PORT = 1521))
 (CONNECT_DATA =
 (SERVICE_NAME = DB1_SITE1.it.dbi-services.com)
 )
)
```

## Configuration File

```
# the SID of the source database (the database to clone from)
SSID=DB1
# the SID of the target/auxiliary database (the database to clone to)
TSID=DBTEST
# database connect string to clone from
SSID_CONNECT=sys/manager@DB1
# database connect string to clone to
TSID_CONNECT=sys/manager@DBTEST
# Connect string to the rman catalog, if any
RMAN_CATALOG_CONNECT=
# CLONE_MODE mode can be either ACTIVE or BACKUP
CLONE_MODE=ACTIVE
# the backup location for duplicates from backup
# this must be accessible from the host where
# the auxiliary instance is hosted
BACKUP_LOCATION=
# the type of backup which is used for backing up the databases
# can be either DISK or TAPE
BACKUP_TYPE=
# when the backup_type is tape we need to know the sbt
# parameters
SBT_TAPE_PARMS='SBT_LIBRARY=oracle.disksbt
ENV=(BACKUP_DIR=/u90/backup/DB122/)'
# specifiy the nofilenamecheck parameter for the duplicate
# <http://docs.oracle.com/database/121/RCMRF/rcmsynta020.htm#RCMRF126>
# The value of this parameter can be either YES or NO
NOFILENAMECHECK=YES
# a post script to run on the auxiliary database
# after the duplicate completed
# this can e.g. be useful for disabling archive log
# once the duplicate completed
POSTSCRIPT=
```

## Execution

```
dbdupli.cmd -f D:\oracle\local\dmk_dbduplicate\etc\refresh_DBTEST.cfg
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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_dbduplicate/example.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.
