| Oracle9i Warehouse Builder User's Guide Release 9.2 Part Number B10996-01 |
|
Oracle9i Warehouse Builder enables metadata change management and version management through snapshots. You can use metadata snapshots for backup, version management, compare, and restore purposes.
This section contains the following topics:
This section describes the metadata change management feature using the Warehouse Builder graphical user interface. For instructions on the commands and arguments to use when creating and managing snapshots using OMB Plus, refer to the Oracle9i Warehouse Builder Scripting Reference.
Unlike an MDL export, which results in an .mdl file stored separately in your file system, a snapshot is stored as an object in the database. You can create snapshots for all first class objects (objects that you can access from the navigation tree). For a classification of Warehouse Builder objects, refer to "Object Ownership Tree".
A snapshot is related to the object it describes in the repository. It contains all the information about its objects and the relationships for the object. Because collections contain shortcuts to actual objects, a snapshot of a collection can be a snapshot of all the actual objects to which the shortcuts point.
If you take a snapshot of a parent object that includes child objects, and a child object changes, a snapshot comparison can show the parent object as having changed. For instance, 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 repository will show the project to have changed.
While an object can only have one current definition in the repository, it can have multiple snapshots that describe it at various points in time.
When you delete an object from the Warehouse Builder navigation tree, a Delete Confirmation dialog displays. If you check the box indicating that you want to put this object in the recycle bin and click OK, Warehouse Builder displays a Snapshot Action dialog indicating that it is taking a snapshot of the object you are deleting.
Warehouse Builder enables you to take Full and Signature snapshots as well as Cascade and No Cascade snapshots.
This category determines the use of the snapshot:
If space becomes a concern, you can convert Full snapshots that you no longer need to keep for restore purposes to Signature snapshots, which consume less space. Conversion preserves the snapshot history and results in significant space savings in your repository. Currently, Warehouse Builder only enables you to perform conversions using scripting.
Cascading determines the objects contained in the snapshot.
The two categories are not mutually exclusive. Table 16-1 describes the outcomes for a snapshot of a parent object taken at various combinations.
Metadata change management enables you to take snapshots that capture the content of your metadata repository, or specific objects in your repository, at a given point in time. You can use a snapshot to detect and report changes in your metadata.
The Create Snapshot Welcome page displays.
The Create Snapshot Name page displays.
Name: Type a name up to 30 characters for the new snapshot.
Type: Indicate the type for the snapshot, Full or Signature. For more information on snapshot types, see "Snapshot Types".
Description: Type a description up to 2000 characters for the new snapshot.
The Create Snapshot Components page displays.
This page contains three columns:
Object: Lists the Warehouse Builder components that you want to include in your snapshot.
Type: Indicates the type of the Warehouse Builder component. For example, warehouse module, table, dimension, mapping, or view.
Cascade: This option enables you to select how an object is included in the snapshot. When you choose to cascade an object, you choose to include all child components of that object in the snapshot. For example, when you cascade an Oracle target module, you choose to include all the tables, dimensions, cubes, and other objects contained in that module. This option only applies to folder-level objects, such as modules, projects, or collections.
The Create Snapshot Dependency page displays.
This page enables you to select dependees for the objects in your snapshot. For example, a table with a foreign key is dependent on the table containing the referenced key. You can select 1 as the depth of dependency if you want to include the table containing the unique key in the snapshot. The maximum depth you can indicate is 100.
The Dependency Preview dialog enables you to preview the dependees that would be included in your snapshot. The list of dependees is based on the depth level you indicate on the Dependency page. For example, if you choose to include a mapping with a table and indicate a depth of 1, this dialog shows you the table contained in that mapping. If this table contains a foreign key and you indicate a depth of 2, this dialog lists the associated table containing the unique key.
The Create Snapshot Finish page displays.
The snapshots you create are displayed in the Metadata Change Management window.
After you create a snapshot, you can update it by adding more components to it. This section shows you how to update an existing snapshot.
To update an existing snapshot:
The Add to Snapshot Welcome page displays.
The Add to Snapshot page displays.
The Add to Snapshot Components page displays. This page contains three columns:
Object: Lists the Warehouse Builder components that you want to add to your snapshot.
Type: Indicates the type of the Warehouse Builder object. For example, warehouse module, table, dimension, mapping, or view.
Cascade: This option enables you to select how an object is included in the snapshot. When you choose to cascade an object, you choose to include all child components of that object in the snapshot. For example, when you cascade a module, you choose to include all the tables, dimensions, cubes, and other objects contained in that module. This option only applies to folder-level objects, such as modules or projects.
The Add to Snapshot Finish page displays.
You can view the updated snapshot in the Metadata Change Management window.
Warehouse Builder enables you to manage your snapshots from the Metadata Change Management Window. To open this window, select Project then Change Manager from the Warehouse Builder console. Figure 16-1 shows the Metadata Change Management window.
This window contains two columns. The column on the left side displays the snapshots available in your repository, the date and time they were created, their owners, and their type. You can sort the list of snapshots by any of these columns by clicking on the column header.
The right side column contains two tabs: General and Components. The General tab displays name, type, and description of the selected snapshot. The Components tab displays all the objects contained in the selected snapshot in a navigation tree format. The root of this tree depends on the components contained in that snapshot. For example, if the highest level object in the snapshot is a warehouse module, then that is the root. If the snapshot contains an entire project, then the project is the root. If a snapshot only contains three tables, then those tables become the roots of the tree.
You can perform the following activities from the Metadata Change Management window:
Warehouse Builder enables you to compare two snapshots or a snapshot with a current repository object by using Universal Object Identifiers (UOIDs) as the basis for all comparisons.
To compare two snapshots:
From the Metadata Change Management window, select Snapshot then Compare.
Or from the list of snapshots displayed in the Metadata Change Management window, multi-select the two snapshots you want to compare, right-click the snapshots, and select Compare.
The Compare Two Snapshot dialog displays as shown in Figure 16-2. If you already selected the two snapshots you want to compare, they will be pre-selected in the columns of this dialog.
Warehouse Builder displays the comparison results in the Snapshot Comparison dialog. For more information, see "Snapshot Comparison Dialog".
The Choose Snapshot dialog displays. This dialog lists all the snapshots containing versions of that object.
The Snapshot Comparison dialog displays the comparison results. For more information, see "Snapshot Comparison Dialog". If the repository object has not changed, then Warehouse Builder displays a message stating that there is no change.
When you compare two snapshots or when you compare a snapshot component with a repository object, the results display in the Snapshot Comparison dialog.
The View filter option at the top enables you to view only the changed objects. You can also select All Objects to display all objects in the snapshot, whether they are changed or not.
The Snapshot Comparison dialog contains two columns. The left side column displays the comparison results in a navigation tree format. The tree icons indicate the status of the snapshot components as shown in Table 16-2.
The right side column contains three tabs: General, Properties, and Links. These tabs display the following information:
General: Provides an overview of the comparison results. Select an object name from the navigation tree in the left column to view a summary of its physical name, business name, and type. This column also indicates whether there are any changes in the object properties, associated child components, or links.
Properties: Shows whether the properties of an object have changed or whether the object exists in both snapshots or only one of them.
Links: Shows whether there are changes to any links or associations for the object. The icons under the Difference field indicate the status of the object as shown in Table 16-2.
To save the comparison results as an XML file, click Save As. Or click Close to close the dialog.
When you compare snapshots, Warehouse Builder uses the Unique Object Identifier (UOID) for each object to perform the match. If you delete an object and recreate it with same metadata, the object now has a different UOID, although it looks similar to the deleted object. When you compare this object to its previous version, the results will show all the metadata as changed because you recreated the object again. Not only the changed metadata but the unchanged metadata also displays in the comparison results.
Because Warehouse Builder uses UOID to match nodes, if objects are deleted and recreated during MDL import or Intelligence Object derivation, the results will be different. This is true even if you trigger IGNORE UOID = TRUE during MDL Import.
When you restore a snapshot, you replace the current definition of the object in the repository with the snapshot image of that object. When restoring from full, cascade snapshots of projects, collections, or folders, you can select which child objects you want to restore. You can restore the complete snapshot, or only a part of it by selecting specific child objects.
To restore a snapshot:
If you have uncommitted work, you will be asked to commit first before restoring a snapshot.
Then the Restore Snapshot dialog displays as shown in Figure 16-3.
This dialog enables you to select the components to restore from a snapshot. By default, Warehouse Builder restores all components if you click Restore. You can also restore only a part of the snapshot by selecting specific child objects.
When you restore folders, all its child objects are also restored. For example, if you choose to restore a warehouse module, all the objects contained in that module are also automatically restored. To restore only selected objects within this warehouse module, you must first uncheck the warehouse module or any other folder and then selectively restore the objects within that folder.
The Restore dialog contains the following columns and options:
Component: Lists the Warehouse Builder components included in the snapshot.
Type: Indicates the type of the Warehouse Builder object. For example, warehouse module, table, dimension, mapping, or view.
Select: This is the column you check to indicate whether you want to restore the component.
Cascade Up: This option controls the restore when the parent of a component no longer exists in the repository. For example, you are restoring a table T1 originally located under MY_WH module under project MY_PROJECT. By checking Cascade Up, the system creates a dummy MY_PROJECT and MY_WH containing T1. If you do not check Cascade Up, the system will not be able to locate the parent folders for this table and the restore will fail.
Click Restore to restore the selected snapshot objects to the repository. Warehouse Builder warns you that all currently open editors will be closed after a successful restore. Click Yes to continue and complete the restore.
You can delete snapshots or components within a snapshot from the Metadata Change Management window.
To delete a snapshot:
Warehouse Builder displays a delete confirmation dialog.
Warehouse Builder displays the components of the snapshot on the right-side column.
Warehouse Builder displays a delete confirmation dialog.
This section explains snapshot usage concepts using OMB Plus. For instructions on the commands and arguments for creating and managing snapshots using OMB Plus, refer to the Oracle9i Warehouse Builder Scripting Reference.
History management includes creating, deleting, restoring, and altering snapshots.
Use the following syntax to create a snapshot:
OMBCREATE SNAPSHOT 'SNAPSHOTNAME' SET PROPERTIES (DESCRIPTION,SNAPSHOTTYPE) VALUES (Your description value, 'FULL')
ADD FIRST_CLASS_OBJECT_TYPE FULLY_QUALIFIED_FIRST_CLASS_OBJECT_NAME ...
Example:
OMBCREATE SNAPSHOT S1 SET PROPERTIES (DESCRIPTION, SNAPSHOTTYPE) VALUES ('Sample Snapshot', Y ,Y)
ADD TABLE 'MY_PROJECT/WH/EMP'
ADD TABLE 'MY_PROJECT/WH/DEPT'
ADD DIMENSION 'MY_PROJECT/WH/DIM1'
ADD MAPPING 'AnotherProject/WH1/MAP1'
Use the following syntax to delete a snapshot:
Example:
You can alter an existing snapshot directly, thus "altering history" as you need. You can also use the ALTER command to delete a non-root snapshot (for more information about root snapshots, see "Cascade and No Cascade Snapshots").
Use the following syntax to alter a snapshot:
OMBALTER SNAPSHOT 'SNAPSHOTNAME'
( SET PROPERTIES (SNAPSHOTTYPE) VALUES ('FULL'/'SIGNATURE')
)?
( ADD FIRST_CLASS_OBJECT_TYPE RELATIVE_FIRST_CLASS_OBJECT_NAME
| DELETE FIRST_CLASS_OBJECT_TYPE RELATIVE_FIRST_CLASS_OBJECT_NAME
| MODIFY FIRST_CLASS_OBJECT_TYPE RELATIVE_FIRST_CLASS_OBJECT_NAME
)+
Example:
OMBALTER SNAPSHOT S1
ADD TABLE 'MY_PROJECT/MOD1/T1'
ADD TABLE 'MY_PROJECT/MOD1/T2'
DELETE DIMENSION 'MY_PROJECT/WH/DIM1'
This command adds two tables and removes the existing dimension from the snapshot definition.
Restoring a snapshot means replacing the current definition of the object in the repository with the snapshot image of that object. When restoring from full, cascade snapshots of projects, collections, or folders, you can select which child objects you want to restore. You can restore the complete snapshot, or only a part of it by selecting specific child objects.
Use the following syntax to restore an entire snapshot:
Example:
This command restores all the objects in the snapshot. If any instances fail to restore, the whole operation fails with an error message. Failure to restore means that the aggregate parent of all the objects within the snapshot does not exist in the current repository.
Use the following syntax to restore select objects from a snapshot:
Example:
This command replaces the current repository metadata definition of table EMP and mapping MAP1 with the table and mapping defined in snapshot SS1.
Deleting an object that has snapshots does not delete the snapshots of that object. Deleting an object can therefore result in a snapshot being orphaned, or remaining in the repository without an object to which it belongs. If you try to restore an orphaned snapshot, Warehouse Builder produces an error message.
Use the following syntax to restore the missing parents of an orphaned snapshot:
Snapshots follow Warehouse Builder's transaction mechanism, so you will not have orphaned snapshots resulting from a rollback. If you create a new object and a snapshot of it without committing, and then rollback your changes, the object and snapshot are both deleted.
You can export and import full snapshots only, using the OMB Plus scripting interface and the Warehouse Builder user interface. Export and import full snapshots to move them between repositories or to use them for future upgrades. Exporting a full snapshot converts it into a Metadata Loader .mdl file. Importing a full snapshot converts an .mdl file into a snapshot and stores the snapshot in the tablespace allotted for snapshot storage in your repository.
Change management includes listing, retrieving information about, and comparing snapshots.
You can list all available snapshots for a given repository, or you can list any snapshots associated with a specific object in the repository.
Use the following syntax to list all snapshots for a repository:
Example:
This command returns a list of all snapshots for the repository in question.
Use the following syntax to list existing snapshots for a specific object:
Example:
This command lists the names of all snapshots that are associated with the current table EMP.
Use the following syntax to retrieve information about a snapshot:
OMBRETRIEVE SNAPSHOT 'SNAPSHOTNAME' GET
( PROPERTIES (TIMESTAMP|DESCRIPTION|SNAPSHOTTYPE)
| CONTENTS (ALL | MAPPINGS | TABLES |...)
( START WITH 'FIRST_CLASS_OBJECT_NAME')? (CASCADE | NO CASCADE)? ) )
Examples:
OMBRETRIEVE SNAPSHOT S1 GET PROPERTIES (DESCRIPTION)
This command returns the description for snapshot S1:
Sample Snapshot
OMBRETRIEVE SNAPSHOT S1 GET CONTENTS ALL
This command returns:
TABLE 'MY_PROJECT/WH/EMP'
TABLE 'MY_PROJECT/WH/DEPT'
DIMENSION 'MY_PROJECT/WH/DIM1'
MAPPING 'AnotherProject/WH1/MAP1'
OMBRETRIEVE SNAPSHOT S1 GET CONTENTS TABLES
This command returns:
TABLE 'MY_PROJECT/WH/EMP'
TABLE 'MY_PROJECT/WH/DEPT'
Using the OMB Plus utility, you can compare two snapshots to each other, or a snapshot to a current repository object. Warehouse Builder uses Universal Object Identifiers (UOIDs) as the basis of all comparisons.
When comparing two snapshots or a snapshot with an object, identify one as the source and one as the target. For instance, if you are comparing a snapshot to a current module object with the intention of restoring certain properties to the object, the snapshot is your source and the object is your target.
You can select from the following comparison report filters, to report on:
You can generate a comparison report when you compare two snapshots to each other, or a snapshot to a current repository object. A comparison report is generated in XML format, and identifies new, missing, and changed objects. You can generate snapshot comparison reports from the mcmview.bat command line utility, or from OMB Plus.
To generate snapshot comparison reports from OMB Plus, use the prepackaged XML schema defined for the generated XML. For more information, consult the Oracle9i Warehouse Builder Scripting Reference.
Use the following syntax to compare two snapshots in OMB Plus:
OMBCOMPARE SNAPSHOT 'SRC_SNAPSHOTNAME' WITH
( SNAPSHOT 'TGT_SNAPSHOTNAME' | CURRENT )
FOR FIRST_CLASS_OBJECT_TYPE 'RELATIVE_FIRST_CLASS_OBJECT_NAME'
SHOW (ALL | CREATED | DELETED | MODIFIED | UNMODIFIED) OUTPUT TO 'XMLFILENAME'
Examples:
OMBCOMPARE SNAPSHOT 'SS1' WITH SNAPSHOT 'SS2' FOR TABLE 'EMP' SHOW ONLY DELETED OUTPUT TO 'c:\diffresults\emp_diff.xml'
OMBCOMPARE SNAPSHOT 'SS1' WITH CURRENT FOR TABLE 'MY_PROJECT/WH/EMP' SHOW ONLY DELETED OUTPUT TO 'c:\diffresults\emp_diff.xml'
A command line utility, mcmview.bat, is packaged for the purpose of generating snapshot comparison reports as well. The command line utility prepares the XML for reading and printing the report in HTML format. The utility is located in the owb/bin/win32 directory and should be executed passing the OWB compare XML filename as a parameter.
For example, the command mcmview c:\temp\tables_021111.xml results in a file named tables_021111.xml.html in the win32 directory, and the suffix .html is added to the XML file name.
Used in conjunction with other Warehouse Builder features, such as the MDL Metadata Import utility and impact analysis, snapshots facilitate metadata management. Snapshots are also designed to meet the unique needs of different Warehouse Builder users.
Use snapshots in conjunction with MDL metadata import to determine the impact an import will have on the current metadata repository. Based on a repository snapshot comparison, select actions to perform metadata import at a finer grain of detail. You can use impact analysis prior to metadata import to determine the dependent objects that will be impacted by the changes you plan to accept during import. You can also use snapshots during deployment to identify the objects that need to be redeployed.
Metadata snapshots vary in granularity to account for the unique needs of different Warehouse Builder users. Warehouse designers can use snapshots to capture their individual components, such as their mappings, entities, and process flows, at various points in time, whereas data warehouse managers can use snapshots to detect or preserve the history of an entire warehouse module or project. Snapshot views are accessible through OMB Plus. For more information, see the Oracle9i Warehouse Builder Scripting Reference.
The Object to Snapshot view for designers enables data warehouse designers to take snapshots of their work.
The Snapshot to Object view for managers enables data warehouse managers to survey metadata history.
|
|
![]() Copyright © 2001, 2003 Oracle Corporation. All Rights Reserved. |
|