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

Updating Excel Server Properties from content with Moss2007 and Office 2010 – Part 2

In first aticle i have told about how to update Excel Server Properties and integration of Moss 2007 for old Excel 97 and 2003 format. As explained before its not able to do that with new xlxs file formats without using some visual basic code.

Part 2 – Using VBA for Excel 2007 , 2010 format:

I have created a document library named TestExcel on my Sharepoint and select document file template for excel file. After do that i have created 3 column on list.

TotalCost as  Number 
Note: In my envoriment i create a column name is Total than i changed the column name as ”TotalCost” so keep in your mind. i will explain it later becuase when you change the column name on a document libarary actual name on db can not changes and this  causes very common misunderstanding. )
PaymentDate as  DateTime
Description as  Single Line of Text

So far so good Lets go to Document Library and create a new Excel Document form library by clicking New-> Document.

If everything is ok you will see familier Excel 2010 open your document. And notice that Document Properties panel is opened for you. If you are getting problem with to open Excel document by clicking Sharepoint Document Library ->New-> Document you have possible owssupp.dll registration problem.
see kb article for more information:
http://support.microsoft.com/kb/833714

!!!Dont forget to save this excel file as “Excel Macro-Enabled Workbook” for other users can able to use this file correctly.

I have created a sample excel content see bellowed screenshot. And notice that i have give cells names which i want to map with server properties .

!Important : Sharepoint uses  ISO8601 format (YYYY-MM-DDTHH:MM:SSZ) for saving dates so you should make changes on date format for sharepoint understanding.
i use for that another cell and formul like =TEXT(B3,”yyyy-mm-ddThh:mm:ssZ”)

Now we have to enable Developer Tab on office ribbon . For do that.

1)Click File Menu -> Options

And Check “Developer” check box. and click ok.

Select Developer Tab -> Click Visual Basic.

type  codes to VBA IDE

//This function is updates server properties.
Sub SynchServerPorperties()
Dim metaprop As MetaProperty
‘On Error Resume Next

For Each metaprop In ActiveWorkbook.ContentTypeProperties
If metaprop.Name = “TotalCost” Then
metaprop.Value = Cells(2, 2).Value
End If
If metaprop.Name = “PaymentDate” Then
metaprop.Value = Cells(3, 3).Value
End If
If metaprop.Name = “Description” Then
metaprop.Value = Cells(4, 2).Value
End If

Next

End Sub

‘We are updating Server Properties before save the file.
Private Sub workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
SynchServerPorperties
End Sub

*This code provide us when user save file , server properties would be updated.

Click “Save” on excel and test server properties updated.

Update xlms file to sharepoint.

When everytime you click “Save” If you are annoyed a “Privacy Warning” message like me you can get rid of it bellowed way.


Privacy warning : “This document contains macros, ActiveX controls, XML expansion pack information, or web components. These may include personal information that cannot be removed by the Document Inspector.

Click Developer Tab-> Macro Security

Select “Privacy Options” and remove check on “Remove personel information from file properties on save”

Upload “xlsm” File to Sharepoint and notice that metadata form filled automatically.

If everything is ok. you have to see bellowed screen 🙂

End of Article…
See you next time.

Updating Excel Server Properties from content with Moss2007 and Office 2010 – Part 1

Hi everyone,

After a good vacation now the time to new article has came. In this article we talk about how to set Sharepoint Document Library metadata from Excel Content.
The problem is that if you are using Excel 2007 or Excel 2010 and you create a document library on Sharepoint with extra metadata columns and open an excel doc template from this Document Library -> new Excel Document. You can able to see server properties show us the needed metadata. After we change Document Properties and map it from excel content (I mean any mapped excel cell has changed we want mapped  server properties should to be changed) and save the document. and notice that the server properties is not updated. This actually is not a problem this issue is one of by design. Only way to do it  coding some visiual basic for Excel 2007 and Excel 2010(.xlsx file format). But if you use old format of Excel 97 or Excel 2003 (xls) you can still able to use custom properties like as i mentioned.

First Solution – Using old format xls files.

I have created a document library named TestExcel on my Sharepoint and select document file template for excel file. After do that i have created 3 column on list.

TotalCost as  Number 
Note: In my envoriment i create a column name is Total than i changed the column name as “TotalCost” so keep in your mind. i will explain it later becuase when you change the column name on a document libarary actual name on db can not changes and this  causes very common misunderstanding. )
PaymentDate as  DateTime
Description as  Single Line of Text

So far so good Lets go to Document Library and create a new Excel Document form library by clicking New-> Document.

If everything is ok you will see familier Excel 2010 open your document. And notice that Document Properties panel is opened for you. If you are getting problem with to open Excel document by clicking Sharepoint Document Library ->New-> Document you have possible owssupp.dll registration problem.
see kb article for more information:
http://support.microsoft.com/kb/833714

After opened this document i save as this document as Excel 97-2003 workbook type .

I have created a sample excel content see bellowed screenshot. And notice that i have give cells names which i want to map with server properties .

!Important : Sharepoint uses  ISO8601 format (YYYY-MM-DDTHH:MM:SSZ) for saving dates so you should make changes on date format for sharepoint understanding.
i use for that another cell and formul like =TEXT(B3,”yyyy-mm-ddThh:mm:ssZ”)

Notice that Document properties can not updated when you changes the cells in content. For automatically updating this properties we should make some bindings. So click Document Properties box and select Advanced Properties.

Select “Custom” tab.And Select Properties of Total .
Check “Link to Content” link this activates Source Combobox.
In combobox select named cell.
Note: Notice that in properities you see a line “Total” this is the actual sharepoint column name not “TotalCost” . Because i changed the column name from sharepoint list before i create a new document. So column name has changed on diplay but actual column name still is Total

After all binding done correctly. You have to see Document Properties has changed and updated.

Save the Excel Document to your computer. Get back to sharepoint list and upload this excel document to library. While updating if you do it correctly , metadata fields should be filled automatically.

Click ok. and see All Document View show us document content data in view.

In next artcile we do it this via using some simple VBA script for Excel 2007-Excel 2010 formats.
See you now.

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

 

 

HTTP 500 – Internal server error page Sharepoint 2007

You can get more detailed error open debug functionality in web config

  • In the <system.web> tag, locate the <customErrors mode=”On”> tag and change it to <customErrors mode=”Off”> to see the ASP.NET exception when an error occurs instead of being redirected to the error page.
  • In the <SharePoint> tag, locate the <SafeMode MaxControls=”50″ CallStack=”false”/> tag and change it to <SafeMode MaxControls=”50″ CallStack=”true”/>. This causes the ASP.NET error message to display with stack trace information
  • In my case error caused by Language pack . You should check your server version and service packs also .

    See :

    https://blog.bugrapostaci.com/2010/10/21/sharepoint-2007-language-pack-service-pack-order/

    See you now.