Deletes an existing package library. Package libraries are used by supported external runtimes, such as R or Python.
library_name
Specifies the name of an existing package library.
Libraries are scoped to the user. Library names must be unique within the context of a specific user or owner.
owner_name
Specifies the name of the user or role that owns the external library.
Database owners can delete libraries created by other users.
To delete a library requires the privilege ALTER ANY EXTERNAL LIBRARY. By default, any database owner, or the owner of the object, can also delete an external library.
An informational message is returned if the statement was successful.
Unlike other DROP
statements in SQL Server, this statement supports specifying an optional authorization clause. This allows dbo or users in the db_owner role to drop a package library uploaded by a regular user in the database.
Add the custom R package, customPackage
, to a database:
CREATE EXTERNAL LIBRARY customPackage
FROM (CONTENT = 'C:\temp\customPackage_v1.1.zip')
WITH (LANGUAGE = 'R');
GO
Delete the customPackage
library.
CREATE EXTERNAL LIBRARY (Transact-SQL)
ALTER EXTERNAL LIBRARY (Transact-SQL)
sys.external_library_files
sys.external_libraries