Skip to main content
SnapManager for SAP

Create clone specifications

Contributors

SnapManager for SAP uses a clone specification XML file, which includes the mappings, options, and parameters for use in the clone operation. SnapManager uses this information to determine where to place the files it clones and how to handle diagnostic information, control files, parameters, and so on.

About this task

You can create the clone specification file by using the SnapManager graphical user interface (GUI), command-line interface (CLI), or a text editor.

When you create the clone specification file by using a text editor, you must save it as a .xml file. You can use this XML file for other clone operations.

You can also create a clone specification template and then customize it. You can use the smsap clone template command or in the GUI, use the Clone wizard.

SnapManager for SAP adds a version string to any clone specification template that it generates. SnapManager for SAP assumes the latest version for any clone specification file that lacks a version string.

If you want to perform remote cloning, do not change the default locations of the data files, redo log files, and control files in the clone specification file. If you change the default location, SnapManager fails to create the clone or creates the clone on a database that does not support Snapshot capability. Therefore, the automatic creation of profile fails.

Note Though mount point and ASM disk group information are editable from the GUI, you can only change the file name and not the file locations.

You can execute a task multiple times, either with the same or different parameter and value combinations.

SAP uses specific Oracle settings for database configuration. You can find these settings in init<SID>.ora located at $ORACLE_HOME\database. You should include these in your clone specification.

Steps
  1. Open a text file and enter text as shown in the following example:

    Example

    <clone-specification xmlns="http://www.example.com>
         <storage-specification/>
         <database-specification/>
     </clone-specification>
  2. In the storage specification component, enter the mount points for the data files.

    The storage specification lists the locations for the new storage created for the clone such as data file mount points and raw devices. These items must be mapped from the source to the destination.

    The following example shows a single NFS mount point on an NFS-attached storage:

    Example

    <mountpoint>
          <source>\oracle\<SOURCE SID>_sapdata</source>
          <destination>\oracle\<TARGET SID>_sapdata</destination>
    </mountpoint>
  3. In the database specification component, identify the control file information as a list of the control files that you want created for the clone.

    The database specification specifies the database options for the clone such as control files, redo logs, archive logs, and Oracle parameters.

    The following example displays the control file syntax that you use in clone specification:

    Example

    <controlfiles>
         <file>\oracle\<TARGET SID>\origlogA\cntrl\cntrl<TARGET SID>.dbf</file>
         <file>\oracle\<TARGET SID>\origlogB\cntrl\cntrl<TARGET SID>.dbf</file>
         <file>\oracle\<TARGET SID>\sapdata1\cntrl\cntrl<TARGET SID>.dbf</file>
    </controlfiles>
  4. Specify the redo log structure for the clone.

    The following example displays the redo log directory structure for cloning:

    Example

    <redologs>
         <redogroup>
            <file>E:\oracle\<TARGET SID>\origlogA\log_g11m1.dbf</file>
            <file>E:\oracle\<TARGET SID>\mirrlogA\log_g11m2.dbf</file>
            <number>1</number>
            <size unit="M">100</size>
         </redogroup>
         <redogroup>
            <file>E:\oracle\<TARGET SID>\origlogB\log_g12m1.dbf</file>
            <file>E:\oracle\<TARGET SID>\mirrlogB\log_g12m2.dbf</file>
            <number>2</number>
            <size unit="M">100</size>
         </redogroup>
         <redogroup>
            <file>E:\oracle\<TARGET SID>\origlogA\log_g13m1.dbf</file>
            <file>E:\oracle\<TARGET SID>\mirrlogA\log_g13m2.dbf</file>
            <number>3</number>
            <size unit="M">100</size>
         </redogroup>
         <redogroup>
            <file>E:\oracle\<TARGET SID>\origlogB\log_g14m1.dbf</file>
            <file>E:\oracle\<TARGET SID>\mirrlogB\log_g14m2.dbf</file>
            <number>4</number>
            <size unit="M">100</size>
         </redogroup>
    </redologs>
  5. Specify the Oracle parameters that should be set to different values in the cloned database. If you are using Oracle 10, you must specify the following parameters:

    • Background dump

    • Core dump

    • User dump

    • Optional: Archive logs

      Note If the parameter values are not set correctly, the clone operation is stopped and you receive an error message.

If you do not specify the location where archive logs are stored, SnapManager creates the clone in noarchivelog mode. SnapManager copies this parameter information into the init.ora file of the clone.

The following example displays the parameter syntax that you use in clone specification:

Example

<parameters>
     <parameter>
          <name>log_archive_dest</name>
          <value>LOCATION=>E:\oracle\<TARGET SID>\oraarch</value>
     </parameter>
     <parameter>
          <name>background_dump_dest</name>
          <value>E:\oracle\<TARGET SID>\saptrace\background</value>
     </parameter>
     <parameter>
          <name>core_dump_dest</name>
          <value>E:\oracle\<TARGET SID>\saptrace\background</value>
     </parameter>
     <parameter>
     <name>user_dump_dest</name>
     <value>E:\oracle\<TARGET SID>\saptrace\usertrace</value>
     </parameter>
</parameters>

You can use a default value by using a default element within the parameter element. In the following example, the os_authentication_prefix parameter will take the default value because the default element is specified:

Example

<parameters>
     <parameter>
          <name>os_authent_prefix</name>
          <default></default>
     </parameter>
</parameters>

You can specify an empty string as the value for a parameter by using an empty element. In the following example, the os_authentication_prefix will be set to an empty string:

Example

<parameters>
     <parameter>
          <name>os_authent_prefix</name>
          <value></value>
     </parameter>
</parameters>
Note

You can use the value from the source database's init.ora file for the parameter by not specifying any element.

Example

If a parameter has multiple values, then you can provide the parameter values separated by commas. For example, if you want to move the data files from one location to another, then you can use the db_file_name_convert parameter and specify the data file paths separated by commas as seen in the following example:

Example

If you want to move the log files from one location to another, then you can use the log_file_name_convert parameter and specify the log file paths separated by commas, as seen in the followowing example:

  1. Optional: Specify arbitrary SQL statements to execute against the clone when it is online.

You can use the SQL statements to perform tasks such as re-creating the temp files in the cloned database.

Note

You must ensure that a semicolon is not included at the end of the SQL statement.

The following is a sample SQL statement that you execute as part of the clone operation:

<sql-statements>
   <sql-statement>
     ALTER TABLESPACE TEMP ADD
     TEMPFILE 'E:\path\clonename\temp_user01.dbf'
     SIZE 41943040 REUSE AUTOEXTEND ON NEXT 655360
     MAXSIZE 32767M
   </sql-statement>
</sql-statements>

Clone specification example

The following example displays the clone specification structure, including both the storage and database specification components, for a Windows environment:

<clone-specification xmlns="http://www.example.com>

<storage-specification>
    <storage-mapping>
        <mountpoint>
            <source>D:\oracle\<SOURCE SID>_sapdata</source>
            <destination>D:\oracle\<TARGET SID>_sapdata</destination>
        </mountpoint>
    </storage-mapping>
</storage-specification>

<database-specification>
    <controlfiles>
        <file>D:\oracle\<TARGET SID>\origlogA\cntrl\cntrl<TARGET SID>.dbf</file>
        <file>D:\oracle\<TARGET SID>\origlogB\cntrl\cntrl<TARGET SID>.dbf</file>
        <file>D:\oracle\<TARGET SID>\sapdata1\cntrl\cntrl<TARGET SID>.dbf</file>
     </controlfiles>

     <redologs>
        <redogroup>
            <file>D:\oracle\<TARGET SID>\origlogA\log_g11m1.dbf</file>
            <file>D:\oracle\<TARGET SID>\mirrlogA\log_g11m2.dbf</file>
            <number>1</number>
            <size unit="M">100</size>
        </redogroup>
        <redogroup>
            <file>D:\oracle\<TARGET SID>\origlogB\log_g12m1.dbf</file>
            <file>D:\oracle\<TARGET SID>\mirrlogB\log_g12m2.dbf</file>
            <number>2</number>
            <size unit="M">100</size>
        </redogroup>
        <redogroup>
            <file>D:\oracle\<TARGET SID>\origlogA\log_g13m1.dbf</file>
            <file>D:\oracle\<TARGET SID>\mirrlogA\log_g13m2.dbf</file>
            <number>3</number>
            <size unit="M">100</size>
        </redogroup>
        <redogroup>
            <file>D:\oracle\<TARGET SID>\origlogB\log_g14m1.dbf</file>
            <file>D:\oracle\<TARGET SID>\mirrlogB\log_g14m2.dbf</file>
            <number>4</number>
            <size unit="M">100</size>
       </redogroup>
    </redologs>

    <parameters>
        <parameter>
            <name>log_archive_dest</name>
            <value>LOCATION=>D:\oracle\<TARGET SID>\oraarch</value>
        </parameter>
        <parameter>
            <name>background_dump_dest</name>
            <value>D:\oracle\<TARGET SID>\saptrace\background</value>
        </parameter>
        <parameter>
            <name>core_dump_dest</name>
            <value>D:\oracle\<TARGET SID>\saptrace\background</value>
        </parameter>
        <parameter>
            <name>user_dump_dest</name>
            <value>D:\oracle\<TARGET SID>\saptrace\usertrace</value>
        </parameter>
    </parameters>
  </database-specification>
</clone-specification>