Skip to content

Latest commit

 

History

History
76 lines (56 loc) · 3.3 KB

sys-sp-add-trusted-assembly-transact-sql.md

File metadata and controls

76 lines (56 loc) · 3.3 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs monikerRange
sys.sp_add_trusted_assembly (Transact-SQL)
Adds an assembly to the list of trusted assemblies for the server.
VanMSFT
vanto
randolphwest
03/07/2025
sql
system-objects
reference
sp_add_trusted_assembly_TSQL
sp_add_trusted_assembly
sys.sp_add_trusted_assembly_TSQL
sys.sp_add_trusted_assembly
sys.sp_add_trusted_assembly
TSQL
>=sql-server-2017 || >=sql-server-linux-2017 || =azuresqldb-mi-current

sys.sp_add_trusted_assembly (Transact-SQL)

[!INCLUDE sqlserver2017-asdbmi]

Adds an assembly to the list of trusted assemblies for the server.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_add_trusted_assembly
    [ @hash = ] 'value'
    [ , [ @description = ] 'description' ]
[ ; ]

Remarks

This procedure adds an assembly to sys.trusted_assemblies.

Arguments

[!INCLUDE extended-stored-procedures]

[ @hash = ] 'value'

The SHA2_512 hash value of the assembly to add to the list of trusted assemblies for the server. Trusted assemblies might load when Server configuration: clr strict security is enabled, even if the assembly is unsigned or the database isn't marked as trustworthy.

[ @description = ] 'description'

Optional user-defined description of the assembly. Microsoft recommends using the canonical name that encodes the simple name, version number, culture, public key, and architecture of the assembly to trust. This value uniquely identifies the assembly on the common language runtime (CLR) side and is the same as the clr_name value in sys.assemblies.

Permissions

Requires membership in the sysadmin fixed server role or CONTROL SERVER permission.

Examples

The following example adds an assembly named pointudt to the list of trusted assemblies for the server. These values are available from sys.assemblies.

EXEC sp_add_trusted_assembly
    0x8893AD6D78D14EE43DF482E2EAD44123E3A0B684A8873C3F7BF3B5E8D8F09503F3E62370CE742BBC96FE3394477214B84C7C1B0F7A04DCC788FA99C2C09DFCCC,
    N'pointudt, version=0.0.0.0, culture=neutral, publickeytoken=null, processorarchitecture=msil';

Related content