PrepAway - Latest Free Exam Questions & Answers

You have a database that stores information for a shipping company. You create a…

You have a database that stores information for a shipping company. You create a table named Customers by running the following Transact-SQL statement. (Line numbers are included for reference only.)



The salesPerson column stores the username of the salesperson. You must create a security policy that ensures that salespeople can vie

w data only for the customers that are assigned to them.

You need to create the function that will be used as the filter predicate for the security policy. You write the following Transact-SQL:



Which Transact-SQL segment should you insert at line 02?

PrepAway - Latest Free Exam Questions & Answers

A.


B.


C.


D.


Explanation:

The inline table-valued function required for a Stretch Database filter predicate looks like the following example.

The parameters for the function have to be identifiers for columns from the table.

Schema binding is required to prevent columns that are used by the filter function from being dropped or altered.

Example:

CREATE FUNCTION dbo.fn_stretchpredicate(@column1 datatype1, @column2 datatype2 [, …n])

RETURNS TABLE

WITH SCHEMABINDING

AS

RETURN SELECT 1 AS is_eligible

WHERE

References: https://docs.microsoft.com/en-us/sql/sql-server/stretch-database/select-rows-to-migrate-by-using-a-filter-function-stretch-database?view=sql-server-2017


Leave a Reply