DROP LIBRARY
Use the DROP LIBRARY command to remove an existing user-defined shared library from a database. When you drop a shared library, the shared library object files are also removed from the user code object repository.
Synopsis
DROP LIBRARY library_nameInput
| Input | Description |
|---|---|
| library_name | Specifies the name of an existing user-defined shared library. For systems that support multiple schemas, you can specify a name in the format schema.library to drop a library in a different schema of the current database. You cannot drop a library in a different database. |
Outputs
The DROP LIBRARY command has the following outputs:
| Output | Description |
|---|---|
| DROP LIBRARY | The message that the system returns if the command is successful. |
| ERROR: RemoveLibrary: library libname does not exist | The message that the system returns if the specified shared library does not exist in the current database. |
| ERROR: Can't delete library mylib - name depends on it | The message that the system returns if you try to drop a user-defined shared library that is referenced by an existing UDX. The name value can be the name of another library or the signature of a UDF or UDA. |
Description
You cannot drop a user-defined shared library that is in use in an active query. After the active query transaction completes, the system processes the DROP LIBRARY command to drop the shared library. The shared library must be defined in the current database.
Privileges required
- You must have the Drop privilege on the LIBRARY object.
- You must have the Drop privilege on the specific shared library object.
- You must own the shared library.
- You must be the database admin user, own the current database, or own the current schema on systems that supports multiple schemas.
Common tasks
Use the DROP LIBRARY command to drop an existing shared library from a database.
Usage
- To drop a sample library mylib, enter:
MYDB.SCHEMA(MYUSER)=> DROP LIBRARY mylib;