Skip Headers
Oracle® Warehouse Builder Installation and Administration Guide
11g Release 2 (11.2) for Windows and Linux

Part Number E17130-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

11 Using Snapshots to Manage Metadata

This section describes how to use snapshots to manage metadata. Snapshots in Oracle Warehouse Builder enable you to capture point-in-time versions of the metadata definitions of the design objects you create in the Project Navigator. You can capture all design objects in a project, or you can selectively choose objects to include in a snapshot.

This section includes the following topics:

About Snapshots and Metadata Loader

Because snapshots and the Metadata Loader have overlapping capabilities, it may not be readily apparent when to use one and not the other. In general, snapshots address the needs of a development team for tracking changes to an evolving design. The Metadata Loader facilitates the more traditional administrative tasks of backing up, restoring, and migrating repositories.

A key factor to understand is that snapshots and the Metadata Loader differ in the scope of objects they handle. Snapshots are limited to handling only the design objects users create in the Project Navigator. The Metadata Loader, however, handles everything in the repository. This includes all design objects and information related to location and security.

Refer to Table 11-1 for a list of important differences between the two tools.

Table 11-1 Comparison of Snapshots and Metadata Loader

Feature Snapshots Metadata Loader

Scope

Captures metadata related to objects in the Project Navigator only. Captures metadata for mappings, process flows, and other design objects. Does not capture information about locations, security, and user defined objects.

Captures all metadata related to a repository including all design objects and information about locations, security, and user defined objects.

Output

You can create a full snapshot from which to restore objects. Or you can create a signature snapshot which requires less space and enables you to track changes but not restore objects. Both types of snapshots are stored in Oracle Database.

When exporting, the Metadata Loader creates a ZIP file with the extension .mdl.You can use the output to restore a repository or populate a new repository on a different Oracle Database.

Integration with Version Control Tools

You can save the output as a file and then export the file into a version control tool.

You can export MDL files into a version control tool. When using the GUI, first extract the MDL file before putting the objects into the version control system. When using the OMB Plus scripting language, set ZIPFILEFORMAT=N as described in "About Metadata Loader Control Files".

Compatibility

Snapshots are not compatible between releases of Warehouse Builder.

MDL files are upwards compatible with newer releases of Warehouse Builder. When you import an MDL file from a previous release, the utility automatically upgrades the metadata to the new release.

Object Locking

To restore a snapshot, the Change Manager must obtain a lock on all primary objects. Locks held within that session are first freed by prompting the user to save or revert any pending changes, then automatically closing all editor windows. If a lock is held by another session, the restore fails and Change Manager rolls back any changes.

To import, the Metadata Loader must obtain a lock on all the primary objects. If a necessary lock is not available, the import fails and the Metadata Loader rolls back any changes.

Compare

You can compare snapshots by launching a command in the user interface.

You can compare MDL files by using a third-party diff tool.


Using Snapshots

When using snapshots, you can backup and restore your metadata, maintain a history of metadata changes, and compare different versions of the metadata.

A snapshot captures all the metadata information about the selected objects and their relationships at a particular instance of time. While an object can only have one current definition in a workspace, it can have multiple snapshots that describe its changing states throughout its history. Warehouse Builder supports the following types of snapshots:

Snapshots are stored in Oracle Database. Contrast this with Metadata Loader exports, which are stored as separate disk files. Note that you can export snapshots to disk files.

Snapshots are useful for both warehouse managers and designers. Managers can use full snapshots to perform large-scale actions, such as deploying a warehouse or restoring a warehouse to an earlier state. Designers can create full snapshots of a particular component under development so that, if necessary, they can restore that component to its previous state. Designers can also use signature snapshots to track the changes made to a particular component.

When used with other features, such as MDL metadata imports and impact analyses, snapshots help you manage the metadata. For example, you can use snapshots to determine the impact an MDL metadata import has on the current metadata workspace. With the knowledge gained by the comparison, you may choose to import the metadata at a lower level of detail to avoid overwriting the definition of related metadata objects.

Snapshots are also used to support the recycle bin, providing the information necessary to restore a deleted metadata object.

The rest of this section describes the metadata change management feature using the graphical user interface. For information about creating and managing snapshots using scripts, see Oracle Warehouse Builder API and Scripting Reference.

Creating Snapshots

When you take a snapshot, you capture the metadata of all or specific objects in your workspace at a given point in time. You can use a snapshot to detect and report changes in your metadata.

You can create snapshots of any first class objects, except for automatic default objects, and User or Role objects. Use Create Snapshot wizard to create snapshots.

Note that a snapshot of a collection is a snapshot of both the shortcuts in the collection and the actual objects. The same applies to a snapshot of a user folder, because it includes references (which are similar to shortcuts) to both contained and actual objects.

To create a snapshot:

  1. In the Project Navigator, select all the objects that you want to include in the snapshot.

    You do not need to select parent or child objects, because the wizard does that for you.

    For example, if you select a collection that contains two cubes, then the snapshot includes both cubes and any gives you the option to include any dependent objects such as dimensions and source tables.

    Note that you must select actual objects or user folders, not the standard folders that contain them.

  2. Right-click the selected object, then select Snapshot, then select New.

    Description of snapshot_01.gif follows
    Description of the illustration snapshot_01.gif

    Alternatively, from the File menu, select Snapshot, then select New.

  3. On the Welcome screen, click Next.

    Note that you can get supporting information at any time by clicking Help.

    Description of snapshot_02.gif follows
    Description of the illustration snapshot_02.gif

  4. On the Name page, specify the Name and the Type (Full or Signature) of the snapshot.

    Click Next.

    [Optional] Provide a Description.

    Description of snapshot_03.gif follows
    Description of the illustration snapshot_03.gif

  5. On the Components screen, choose whether to select the Cascade option.

    Click Next.

    This screen displays the components that are captured in the snapshot. If a component is a node-level object, such as a module, then select the Cascade option to include the subcomponents.

    Description of snapshot_04.gif follows
    Description of the illustration snapshot_04.gif

  6. On the Dependency screen, specify the Depth of dependency to include dependent objects in the snapshot.

    Click Next.

    Because it impacts performance, avoid specifying unnecessarily large values for depth. For example, supplying a depth value greater than 0 for a Project snapshot searches Globals for dependencies.

    Description of snapshot_05.gif follows
    Description of the illustration snapshot_05.gif

  7. On the Finish screen, review the characteristics of the snapshot.

    Click Finish to create the snapshot.

    Description of snapshot_06.gif follows
    Description of the illustration snapshot_06.gif

  8. The system starts creating the snapshot; notice the Create Snapshot Progress pop-up.

    Description of snapshot_07.gif follows
    Description of the illustration snapshot_07.gif

    When the snapshot is complete, a Warehouse Builder Note pop-up screen appears, stating "Snapshot created successfully."

    Click OK.

    Description of snapshot_08.gif follows
    Description of the illustration snapshot_08.gif

Adding Components to a Snapshot

After you create a snapshot, you can add more components. Keep in mind, however, that when you add components, you are changing the historical record provided by the snapshot, so its creation date changes.

To update a snapshot, use the Add to Snapshot wizard.

To add new components to the snapshot:

  1. In the Design Center Project Navigator, select all the components you want to add to the snapshot.

    For example, you can select tables, mappings, and dimensions from an Oracle module.

  2. Right-click and select Snapshot, then select Add to Existing.

    Alternatively, from the File menu, select Snapshot, then select Add to Existing.

    Description of snapshot_09.gif follows
    Description of the illustration snapshot_09.gif

    The Add to Snapshot wizard appears.

  3. On the Welcome screen, click Next.

    Note that you can get supporting information at any time by clicking Help.

    Description of snapshot_10.gif follows
    Description of the illustration snapshot_10.gif

  4. On the Snapshot screen, from the list of snapshots, select the snapshot where to add the components.

    Click Next.

    Description of snapshot_11.gif follows
    Description of the illustration snapshot_11.gif

  5. On the Components screen, note all the components that are added to the snapshot. If a component is a folder level object, such as a module, then select the Cascade option to include its subcomponents.

    Click Next.

    Description of snapshot_12.gif follows
    Description of the illustration snapshot_12.gif

  6. On the Finish screen, review the characteristics of the snapshot.

    Click Finish to update the snapshot.

    Description of snapshot_13.gif follows
    Description of the illustration snapshot_13.gif

  7. The system starts updating the snapshot; notice the Update Snapshot Progress pop-up.

    When the snapshot is complete, a Warehouse Builder Note pop-up screen appears, stating "Snapshot updated successfully."

    Click OK.

    Description of snapshot_14.gif follows
    Description of the illustration snapshot_14.gif

Managing Snapshots

You can manage your snapshots from the Metadata Change Management window in the Design Center. To open this window, select Change Manager from the Tools menu.

Description of change_mgr_01.gif follows
Description of the illustration change_mgr_01.gif

The Metadata Change Management window contains a menu bar and a toolbar. You can start most tasks in several different ways, either by using the menus, clicking the tools, or right-clicking a snapshot or a component.

Metadata Change Management window supports the following activities:

Figure 11-1 shows the Metadata Change Management window.

Figure 11-1 Metadata Change Management Window

Description of Figure 11-1 follows
Description of "Figure 11-1 Metadata Change Management Window"

Managing Snapshot Access Privileges

You can control access to snapshots just like any other object. By default, everyone has full access rights to the snapshots.

To change snapshot access privileges:

  1. In the left section of the Metadata Change Management window, right-click the name of the snapshot.

  2. From the menu, select Security.

    Description of change_mgr_03.gif follows
    Description of the illustration change_mgr_03.gif

    The Snapshot Privilege Management dialog box is displayed.

  3. On the Snapshot Privilege Management screen, for each user or role, select the privileges to grant and clear the privileges to deny.

    Click Help for additional information.

    Description of change_mgr_04.gif follows
    Description of the illustration change_mgr_04.gif

Comparing Snapshots

You can compare two snapshots, or a snapshot with a current workspace object. The results of a comparison list all objects as one of:

  • Identical objects appearing in both snapshots

  • An object appearing in only one snapshot

  • Similar objects appearing in both snapshots, with different property values

If you take a snapshot of an object that has a child object, and that child object subsequently changes, a comparison shows that the parent object has changed. For example, if you create a Cascade snapshot of a project, all the modules in that project are its children. If any of the modules change, a comparison of the snapshot to the workspace shows that the project has changed.

The Metadata Change Manager uses Universal Object Identifiers (UOIDs) as the basis for all comparisons. When you delete an object and re-create it with the same metadata, the object has a different UOID although it may be identical to the deleted object in all other aspects. When you compare the re-created object to its original version, the results show that all the metadata has changed. Likewise, objects do not match if they have been deleted and re-created during an import or Intelligence Object derivation.

Note that a temporary signature snapshot of the current workspace object is taken automatically; this increases the comparison time. If you are planning to make multiple comparisons to the same current workspace object, Oracle recommends that you take a signature snapshot and use it directly in snapshot-to-snapshot comparisons.

Two compare two snapshots:

  1. On the Metadata Change Management screen, select two snapshots for comparison.

    Right-click the selected snapshots, and select Compare.

    Alternatively, from the Snapshot menu, select Compare.

    Description of change_mgr_05.gif follows
    Description of the illustration change_mgr_05.gif

    The Compare Two Snapshots screen appears.

  2. On the Compare Two Snapshots screen, ensure that the correct snapshots are selected, and click Compare.

    [Optional] Click Help for additional information.

    Description of change_mgr_06.gif follows
    Description of the illustration change_mgr_06.gif

    The Snapshot Comparison screen appears.

  3. The Snapshot Comparison screen displays the differences between the two snapshots. By selecting one of the changed objects you can see the details of the changes.

    Description of change_mgr_07.gif follows
    Description of the illustration change_mgr_07.gif

    If there are no differences between snapshots, a Warehouse Builder Note pop-up screen appears, stating "The two snapshots are identical."

    Click OK.

    Description of change_mgr_08.gif follows
    Description of the illustration change_mgr_08.gif

  4. [Optional] Click Save As to save the results of the comparison to an *.xml file.

  5. Click Close.

To compare the current version of an object with a snapshot version:

  1. From the Project Navigator, select the object for comparison.

  2. Right-click the selected object, select Snapshot, and then select Compare.

    Description of change_mgr_09.gif follows
    Description of the illustration change_mgr_09.gif

    Alternatively, from the File menu, select Snapshot, and then select Compare.

    The Choose Snapshot screen appears. Note that it only lists the snapshots that contain the object of interest.

  3. On the Choose Snapshot screen, select the snapshot for comparison.

    Click OK.

    Description of change_mgr_10.gif follows
    Description of the illustration change_mgr_10.gif

  4. The Snapshot Comparison window displays the differences between the two objects. If there are none, then a message informs you that the objects are the same.

  5. The Snapshot Comparison screen displays the differences between the object and the snapshot. By selecting one of the changed objects you can see the details of the changes.

    Description of change_mgr_11.gif follows
    Description of the illustration change_mgr_11.gif

    If there are no differences between snapshots, a Warehouse Builder Note pop-up screen appears, stating "The object is identical to the snapshot snapshot".

    Description of change_mgr_12.gif follows
    Description of the illustration change_mgr_12.gif

    Click OK.

  6. [Optional] Click Save As to save the results of the comparison to an *.xml file.

  7. Click Close.

Converting a Full Snapshot to a Signature Snapshot

You can convert a full snapshot to a signature snapshot if it is no longer necessary for backup. This conversion preserves the snapshot history while saving a significant amount of space in the workspace.

Note that a signature snapshot cannot be used to restore metadata objects.

To convert a full snapshot:

  1. Open the Metadata Change Management window, as described in "Managing Snapshots".

  2. Select the snapshot that you want to convert.

  3. Right-click the selected snapshot, and select Convert to Signature.

    Alternatively, from the Snapshot menu, select Convert to Signature.

    Description of change_mgr_13.gif follows
    Description of the illustration change_mgr_13.gif

  4. On the Warehouse Builder Warning dialog box, click Yes.

    Description of change_mgr_14.gif follows
    Description of the illustration change_mgr_14.gif

  5. Notice that the Type of the snapshot has changed to Signature.

    Description of change_mgr_15.gif follows
    Description of the illustration change_mgr_15.gif

Restoring Workspace Objects From Snapshots

You can replace the current definition of an object in the workspace with the snapshot image of that object.

Note that:

  • You can only use full snapshots; you cannot restore objects from signature snapshots.

  • You can restore all components or only selected components of the snapshot.

  • When you restore a collection from a snapshot, you restore both the collection and the actual objects.

  • When you restore a container, all its child objects are also restored.

  • To restore only the collection or selected objects within a container, use the Components tab.

To restore objects from a snapshot:

  1. Save any work that you have done in the current session.

  2. Open the Metadata Change Management window, as described in "Managing Snapshots".

  3. Select the snapshot that contains the version of the objects you want to restore.

  4. [Optional] To restore all objects, right-click the snapshot, and select Restore.

    Description of change_mgr_16.gif follows
    Description of the illustration change_mgr_16.gif

  5. [Optional] to restore only some components, select these components in the Components tab, right-click the component, and select Restore.

    Description of change_mgr_17.gif follows
    Description of the illustration change_mgr_17.gif

  6. [Optional] If the most recent changes to the object have not been committed, a Warehouse Builder Warning note appears, stating "You must commit your changes before restoring a snapshot. Do you want to commit now?"

    Click Yes.

    Description of change_mgr_18.gif follows
    Description of the illustration change_mgr_18.gif

  7. On the Restore Snapshot screen, review the objects in the list and verify that the correct objects are restored. If you

    Select Cascade Up. This ensures that any components whose parents no longer exist in the workspace are restored with new parent objects.

    Click Restore.

    Description of change_mgr_19.gif follows
    Description of the illustration change_mgr_19.gif

  8. A Warehouse Builder Warning note appears, stating "All currently open editors will be closed after a successful restore. Do you want tocontinue?"

    Click Yes.

    Description of change_mgr_20.gif follows
    Description of the illustration change_mgr_20.gif

  9. The system starts restoring the snapshot; notice the Restore Snapshot Progress pop-up.

    When the snapshot is restored, a Warehouse Builder Note pop-up screen appears, stating "Snapshot restored successfully."

    Click OK.

    Description of change_mgr_21.gif follows
    Description of the illustration change_mgr_21.gif

Exporting and Importing Snapshots

You can export a full snapshot to an MDL file and use this file to re-create metadata objects either in the same database or in a different one. Note that you cannot export signature snapshots or individual components of a snapshot.

To export a snapshot:

  1. Open the Metadata Change Management window.

  2. Select the full snapshot you want to export.

  3. From the Snapshot menu, select Export.

    Description of change_mgr_22.gif follows
    Description of the illustration change_mgr_22.gif

  4. [Optional] If the most recent changes to the object have not been committed, a Warehouse Builder Warning note appears, stating "You must either save or revert your changes before exporting."

    Click Save.

    Description of change_mgr_23.gif follows
    Description of the illustration change_mgr_23.gif

  5. On the Metadata Export screen, do the following:

    • Click Browse to select the location and name of the export file (File Name).

    • Click Browse to select the location of the Log File.

    • Click Export.

    Note that the export file has an .mdl extension, and the log file has a .log extension.

    [Optional] Click Help for additional information.

    Description of change_mgr_24.gif follows
    Description of the illustration change_mgr_24.gif

  6. Note that the Metadata Export Progress screen appears.

    When the progress bar shows 100%, click OK.

    Description of change_mgr_25.gif follows
    Description of the illustration change_mgr_25.gif

To import a snapshot:

  1. From the File menu, select Import, then select Warehouse Builder Metadata.

    Description of change_mgr_26.gif follows
    Description of the illustration change_mgr_26.gif

  2. On the Metadata Import screen, specify the File Name of the file that is imported.

    Click Import.

    Description of change_mgr_27.gif follows
    Description of the illustration change_mgr_27.gif

  3. Note that the Metadata Import Progress screen appears.

    When the progress bar shows 100%, click OK.

    Description of change_mgr_28.gif follows
    Description of the illustration change_mgr_28.gif

Deleting Snapshots

You can delete snapshots or components within a snapshot from the Metadata Change Management window.

Note that you cannot delete individual components of a signature snapshot.

To delete a snapshot:

  1. On the Metadata Change Management screen, select the snapshot to delete.

  2. Right-click the snapshot and select Delete.

    Alternatively, from the Snapshot menu, select Delete.

    Description of change_mgr_29.gif follows
    Description of the illustration change_mgr_29.gif

  3. The Warehouse Builder Warning note appears, stating "You must either save or revert your changes before exporting."

    Click Yes.

    Description of change_mgr_31.gif follows
    Description of the illustration change_mgr_31.gif

To delete components from a snapshot:

  1. In the Metadata Change Management, select the snapshot from where to delete components.

  2. On the Components tab, select the component to delete, right-click the component, then select Delete.

    Alternatively, from the Snapshot menu, select Delete.

    Description of change_mgr_30.gif follows
    Description of the illustration change_mgr_30.gif

    Warehouse Builder displays a delete confirmation dialog box.

  3. The Warehouse Builder Warning note appears, stating "Are you sure you want to delete the selected component(s) and all its children?"

    Click Yes.

    Description of change_mgr_32.gif follows
    Description of the illustration change_mgr_32.gif

Snapshot Performance

Performance of snapshot operations depends on how accurate the SQL optimizer statistics are for a small subset of tables and indexes. Because most of these in a newly created repository contain little data, it is necessary to seed and lock the statistics initially. This ensures reasonable performance for moderately sized snapshots in a lightly populated repository.

As the number and size of snapshots increases, unless accurate statistics are refreshed on a periodic basis, the performance of snapshots degrades. Although a refresh may be performed in several different ways, OMBOPTIMIZE (in OMB*Plus) or Optimize Repository (in Tools menu) should be run at least once. Otherwise, certain tables remain locked and continue to use old, seeded statistics.