Which version of SharePoint supports Microsoft SQL Server 2012

Only SharePoint 2010 SP1 (14.0.6029) and higher versions supports Microsoft SQL Server 2012 . Currently for MOSS2007 or WSS3.0 is not supported.
http://support.microsoft.com/kb/2460045

Recursive Triggers on SQL Server and User Profile Service Problem

Recently Microsoft has published a “FAST PUBLISH” article about User Profile Application service starting problem with FIM Syncronization service.In KB defined problem is caused by The ‘Recursive Triggers Enabled’ property for the Model database is set to ‘True’ in the SQL instance. And the error is in your application log

The server encountered an unexpected error and stopped.
“ERR: MMS(6016): sql.cpp(5580): Query (update [mms_run_history] set [is_run_complete] = 1,[run_result] = N’stopped-server’,[end_date] = <Date & Time> where ([is_run_complete] = 0)) performed with error
ERR: MMS(6016): sql.cpp(5633): Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).
….

What is a Recursive Triggers ?
A requirsive trigger is a trigger that fired by the other triggers or intreacting object that fire the trigger when executed recursively.

SQL Server also allows for recursive invocation of triggers when the RECURSIVE_TRIGGERS setting is enabled using ALTER DATABASE.

Recursive triggers enable the following types of recursion to occur:

  • Indirect recursion
    With indirect recursion, an application updates table T1. This fires trigger TR1, updating table T2. In this scenario, trigger T2 then fires and updates table T1.
  • Direct recursion
    With direct recursion, the application updates table T1. This fires trigger TR1, updating table T1. Because table T1 was updated, trigger TR1 fires again, and so on.

The following example uses both indirect and direct trigger recursion Assume that two update triggers, TR1 and TR2, are defined on table T1. Trigger TR1 updates table T1 recursively. An UPDATE statement executes each TR1 and TR2 one time. Additionally, the execution of TR1 triggers the execution of TR1 (recursively) and TR2. The inserted and deleted tables for a specific trigger contain rows that correspond only to the UPDATE statement that invoked the trigger.

Note:The previous behavior occurs only if the RECURSIVE_TRIGGERS setting is enabled by using ALTER DATABASE. There is no defined order in which multiple triggers defined for a specific event are executed. Each trigger should be self-contained.

Disabling the RECURSIVE_TRIGGERS setting only prevents direct recursions. To disable indirect recursion also, set the nested triggers server option to 0 by using sp_configure.

If any one of the triggers performs a ROLLBACK TRANSACTION, regardless of the nesting level, no more triggers are executed.

How to change “Recursive Triggers Enabled” property to false ?

From the SQL Server Management Studio, expand ‘System Databases’ > Right-click ‘Model’ | Properties | Options | under Miscellaneous section, set ‘Recursive Triggers Enabled’ property to ‘False’.

or.

The recursive trigger setting works on a database level . For checking the status of the recursive setting, use this command:

 EXEC sp_dboption '<name of db>', 'recursive triggers' -

for enabling Recusive Triggers:

 EXEC sp_dboption '<name of db>', 'recursive triggers', 'true' 

for disabling Recursive Triggers:

 EXEC sp_dboption '<name of db>', 'recursive triggers', 'false' 

For our senario use like this:

EXEC sp_dboption 'Model', 'recursive triggers', 'false' 

Resources:
http://msdn.microsoft.com/en-us/library/ms189799.aspx
http://support.microsoft.com/kb/2579951

 

 

Can not Enable RBS because of SQL server collation for Sharepoint 2010

Note: This is article contains possibility of one reason for this error.You can able to get this error other unrelated situations.)

When you try to enable after complete installation of RBS in sharepoint powershell console you getting belowed error:

Exception calling “Enable” with “0” argument(s): “Must declare the scalar variable “@RBsId”.”
At line:1 char:13

First you think like me should i missing a parameter ? Answer NO! You are not! this fuction is parameterless.But whats happing ? I reflect the dlls and find out SPContentDatabase.RemoteBlobSettings.Enable() function call stored procedure of “dbo.proc_EnableRbs” in selected content database.And this stored procedure using @RBsId as internal parameter.

Can not enable RBS Error

Can not enable RBS Error

After working one day and countless install/uninstall attempt finally we found the problem is SQL Server Collation set “TURKISH_CI_AS” .And sharepoint 2010 has limitation with SQL collation .

You get more information form here:
http://support.microsoft.com/kb/2008668

Changing the server collation to Latin1_General_CI_AS_KS_WS fixes the issue .

In this moment you have two option as hardway you can try to rebuild master tables with correct collation and alter all content databases or as easy way you can reinstall SQL Server  with corrent collation.