Show TOC

Extracting Database ContentLocate this document in the navigation structure

Prerequisites

You have:

  • Connected to the database you want to extract content from

    More information: Creating Database Connections

  • Opened the Dictionary perspective

  • Created a Dictionary DC to store the extracted content

Context

Use this procedure to extract content from database tables. You can extract either the full database tables content or particular entries. To specify the content for extraction, you use SQL queries. The selected content is extracted in XML files, which are stored in the Content Files directory of a Dictionary development component (DC) in the SAP NetWeaver Developer Studio.

A content XML file contains the following elements:

Element

Description

selections

The root element of the content XML file.

table

Contains the extracted data from a particular table.

Used in: selections

Contains: entry

entry

Contains the extracted data from a table entry (row).

Used in: table

Contains: field

field

Contains the extracted data from a particular table field (column) for the particular table entry.

Used in: entry

The extracted content is deployable within a Dictionary DC. If you want to do so, you have to build your Dictionary DC and deploy it on the target database. During the DC build, the SAP NetWeaver Developer Studio creates an additional Software Deployment Archive (SDA) to contain the XML files with the extracted content.

Extracting database content is useful when you want to copy or migrate data from one database to another. The respective table (or tables) definition must exist on the target database.

Note

Extracting table entries of the type DATE , TIME and TIMESTAMP is not supported.

Procedure

  1. (Optional) To show or hide the SQL Files and the Content Files directories of the Dictionary DC, choose Start of the navigation path Filters End of the navigation path, then deselect or select the Hide Content and SQL Files checkbox.
  2. Create an SQL file to use for your queries.
    1. In the Dictionary Explorer , expand the tree of your Dictionary DC.

    2. In the context menu of the SQL Files directory, choose Create SQL .

    3. Fill in the required data.

      1. Enter a File Name for your SQL file.

      2. Select your Database Server Type .

      3. Select your Connection Profile Name or choose Create to create a new connection profile.

        More information about creating database connection profiles: Creating Database Connections

      4. Select your Database Name .

    4. Choose Finish .

  3. Enter one or multiple SQL queries to specify the database content you want to extract.
  4. In the context menu of the SQL editor, choose Extract Content From Database .

    The content XML file is created under the Content Files directory of the Local Dictionary in your Dictionary DC. The name of the file is the same as the name of the SQL file used.