Cloning a Partition Configuring an Application to Use a Different MDS Repository or Partition

14-22 Oracle Fusion Middleware Administrators Guide ■ When you have transferred metadata from one partition to another and configured the application to use the new partition. ■ When you have cloned a partition and configured the application to use the new partition. Note that deleting a partition deletes all the data contained in the partition. You can delete a metadata partition using WLST or Fusion Middleware Control, as described in the following topics: ■ Deleting a Metadata Partition Using Fusion Middleware Control ■ Deleting a Metadata Partition Using WLST

14.3.10.1 Deleting a Metadata Partition Using Fusion Middleware Control

To delete a metadata partition from a repository partition using Fusion Middleware Control: 1. From the navigation pane, expand the farm and then expand Metadata Repositories. 2. Select the repository. The repository home page is displayed. 3. In the Repository Partitions section, select the partition and click Delete. 4. In the confirmation dialog box, click OK.

14.3.10.2 Deleting a Metadata Partition Using WLST

To delete a metadata partition from a repository, you can use the WLST command deleteMetadataPartition. For example, to delete the metadata partition from the file-based repository mds-repos1, use the following command: deleteMetadataPartitionrepository=mds-repos1, partition=partition1

14.3.11 Purging Metadata Version History

For database-based MDS Repositories, you can purge the metadata version history from a partition. File-based MDS Repositories do not maintain version history. This operation purges version history of unlabeled documents from the applications repository partition. The tip version the latest version is not purged, even if it is unlabeled. To purge metadata labels, you use the purgeMetadataLabels command, as described in Section 14.3.12.4 . Then, you can purge the metadata version history. Consider purging metadata version history on a regular basis as part of MDS Repository maintenance, when you suspect that the database is running out of space or performance is becoming slower. This operation may be performance intensive, so plan to do it in a maintenance window or when the system is not busy. For specific recommendations for particular types of applications, see the documentation for a particular component. You can purge metadata version history using WLST or Fusion Middleware Control, as described in the following topics: ■ Purging Metadata Version History Using Fusion Middleware Control ■ Purging Metadata Version History Using WLST Managing the Metadata Repository 14-23 ■ Enabling Auto-Purge

14.3.11.1 Purging Metadata Version History Using Fusion Middleware Control

To use Fusion Middleware Control to purge the metadata version history: 1. From the navigation pane, expand the farm, expand Application Deployments, then select the application. 2. From the Application Deployment menu, choose MDS Configuration. The MDS Configuration page is displayed. 3. In the Purge section, in the Purge all unlabeled past versions older than field, enter a number and select the unit of time. For example, enter 3 and select months. 4. Click Purge. 5. In the Confirmation dialog box, click Close.

14.3.11.2 Purging Metadata Version History Using WLST

To use WLST to purge metadata version history, use the purgeMetadata command. You specify the documents to be purged by using the olderThan parameter, specifying the number of seconds. The following example purges all documents older than 100 seconds: purgeMetadataapplication=sampleApp, server=server1, olderThan=100

14.3.11.3 Enabling Auto-Purge

You can enable automatic purging using the MDSAppConfig MBean: 1. In Fusion Middleware Control, from the navigation pane, navigate to the domain and select it. From the WebLogic Domain menu, choose System MBean Browser. The System MBean Browser page is displayed. 2. Expand Application Defined MBeans, then oracle.adf.share.config, then Server: name , then Application: name, then ADFConfig, then ADFConfig, and ADFConfig. 3. Select MDSAppConfig. The Application Defined MBeans page is displayed. 4. For AutoPurgeTimeToLive, enter a value, in seconds.

14.3.12 Managing Metadata Labels in the MDS Repository

A metadata label is a means of selecting a particular version of each object from a metadata repository partition. Conceptually, it is a collection of document versions, one version per document, representing a horizontal stripe through the various document versions. This stripe comprises the document versions which were the tip versions latest versions at the time the label was created. You can use a label to view the metadata as it was at the point in time when the label was created. You can use the WLST commands to support logical backup and recovery of an applications metadata contained in the partition. Labels are supported only in database-based repositories. Document versions belonging to a label are not deleted by automatic purging, unless the label is explicitly deleted. In this way, creating a label guarantees that a view of the 14-24 Oracle Fusion Middleware Administrators Guide metadata as it was at the time the label was created remains available until the label is deleted. When an application that contains a MAR is deployed, a label with the prefix postDeployLabel_ is created. For example: postDeployLabel_mdsappdb_ mdsappdb.mar_2556916398. Each time you patch the MAR, a new deployment label is created, but the previous deployment label is not deleted Similarly, when you undeploy an application that contains a MAR, the application is undeployed, but the label remains in the metadata repository partition. If you delete a deployment label, when the application is restarted, the MAR is automatically redeployed, and the deployment label is also recreated. The following topics describe how to manage labels: ■ Creating Metadata Labels ■ Listing Metadata Labels ■ Promoting Metadata Labels ■ Purging Metadata Labels ■ Deleting Metadata Labels

14.3.12.1 Creating Metadata Labels

To create a label for a particular version of objects in a partition in an MDS Repository, you use the WLST command createMetadataLabel. For example, to create a label named prod1 for the application my_mds_app, use the following command: createMetadataLabelapplication=my_mds_app, server=server1, name=prod1 Executing operation: createMetadataLabel. Created metadata label prod1. If the application has more than one version, you must use the applicationVersion parameter to specify the version.

14.3.12.2 Listing Metadata Labels

You can list the metadata labels for a particular application. To do so, use the WLST command listMetadataLabel. For example, to list the labels for the application my_mds_app, use the following command: listMetadataLabelsapplication=my_mds_app, server=server1 Executing operation: listMetadataLabels. Database Repository partition contains the following labels: prod1 prod2 postDeployLabel_mdsappdb_mdsappdb.mar_2556916398 If the application has more than one version, you must use the applicationVersion parameter to specify the version.

14.3.12.3 Promoting Metadata Labels

You can promote documents associated with a metadata label so that they become the latest version. That is, you can promote them to the tip. Promote a label if you want to roll back to an earlier version of all of the documents captured by the label.