DRAG DROP
You plan to create a custom aggregation function named Median.
You plan to deploy Median to a SQL Server 2014 server named Server1.
You need to ensure that Median can access a web service named WebApp1. The solution
must minimize the number of changes made to the database.
You create a Microsoft .NET Framework class that contains the definition of Median.
You upload a certificate to Server1.
What three tasks should you perform next?
To answer, move the appropriate actions from the list of actions to the answer area and
arrange them in the correct order.
Answer: See the explanation
Explanation:
Box 1: Execute the CREATE ASSEMBLY statement.
Box 2: Use the certificate to add a digital signature to the assembly.
Box 3: Execute the CREATE AGGREGATE statement.Note:
* CREATE AGGREGATE
Creates a user-defined aggregate function whose implementation is defined in a class of an
assembly in the .NET Framework. For the Database Engine to bind the aggregate function
to its implementation, the .NET Framework assembly that contains the implementation must
first be uploaded into an instance of SQL Server by using a CREATE ASSEMBLY
statement.
Box 1: Execute the CREATE ASSEMBLY statement.
Box 2: Use the certificate to add a digital signature to the assembly.
Box 3: Execute the CREATE AGGREGATE statement.
https://msdn.microsoft.com/en-us/library/ms345106.aspx
To create an EXTERNAL_ACCESS or UNSAFE assembly in SQL Server, one of the following two conditions must be met:
– The assembly is strong name signed or Authenticode signed with a certificate. This strong name (or certificate) is created inside SQL Server as an asymmetric key (or certificate), and has a corresponding login with EXTERNAL ACCESS ASSEMBLY permission (for external access assemblies) or UNSAFE ASSEMBLY permission (for unsafe assemblies).
– The database owner (DBO) has EXTERNAL ACCESS ASSEMBLY (for EXTERNAL ACCESS assemblies) or UNSAFE ASSEMBLY (for UNSAFE assemblies) permission, and the database has the TRUSTWORTHY Database Property set to ON.