- PowerShell Must Haves !!!
-
Following is the list of MUST HAVEs if you are developing scripts using PowerShell,-
PowerGUI tool - an extensible graphical administrative console and IDE for managing systems based on Windows PowerShell.
Mastering PowerShell eBook - Comprehensive guide on PowerShell.
- Powershell Rocks !!
-
Recently I was exposed to Powershell for developing scripts to automate deployment steps for SharePoint. I have become a great fan of powershell since then. Once the scripts were ready, the deployment procedure looked awesome. Few hits to the command prompt and you are done. Powershell can do everything for you. Powershell Rocks!!
Don't forget to download the free tool Powershell Analyser and improve your productivity. Happy Scripting...
- Tip: The untold story of Audit Logs in SharePoint
-
Auditing events is an important feature of SharePoint. Read this article to understand more around the list of events that can be audited when audit logging is enabled. Audit settings can be configured at the site collection level only. The logs are maintained in the dbo.AuditData table of the respective content database.
However, what is interesting to know is that these logs can bloaten the content database significantly especially for internet based WCM sites. If "Opening or downloading documents, viewing items in lists, or viewing item properties" audit setting has been turned on, then for every hit to a page more than 100 entries could be recorded in the dbo.AuditData table. This figure would typically depend on the count of images, stylesheets, UI elements that fetch data from lists, etc that are available on the page.
Some statistics around this!
The dbo.AuditData table can grow at a rate > 64 KB (approx) per page hit.
Assuming that we have 10,000 hits to the site(/page) in a day, the growth in size would be 10000 * 64 KB ~ 645 MB/day.
This means that even if we do not add any content to the site, the content database will still grow by 15 GB (approx) per month. This is quite a large growth and would impose manageability issues especially if there are constraints around database storage infrastructure.
Organizations planning to enable auditing for their internet facing sites should consider these statistics and come up with archival policies for audit logs.
Post Infrastructure Update release of MOSS, the TrimAuditLog STSADM command is available for farm administrators to truncate the audit logs. This command may be executed periodically to delete old entries from the audit logs.The content database should be shrunk (using DBCC SHRINKDATABASE command) post execution of this command to release the freed up space.
- Interesting Read: SharePoint "Farm Communications"
-
A SharePoint farm is an extremely "chatty" environment. A lot of inter server communications keeps on happening all the time. I had been looking for a consolidated list of such things, when I came across this blog of the MCS (U.K) SharePoint Team. This blog talks about how the various servers in a SharePoint Farm communicate with each other, what ports, protocols and proxies are involved. A must read for all budding SharePoint solution architects!
- Tip: Avoid "bloating" of log files for large content databases during a MOSS upgrade
-
While upgrading a SharePoint farm to the December Cumulative update, there was an unprecendented growth of the databse log file for a large content database (size ~200GB) during the upgrade process. The database upgrade was failing as there was no space in the log file partition. Also, the log file could not be truncated to free up the space.
This was overcome by changing the Database Recovery model from Full to Simple. Under Full Recovery Model, log files are not truncated untill a log backup has been completed. With Simple recovery model this problem can be avoided as transactions are flushed out automatically till the last committed point.
Product team recommends that the recovery model for content databases should be set to full. However, during upgrades, it might be a good idea to change it to simple and revert that back to full once the upgrade completes.
- Just Released: 10 Best Practices For Building SharePoint Solutions
-
The March 09 issue of MSDN magazine contains a very interesting article on "SharePoint: 10 Best Practices For Building SharePoint Solutions". This is a must read for all SharePoint developers. It contains a summary of key practices that should be followed for building solutions on SharePoint.
- System.Exception: Server could not create <classname>
-
Recently I was working on ControlAdapters and came across a strange error,-
System.Exception: Server could not create <classname>
Upon subequent research I figured out that this error will occur when the class is inaccessible. You need explicitly specify the public access modifier while declaring the class.
- How To: Delete corruption/orphaned records from the content databases
-
Orphaned records can cause a lot of trouble. The content databses should be inspected on a periodic basis to check for orphaned records.
The following STSADM command may be used to check for corruption,-
stsadm -o databaserepair -url {http://servername} -databasename {DBname}
The results of the above operation will display the list of all orphaned records. The same command may be executed with an addtional parameter to delete the orphaned records,-
stsadm -o databaserepair -url {http://servername} -databasename {DBname} -deletecorruption
Note:-
Sometimes the Configuration DB can contain orphaned records especially for the list of sites associated with a content DB. A simple detach and attach of the Content DB (using the deletecontentDB/addcontentDB STSADM commands) will help in deleting those orphaned records as well.
Update!!
Just came across another interesting blog,- SharePoint Orphans Explained
- Just released - Best practices for MOSS
-
Prescriptive guidance around the best "design and operational practices" for SharePoint environments is now at Technet.
The guidance is based on real-world experience of SharePoint consultants across various customer engagements.
- Provision Central Admin into another machine in the same Farm
-
Recently, I came across a scenario where in the "Central Admin" site had become unresponsive. The server might have developed a temporary snag which could have resulted in this. If you would know, during any farm setup, the Central Admin web site is created only on the first server (by default). The site is not avaialble on the other servers which are later joined to the farm.
If you think that you are stuck...read below,-
Tip to provision the Central Admin site on another box/machine joined in the same farm.
-
Execute psconfig.exe -cmd adminvs -provision command to provision the central admin web site.
-
Then use stsadm.exe -o addzoneurl to set the new URL for the Central Admin site.
- Source code for the Silverlight blueprints for SharePoint is now available at CodePlex
-
Source code for the Silverlight blueprints for SharePoint which works with Silverlight beta 2 release is now available at CodePlex. Developers can now easily learn to integrate silverlight applications with SharePoint.
Refer the following link for more information,-
http://www.codeplex.com/SL4SP
- SharePoint Training
-
Let's spread the word of "SharePoint".
There is a whole set of trainings targetted for all kinds of audiences on the various features of Microsoft Office SharePoint Server 2007. Thought of providing a consolidated list for the benefit of one and all (explore them at your convenience and understand why MOSS 2007 is being deemed as a "killer application").
End user training videos : http://office.microsoft.com/en-us/sharepointserver/HA102488011033.aspx
Virtual Labs @ Technet : http://technet.microsoft.com/en-us/bb499670.aspx
Virtual Labs @ MSDN : http://msdn.microsoft.com/en-us/cc707678.aspx
SharePoint Tutorials : http://blog.sharepointhosting.com/Downloads/SharePoint-Tutorials.aspx
SharePoint Screencasts: http://www.sharepoint-screencasts.com/
- Document Property Promotion and Demotion
-
Ever wondered why the custom properties (such as author, title, subject, etc) associated with a file are automatically picked up during the upload process?
This is due to the "Document Property Promotion and Demotion" feature available in SharePoint.
I quote from this MSDN article which talks about that,-
"Managing the metadata associated with your document is one of the most powerful advantages of storing your enterprise content in Windows SharePoint Services 3.0. However, synchronizing information between the document library level and the document is a challenge. Windows SharePoint Services provides the document parser infrastructure, which enables you to create and install custom document parsers that can parse your custom file types and update a document for changes made at the document library level, or update the document library with changes made at the document level. Using a document parser for your custom file types helps ensure that your document metadata is always current and synchronized between the document library and the document itself."
- How To: Construct absolute url for any item using the SPSite object
-
In the case when we need to get the absolute url for any item, we can make use of the instance method SPSite.MakeFullUrl.
Example use,-
using(SPSite site = new SPSite(mysiteurl))
{ using(SPWeb web = site.OpenWeb())
{
//.. Other lines of code
string absoluteURL = site.MakeFullUrl(serverRelativeURL);
}
}
- SharePoint Database Schema Information
-
Lot of us might be interested to know the schema information for SharePoint configuration and content databases. Read the documentation here.
Warning!
Do not modify any of the tables in the database directly. It is strictly not supported by Microsoft.