3.1.4.3.2.1.1.31 CloneDatabase

The CloneDatabase command<377> clones an existing database to a new database that has a specified name and id at a specified location.

     <xsd:complexType name="CloneDatabase">
     <xsd:all>
      <xsd:element name="Object" >
       <xsd:complexType>
          <xsd:element name="DatabaseID" type="ObjectReference" minOccurs="1" maxOccurs="1" />
       </xsd:complexType>
      </xsd:element>
      <xsd:element name="Target">
       <xsd:complexType>
           <xsd:element ref="eng100_100:DbStorageLocation" minOccurs="0" />
           <xsd:element name="DatabaseName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
           <xsd:element name="DatabaseID" type="xsd:string" minOccurs="1" maxOccurs="1"/>
       </xsd:complexType>
      </xsd:element>
    </xsd:all>
   </xsd:complexType>

The XSD for CloneDatabase depends upon the definitions of elements in a namespace other than the default namespace. The following element is defined in the namespace eng100_100.

   <xsd:element name="DbStorageLocation" type="xsd:string" minOccurs="0" />

Element

Default value

Description

Object/DatabaseID

[Required]

The Database object to perform CloneDatabase. The ObjectReference type is defined in ObjectReference Type (section 3.1.4.3.2.1.1.1).

Target/DbStorageLocation

Empty

The storage location for the database. This is the path to the directory where database needs to be cloned.

Target/DatabaseName

[Required]

The name of the target Database object to be cloned.

Target/DatabaseID

[Required]

The ID of the Database object to be cloned. The ObjectReference type is defined in ObjectReference Type.

The return result type for the CloneDatabase command is xmla-e:emptyresult.