.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Policy Evaluation Mode On change: prevent and On Change: Log Only not available

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :Sql Server

Hi All,

I am creating a policy to ristict Developer to use definied naming convention for stored procedure , but i am not able to see Policy Evaluation Mode  On change: prevent and On Change: Log Only.

Please let me know what is the problem.

i have checked the sp_configure option nested triggers and server trigger recursion is enabled.


Mohd Sufian www.sqlship.wordpress.com Please mark the post as Answered if it helped.

View Complete Post

More Related Resource Links

Policy-Based Management and On Change - Prevent




I’m working on Policy-Based management feature and I’m keen to implement some of the features. I tried to setup a Policy for a “backup device” facet based on the condition that the name starts with bkd_. I tried to set the evaluation mode to “On Change – Prevent” but unfortunately I could not find the mode at all in the Policy Screen. I also made sure the “Nested Triggers” advanced Option is set to 1.


I went through this  link http://blogs.msdn.com/b/sqlpbm/archive/2009/04/13/policy-evaluation-modes.aspx and checked for the execution_mode in  msdb..sysp

On Change:Prevent Evaluation fails with error Could not load file or assembly 'Microsoft.SqlServer.


Hi All,

I am facing a strange issue with Policy Based Management. Exact problem is as below

SQL Setups


I have Lenovo laptop having 3 SQL instances installed on it.

SQL Server 2005 (x86) Developer Edition 9.00.4053  -- Named Instance : SQL2K5

SQL Server 2008 (x86) Developer Edition 10.0.1600.22 -- Named Instance : SQL2K8

SQL Server 2008 R2 (x86) Developer Edition 10.50.1600.1 -- Named Instance : SQL2K8R2


I configured SQL2K8R2 instance as a Centralized Server and registed SQL2K8 & SQL2K5 under this. I configured a new condition by using facet: MULTIPART NAME. As per this condition Table Should start with TEST_ in database TEST . Evaluation Mode set to              On Change: Prevent. Idea is if some one logs to database TEST and tries to create table with name other then starting with TEST_ then it should fail.

I Imported this policy on registered servers thru Centralized Management Server Action, as expected policy got configured on Registred SQL2K8 instance

How to test mode change in gridview

Hi, When i run the following code i get an error when gridview changes mode to Edit.  stating that you can't change string to decimal! To get around the occurance i want to disable code when in Edit mode or resolve another way?  GridView1_RowDataBoundFor Each row As GridViewRow In GridView1.Rows            Dim cell As TableCell = row.Cells(7)            Dim invoicetotal As Decimal = CDec(cell.Text)   Thanks

Compatibility Mode change whilst log shipping



I have a database in compatibility mode 80 being log shipped from one SQL Server 2005 instance to another.  I want to change the compatibility mode on the database to 90, but was wondering what, if any, affect this would have on log shipping?  The database vendors have already confirmed that the database/application is compliant.

Thanks, Andy

Bulk Change of Items with Exempt from Policy to Nonexemption Status


I have an announcements list that we use for alerts. This list has a working custom SPD workflow attached for emailing the posted alerts.

Recently, I setup and applied an information policy to the alert content type assigned to this list that takes the Expires date and runs a workflow that copies the expired items to another list (archive list) and then deletes the expired items from the active list. The policy works great for newly created items. However, for the already existing 300 list items the Information Policy and its workflow do not work. In the Exempt From Policy column, these items are marked as follows: "This item is exempt from policy. This item will not be expired until the exemption is removed. Remove Exemption..."   

I cannot make the change in Data View because the Exempt From Policy status is set by SharePoint. It cannot be updated except by opening each item and clicking Remove Exemption. My boss has assigned me with finding a bulk method to make the change.

I've tried to create a workflow in SPD (with extended workflows added) to change the Exempt From Policy column status to nonexempt. Unfortunately, I cannot find a way to make this happen even though I googled this issue

How are targeted versions affected in new Framework Support Lifecycle Policy Change starting April 2


Hopefully this is the right forum, I searched and wasn't really sure where to put this.

In about a month the Support Lifecycle changes for the .NET Framework as referenced here http://support.microsoft.com/gp/lifeandotnet

We are trying to determine if we need to upgrade our applications or not and have gotten quite confused.

We have a number of web applications that target the 2.0 framework.  We also have Framework 3.5 SP1 installed on our web server.  3.5 SP1 uses the same CLR version 2.0 as Framework 2.0.  Because we have 3.5 SP1 installed, does that mean our applications that target 2.0 will still be covered under the new support lifecycle? 

Would the same apply to a web application that targets 3.5 that references a class library DLL that targets 2.0?

Thank You.

How to Localize Windows Forms and Change the Language at Runtime

Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

Selected to change the background color of the page



As this site, http://www.borfin.com.tr/genel/Default.aspx, How can I change the background color selected pages.

Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

How to change the default page base class?


I've tried setting the <pages pageBaseType="DynamicWebPage" /> value in web.config, but when I response.write out the page type, I'm still getting Microsoft.WebPages.WebPage.

I'm simply trying to sub-class WebPage and add some additional functionality such as a dynamic PageData dictionary similar to Phil Haack's dynamic ViewData dictionary.



SqlDataSource how to change the stored procedures at run time



Is it possible to change the select, insert and update stored procedure of an SqlDataSource at run time. I don't mean to change the definition of the stored procedure, but I mean to change the assignment, i.e. To change the select stored procedure from "selectSP1" to "selectSP2" at run time. Is it possible?



Change Button Text in Multi Language Website


Hi i developing multi language website

using Master pages

everything fine

Page_Load i set the Text property of Button Control from Resource file

like this

Button1.Text = GetLocalResourceObject("Button1")

then in the button click event i cnage the text of the Button control

Button1.Text = GetLocalResourceObject("Button1_new")

but the text doesn't change and no error messgae

what is the problem how to solve this


How to change text in columns in SSRS?


I need to create a complex report and export it to Excel. 

In the first column header, text is displayed as "Hide Daily Columns", but I need the text to change as "Unhide Daily columns" when I click on it and when the text changes the columns under "daily" header (I have 3 columns under this header) present in the report shud be hidden and only weekly columns shud be visible. Any ideas please. I am new to SSRS and tried out many ways but didn't get it.

dynamically change column names in Crystal reports


I need to develop 3 pages.

On the first page user defines atmost 7 column names to be displayed on the report. I'm saving these names in a Sql DB table 'Columns' with Column_Nm and Column_ID as Table columns.

On the second page I'm retrieving column_Nm from the table and displaying them on the page so that the user enters the data. This data is saved in another table 'Summary' with the Columns column1 through column7.

on the 3rd page I need to show a report of 'Summary' table.

How do I dynamically replace column1 through column7 names with that of 'Column_Nm' on the report?

Any help/suggestions would be appreciated.


change to lambda in linq


Hello my friends I tried to change this code to lambda but I could not pleaaaase help me:


  var inforeport = from m in db.Products where m.UnitPrice > info select new { unit=m.UnitPrice,name= m.ProductName };


change the code vb to c#


Namaste to everyone.

I need help in converting VB Code to C# Code. The code is:-

            dim thisPage as System.Web.UI.Page
            dim nameTextBox as TextBox
    thisPage = CType(Context.Handler, System.Web.UI.Page)
    nameTextBox =  CType(thisPage.FindControl("txtName"), System.Web.UI.Control)

    lblName.Text = "Your name is '" & nameTextBox.Text & "'."


Sustainable Computing: Imagine Cup 2008: Competing for Change


For the 2008 Imagine Cup, students have been challenged to use technology to enable a sustainable environment. Finalists in the U.S. competition recently presented their solutions in Los Angeles, and MSDN Magazine was there to see the innovative ideas participants have come up with.

Mitch Irsfeld

MSDN Magazine April 2008

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend