Deleting a Repository

Note: You must have administrative user status on the SAS Metadata Server to unregister, clear, or delete a repository. For more information about administrative user status, see the SAS Intelligence Platform: Security Administration Guide.
The DeleteMetadata method call for deleting a repository is similar to a DeleteMetadata method call for deleting an application metadata, with two exceptions. To delete a repository, specify the following:
  • The REPOS namespace.
  • One of several flags that indicate whether you want to delete the whole repository, simply clear the repository's contents, or you only want to unregister the repository.
Keep in mind the following things when using the REPOS namespace flags:
  • You should not unregister or delete the foundation repository if you have other repositories defined.
  • You should not combine REPOS namespace flags in a request.
  • Do not attempt to clear the objects from a project repository or delete a project repository using the DeleteMetadata method. Use SAS Data Integration Studio or SAS Management Console to clear or delete project repositories. These products contain extra code to handle locks on objects in non-project repositories that are related to objects in project repositories.
A repository is unregistered by executing the DeleteMetadata method with the OMI_TRUSTED_CLIENT (2097152) flag on a repository object in the REPOS namespace.
Set the OMI_REINIT and the OMI_TRUSTED_CLIENT flags to clear a repository if you want to repopulate it completely with different metadata.
Set the OMI_DELETE (32) and the OMI_TRUSTED_CLIENT flags to delete a repository. OMI_DELETE deletes the contents of a repository and removes the whole registration from the SAS Repository Manager.