exam questions

Exam 70-462 All Questions

View all questions & answers for the 70-462 exam

Exam 70-462 topic 1 question 32 discussion

Actual exam question from Microsoft's 70-462
Question #: 32
Topic #: 1
[All 70-462 Questions]

DRAG DROP -
You administer a Microsoft SQL Server 2012 server that has multiple databases.
You need to ensure that users are unable to create stored procedures that begin with sp_.
Which three actions should you perform in sequence? (To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.)
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Step 1: Create a Condition named StoredProcNamingConvention by using the Stored Procedure facet that has a single expression. Set the Field to @Name,
Operator to NOT LIKE, and Value to 'sp[_]%'.
Step 2: Create a Policy named StoredProcNamingPolicy Set the Check condition to StoredProcNamingConvention and Evaluation Mode to On Change: Prevent
Step 3: Enable StoredProcNamingPolicy
Policies are created and managed by using Management Studio. The process includes the following steps:
1. Select a Policy-Based Management facet that contains the properties to be configured.
2. Define a condition that specifies the state of a management facet.
3. Define a policy that contains the condition, additional conditions that filter the target sets, and the evaluation mode.
4. Check whether an instance of SQL Server is in compliance with the policy.

Evaluation modes -
There are four evaluation modes, three of which can be automated:
✑ On demand. This mode evaluates the policy when directly specified by the user.
✑ On change: prevent. This automated mode uses DDL triggers to prevent policy violations.
Important:
If the nested triggers server configuration option is disabled, On change: prevent will not work correctly. Policy-Based Management relies on DDL triggers to detect and roll back DDL operations that do not comply with policies that use this evaluation mode. Removing the Policy-Based Management DDL triggers or disabling nest triggers, will cause this evaluation mode to fail or perform unexpectedly.
✑ On change: log only. This automated mode uses event notification to evaluate a policy when a relevant change is made.
✑ On schedule. This automated mode uses a SQL Server Agent job to periodically evaluate a policy.
Reference:
http://msdn.microsoft.com/en-us/library/bb510667.aspx

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
XactAbort
5 years, 9 months ago
Lots of discussions online whether the operator should be 'LIKE' or 'NOT LIKE'. The correct answer is 'NOT LIKE'. I tested using 'NOT LIKE' and SQL Server prevented me from creating a stored procedure with a name starting with 'sp_'. Here are the steps using SSMS: https://stackoverflow.com/questions/7581811/how-to-avoid-users-adding-a-user-stored-procedure-name-like-sp/19821378#19821378
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...