DROP ARTIFACT REPOSITORY

Removes the specified artifact repository from the current or specified schema.

See also:

CREATE ARTIFACT REPOSITORY , ALTER ARTIFACT REPOSITORY , DESCRIBE ARTIFACT REPOSITORY , SHOW ARTIFACT REPOSITORIES

Syntax

DROP ARTIFACT REPOSITORY [ IF EXISTS ] <name>

Parameters

name

Specifies the identifier of the artifact repository to drop. If the identifier isn’t fully qualified, the command looks for the repository in the current schema for the session.

Access control requirements

Your role must have the following privileges on objects:

PrivilegeObject
OWNERSHIPArtifact repository that you remove

Operating on an object in a schema requires at least one privilege on the parent database and at least one privilege on the parent schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes

  • Dropping a repository deletes all packages and versions it contains.
  • You can’t drop a repository while an APPLICATION SERVICE is actively deployed from a package in that repository. Drop the service first, or upgrade it to a package in a different repository.
  • When the IF EXISTS clause is specified and the target object doesn’t exist, the command completes successfully without returning an error.

Examples

DROP ARTIFACT REPOSITORY IF EXISTS my_app_repo;