Which action should you take?

You are a database administrator on an instance of SQL Server 2008. The development team has recently created some user-defined functions in .NET that you would like to access from SQL Server.
One of the functions, named GetSample, accepts a single input parameter and returns a result set containing a random sampling of data from several tables in your current database. Users need to be able to issue queries that use the generated sample.
You successfully execute the following Transact-SQL statements:
CREATE ASSEMBLY CLRAssembly FROM ‘C:CLRTest.dll’ WITH PERMISSION_SET = SAFE;
GO
CREATE FUNCTION MyFunction (@parm int)
RETURNS varchar
AS EXTERNAL NAME AssemblyName.NamespaceName.ClassName.GetSample;
When you attempt to access the function, an error is returned.
Which action should you take?
A. Re-register the assembly with the EXTERNAL_ACCESS permission set and re-create the function as an inline table-valued function.
B. Remove the EXTERNAL NAME clause from the CREATE FUNCTION statement and drop and re-create the function.
C. Drop the function and re-create it to return a table.
D. Re-create the desired functionality using a Transact-SQL stored procedure.

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.