Sunday, June 29, 2008

SharePoint Databases

Configuration Database (configdb)
WSS creates configdb at the time of installation. There will be only one configdb per server farm. configdb is used to store settings for Sites, Databases, Servers, Web Application

Content Databases
You can have one content database per web application, but you can span sites across multiple content databases. Content Databases is used to store site collection and its content.
Site Details, Structure Details, User Content, Files, Security Information

Shared Services Provider (SSP) Database
One SSP database created per Shared Service Provider. It is used to store User Profiles, Audience Data, Business Application Data, Excel Services Function, Site Usage Data,Infopath Foms Services session state information

Search Database
MOSS 2007 uses separate search database to store search data. It is separate from SSP database. One search database is created per SSP. Search database is used to store Search Data, History Log, Search Log, Crawl Statistics, Links tables

Thursday, June 26, 2008

Tuesday, June 17, 2008

Master Page behaviour in MOSS and WSS

Having single master page for all the sites?

If using MOSS, you can inherit from the top level master page. If you are using WSS, the out of the box functionality is that all sites utilize their own master page. You can, however, create a site template that uses the master page you wish and create all subsequent WSS sites from your template(s).

Master Page Inheritance
Master page files can be applied on a site level, but not on a page level. So a sub site can have a different master page specified than the parent, or it can inherit the master page file settings from the parent.

Monday, June 16, 2008

Shrinking the SharePoint Content Database

When you add and remove files to your sharepoint site, you will notice that the content database will grow very large, So it will create problem for backup and site performance. We can solve this problem by shrinking the Content Database.

Step 1: goto Central Administration > Application Management > Site Collection List > click on the url for which you want to see the database name.

Step 2: goto sql server management studio and run the command "sp_helpdb " , where db_name is your database name. you can see the current database size

Step 3: run the sql command to backup content database "BACKUP LOG TO DISK = '' ". Example, BACKUP DATABASE dbname TO DISK = 'C:\Backups\dbname.bak' WITH INIT, STATS = 5

Step 3: run the sql command to shrink the database "dbcc shrinkfile (<File Name>,<Target Size>)"

For more information , Please visit these links http://blogs.officezealot.com/speaktech-bi/archive/2008/04/15/shrinking-the-sharepoint-content-database-part-1.aspx

Shrinking transaction log http://support.microsoft.com/kb/907511/en-us

Wednesday, June 4, 2008

SharePoint ProcessBatchData Method for Batch Processing

Delete List Items using Batch Process, Instead of using SharePoint API. Normally we use listItem[index].Delete(); method to delete items one by one in list. But you can use "ProcessBatchData" method to delete the list items in the form of Batch Processing.

StringBuilder sb = new StringBuilder();
sb .Append("");
foreach (SPListItem item in CurrentList.Items)
{
sb.Append("");
sb.Append("" + CurrentList.ID + "");
sb.Append("" + item.ID.ToString() + "");
sb.Append("Delete");
sb.Append("
");
}
sb.Append("
");
try
{
SPContext.Current.Site.RootWeb.ProcessBatchData(sb.ToString());
}
catch (Exception ex)
{ throw ex; // Unable to delete}

Difference - Site Backup/Restore and Export/Import

Site Export and Import is used for Content Migration. The Content Migration API's are designed to migrate content from one source location to a destination location - they are not designed for backup and restore. Content Migration API has following limitations:
1. No Configuration or Application data can be exported or imported.
2. The larges object you can export is WSS web site (spWeb object)
3. Following Contents cannot be exported or imported - alerts, audit trial,change log history, checkin/checkout state, recycle bin items, recycle bin state, security state, workflow state and workflow tasks
4.Although web parts are migrated between source and destination sites, no assemblies are migrated, if you have custom web parts then you have to manually install the assemblies in the destination location

There are 3 ways to invoke content migration API's
1. using STSADM utility - you can use import and export operations to migrate data. (limited to website only)
2. you can use ExportWeb or ImportWeb methods implemented in the sites web service
3. Content Migration Object Model (Microsoft.SharePoint.Deploymen) - you can migrate anything from a website to item in a list, or a single document in a library. You can choose whether to include information about security, versioning, user roles and other metadata of the objects that you are migrating

Tuesday, June 3, 2008

Visual Studio : Get Assembly Public Key Shortcut

1. In Visual Studio, select External Tools from the Tools menu.
2. In the External Tools dialog, click Add and enter Get Assembly Public Key for the
Title.
3. Fill the Command textbox by browsing to sn.exe. It is typically installed at the following
location: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe.
4. In the Arguments textbox, type the following (case sensitive) -Tp "$(TargetPath)".
5. Enable the Use Output window checkbox.
Click OK. The new command is added to the Tools menu.

Monday, June 2, 2008

Sharepoint limitations for acceptable performance

Guidelines for designing a server for good performance. Numbers given below is not hard limits.

Guidelines for site objects.
50,000 Site Collections per Content Database
1,50,000 Site Collections per Web Application
2,50,000 Web Sites per site Collection
2,000 Sub Sites per Web Site
5 Million Documents per Document Library
2000 Items per View
50 MB (Max 2 GB) per Document file Size
2,000 Lists per Website
256 Field Types per List
2,000 Columns per Document Library
4,096 Columns per List
50 Web Part per Page

Guidelines for people objects
2 million Users in Group per Web Site
5 Million User Profiles per Farm
2,000 Security Principal (Access Control List) per Web Site

Guidelines for search objects.
1 Search Index per Search Server
50 Million documents per Search index

guidelines for logical architecture objects.
1 Shared Service Provider for 3 Farms (max 20)
5 Zones (hard coded) per Farm
8 IIS App Pools per Web Server
50,000 Site Collection per Web App
100 Content Database per Web App
50,000 Site Collection per Database

Guidelines for physical objects.
1 Index Servers per SSP
Excel Service = No Limit
100 Content DataBase per Search server
8 Web Servers per Database Server
3 Web Servers per Domain Controller

Click here to read more click here