How to enable verbose log mode on Sharepoint 2010

First Method: Using Central Administration

1) Open your Central Administration
2) Click Monitoring and Click “Configure Diagnostic Logging”

3) Select “All Categories” and
Select “Verbose” for “Least critical event to report to the event log”
Select “Verbose” for “Least critical event to report to the trace log”

4) Click Ok.

Important!:Please don’t forget change mode to default after collecting needed verbose mode logging. Because in verbose mode log files grows rapidly and if you are not enough storage your sharepoint server would be crashed.

Important!:Before enabling verbose mode ensure you have enough hdd space on ALL your servers. Because this is a farm configuration and all servers has been affected by this change.

For more information about levels :
http://technet.microsoft.com/en-us/library/ee748656.aspx

Second Method: Using PowerShell

  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. On the Start menu, click All Programs.
  3. Click Microsoft SharePoint 2010 Products.
  4. Click SharePoint 2010 Management Shell.
  5. At the Windows PowerShell command prompt (that is, PS C:\>), type the following command, and then press ENTER:Set-SPLogLevel -TraceSeverity {None | Unexpected | Monitorable | Medium | High | Verbose} -EventSeverity {None | Information | Warning | Error | Critical | Verbose} [-Identity <Category name…>]  -VerboseYou can use the Identity parameter to specify one or more categories to change — for example, Administration. If you do not specify the value for the Identityparameter, all categories are changed.To view the current settings, type Get-SPLogLevel, and then press ENTER.To set all categories back to default levels, type Clear-SPLogLevel, and then press ENTER.

For Example set all logs to verbose use fallowing command:
Set-SPLogLevel  -TraceSeverity Verbose -EventSeverty Verbose

You can find Sharepoint logs in folder: (Default folder)
Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extentions\14\LOGS
NOTE: If you need to transfer these files to Microsoft File Services , please compress files in zip file. If zip file size is bigger than  5GB please spearate multiple files that lower than 5GB.

Please read Logging Best Practices from MSDN

The SharePoint Server 2010 environment might require configuration of the diagnostic loggings settings after initial deployment or upgrade and possibly throughout the system’s life cycle. The guidelines in the following list can help you form best practices for the specific environment.

  • Change the drive that logging writes to. By default, diagnostic logging is configured to write logs to the same drive and partition that SharePoint Server 2010 was installed on. Because diagnostic logging can use lots of drive space and writing to the logs can affect drive performance, you should configure logging to write to a drive that is different from the drive on whichSharePoint Server 2010 was installed. You should also consider the connection speed to the drive that logs are written to. If verbose-level logging is configured, lots of log data is recorded. Therefore, a slow connection might result in poor log performance.
  • Restrict log disk space usage. By default, the amount of disk space that diagnostic logging can use is not limited. Therefore, limit the disk space that logging uses to make sure that the disk does not fill up, especially if you configure logging to write verbose-level events. When the disk restriction is used up, the oldest logs are removed and new logging data information is recorded.
  • Use the Verbose setting sparingly. You can configure diagnostic logging to record verbose-level events. This means that the system will log every action that SharePoint Server 2010 takes. Verbose-level logging can quickly use drive space and affect drive and server performance. You can use verbose-level logging to record a greater level of detail when you are making critical changes and then re-configure logging to record only higher-level events after you make the change.
  • Regularly back up logs. The diagnostic logs contain important data. Therefore, back them up regularly to make sure that this data is preserved. When you restrict log drive space usage, or if you keep logs for only a few days, log files are automatically deleted, starting with the oldest files first, when the threshold is met.
  • Enable event log flooding protection. Enabling this setting configures the system to detect repeating events in the Windows event log. When the same event is logged repeatedly, the repeating events are detected and suppressed until conditions return to a typical state.

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.

How to enable verbose log mode on Moss 2007

First Method: Using Central Administration

1) Open your Central Administration web page and Click “Operations”
2) Click Diagnostic Logging link

3) For enabling verbose mode for all categories:
Select and set “Select a Category” combobox value to “All
Select and set “Least critical event to report to the event log” combobox value to “Warning
Select and set “Least critical event to report to the trace log” combobox value to “Verbose

4) Click OK.Its done.
Important!:Please don’t forget change mode to default after collecting needed verbose mode logging. Because in verbose mode log files grows rapidly and if you are not enough storage your sharepoint server would be crashed

Important!:Before enabling verbose mode ensure you have enough hdd space on ALL your servers. Because this is a farm configuration and all servers has been affected by this change.

For restoring default values.
Select and set “Select a Category” combobox value to “All
Select and set “Least critical event to report to the event log” combobox value to “Error
Select and set “Least critical event to report to the trace log” combobox value to “Medium
and click OK button.


Second Method: Using stsadm command

1) Open a command prompt
2) Redirect to path drive:\Program Files\Common Files\Microsoft Shared\Web Server Extentions\12\Bin
3) Be sure that you have enough hardisk space for collecting verbose mode logging.
4) Run stsadm command:

Syntax
stsadm.exe -o setlogginglevel
[-category < [CategoryName | Manager:CategoryName [;…]] >]
{-default |
-tracelevel < trace level setting>
[-windowslogginglevel] <Windows event log level setting>}

For set all categories to verbose use this command:
exp:
stsadm -o setlogginglevel  -tracelevel verbose -windowslogginglevel warning

For set all logs level to default use this command:
exp:
stsadm -o setlogginglevel -default

Important!:Please don’t forget change mode to default after collecting needed verbose mode logging. Because in verbose mode log files grows rapidly and if you are not enough storage your sharepoint server would be crashed.

If you want to learn current logging level run bellowed command:
Exp:
stsadm.exe -o listlogginglevels

for more information.
http://technet.microsoft.com/en-us/library/cc261740(office.12).aspx

You can find Sharepoint logs in folder: (Default folder)
Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extentions\12\LOGS
NOTE: If you need to transfer these files to Microsoft File Services , please compress files in zip file. If zip file size is bigger than  5GB please spearate multiple files that lower than 5GB.

Hhave nice day …

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.

Sharepoint August 2011 CU released

Sharepoint August CU released
http://blogs.technet.com/b/stefan_gossner/archive/2010/09/02/august-2010-cumulative-update-for-sharepoint-has-been-released.aspx
http://blogs.msdn.com/b/joerg_sinemus/archive/2011/09/07/sharepoint-2010-and-august-2011-cu.aspx