Wednesday, January 28, 2009

How to identify the template used to create a site..

hi Friends


I use to wonder in case solution (WSP files) when deployed on the server globally

If the solution are available the sites are also made using those solution . Now I had a Question in my mind that how could I find which templates are bening applied on the site .In case site are moved i.e server is backup is restored over a new server , Creation on new configuration database , Solution are removed etc

At last we end up in getting message

"Page not found' or "Internet Explorer could complete this request " or " Unkown Error"


I created a Aspx file usign the code snipet given below

Code Snippet [ before every tag, '--' is added, you need to remove the hyphens]

==========================================================

<--script type="text/javascript" <--%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<--%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>
<--%@ Import Namespace="Microsoft.SharePoint" %>

<--script runat="server">
protected override void OnLoad(EventArgs e){
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPWeb thisWeb = this.Web)
{
lblWebTempalte.Text = thisWeb.WebTemplate;
lblWebTemplateID.Text = thisWeb.WebTemplateId.ToString();
}
});
}
<--/script>
<--asp:Content ID="Main" runat="server" contentplaceholderid="PlaceHolderMain" >

Web Template: <--asp:Label ID="lblWebTempalte" runat="server" />

Web Template ID: <--asp:Label ID="lblWebTemplateID" runat="server" />
<--/asp:Content>

<--asp:Content ID="PageTitle" runat="server" contentplaceholderid="PlaceHolderPageTitle" >
Site Template Information
<--/asp:Content>

<--asp:Content ID="PageTitleInTitleArea" runat="server" contentplaceholderid="PlaceHolderPageTitleInTitleArea" >
Site Template Information
<--/asp:Content>

<--/script>
===========================================================

Web Template: ----->Web Template ID:

============= ================

ABSENCE ----> Absencevacationschedule ----> 75811


PROJMULTI ---->Budgetingtrackingmultipleprojects ----> 75819


BT ----> Bugdatabase ----> 75801


CALLCENTER ---->Callcenter ---->75812


PROJCHANGE ---->Changerequest ----> 75818


COMPROC ---->Complianceprocesssupport ---->75813


DR ---->Documentlibraryreview ---->75803


EVENTPLAN ----> Eventplanning ---->75814


EXREPORTS ---->expensereimbursementapproval ----> 75815


HELPDESK ---->HELPDESK ---->75816


IT ---->InventoryTracking ---->75804


ITTEAM ---->ITTeamWorkspace ---->75817


JRIM ---->JobRequisition ---->75805


KB ---->KnowledgeBase ---->75806


LL ---->LendingLibrary ---->75807


PATM ---->PhysicalAssetTracking ---->75808


PROJSING ---->ProjectTrackingWorkspace ----> 75820


RER ---->RoomEquipmentReservations ---->75809


ST ---->SalesLeadPipeline ---->75810


List of Out of the box MOSS 2007 Template ID Information

========================================================

NAme ---->Web Template: ----> Web Template ID:

============= ================

GLOBAL ---->Global template" ----> 0

STS ---->Team Site,Blank Site,Document Workspace ----> 1

MPS ---->Basic Meeting Workspace ----> 2

MPS ---->Blank Meeting Workspace ---->2

MPS ---->Decision Meeting Workspace ---->2

MPS ---->Social Meeting Workspace 2

MPS ---->Multipage Meeting Workspace 2

CENTRALADMIN ---->Central Admin Site ----> 3

WIKI ---->Wiki Site ---->4

BDR ---->Document Center ----> 7

BLOG ---->Blog ---->9

SPS ---->SharePoint Portal Server Site ---->20

SPSPERS ---->SharePoint Portal Server Personal Space ---->21

SPSMSITE ---->Personalization Site ---->22

SPSTOC ---->Contents area Template ----> 30

SPSTOPIC ---->Topic area template ---->31

SPSNEWS ---->News area template ---->32

SPSNHOME ---->News Home template ---->33

SPSSITES ---->Site Directory area template ----> 34

SPSCOMMU ---->Community area template ---->36

SPSREPORTCENTER ----> Report Center Site" ---->38

CMSPUBLISHING ---->Publishing and Team Collaboration Site ----> 39

OSRV ----> Shared Services Administration Site ----> 40

SPSPORTAL ---->Corporate Intranet Site ---->47

SRCHCEN ---->Search Center ---->50

PROFILES ---->Profiles ----> 51

BLANKINTERNETCONTAINER ---->Internet Presence Web Site ---->52

BLANKINTERNET ---->Publishing Site ---->53

BLANKINTERNET ---->Press Releases Site ---->53

BLANKINTERNET ---->Publishing Site ---->53

SPSMSITEHOST ----> My Site Host ---->54

SRCHCENTERLITE ----> Search Center Lite ---->90

PWA ---->Project Web Access Site ----> 6221

PWS ----> Project Workspace ---->6215

OFFILE ----> Records Repository ----> 1483

OFFILE---->Records Repository ---->14483


To find out how many Solutions are deployed on the server we can achieve by

Central administration > operation> solution management

We would be finding the List of WSP file or Cab files installed

To find the solution from the Configuration database to you configuration database (Eg Wss_config)

Go to the databases open the table Dbo.objects .you would be finding the List of Solution in inside the tables

Note:- Above Steps would be senario Specfic .before doing any step Its advisable to take a full farm back and Sql back up to be on safe side

Full farm Backup (GUI)

hi Friends
Recently I faced a issue related to Full farm backup .When I use to take a Full farm backup we use to get error
"object (database name) failed in event OnBackup. for more information, see the error log located in the backup directory. sqlException: BACKUP DATABASE is terminating abnormally.

Digging more in to the issue we came accross many settings. but the one thats solved the problem was a registry entry
We added the registry key “SessTimeout” at the location HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters.
We gave the value as 360 for SessTimeout

Here is the article you can check
http://support.microsoft.com/default.aspx?scid=kb;EN-US;102981

Tuesday, January 27, 2009

Schedule Automatic WSS3.0 Backups

Back up a farm by using the Stsadm command-line tool (Windows SharePoint Services 3.0)
http://technet.microsoft.com/en-us/library/cc288541.aspx

Back up a farm by using SQL Server Tools (Windows SharePoint Services 3.0)
http://technet.microsoft.com/en-us/library/cc288402.aspx

How to schedule a database backup operation by using SQL Server Management Studio in SQL Server 2005
http://support.microsoft.com/?kbid=930615

Restore a farm after a configuration database problem (Windows SharePoint Services)
http://technet.microsoft.com/en-us/library/cc512814.aspx

Friday, January 23, 2009

MOSS/WSS3.0 DISASTER RECOVERY STEPS

From File system backup following:
1.C:\inetpub\wwwroot
2.C:\windows\assembly
3.C:\windows\system32\drivers\etc\hosts file
4.C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\
5.C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\
6.C:\Program Files\Microsoft Office Servers\12.0 (Not Applicable in WSS3.0)
(If you are using any custom locations instead of above default locations please backup them.)

From Registry Editor backup following:
1. 1.HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure
2.HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0

Back Up IIS Metabase (IIS 6.0) using following steps:
To create a non-portable backup (password not required)
1.
In IIS Manager, right-click the local computer, click All Tasks, and click Backup/Restore Configuration.
2.
Click Create Backup.
3.
In the Configuration backup name box, type a name for the backup file.
4.
Click OK, and then click Close.
The IIS metabase is created in the systemroot\system32\inetsrv\MetaBack folder.

Back up Central Administration Configured Settings:
1. In Central Administration,
2. Here is the following links that need to be documented(screenshot) to have a
backup of your configuration

a. Operations
i. Outgoing e-mail settings
ii. Incoming e-mail settings
iii. Approve/reject distribution groups
iv. Master site directory settings
v. Alternate access mappings
vi. Solution Management
vii. Services on Server (for each server)

b. Application Management
i. Define managed paths
ii. Web Application outgoing e-mail settings
iii. Web application general settings
iv. Content Databases
v. Web Application list
vi. Records center
vii. Manage form templates
viii. Configure InfoPath Forms Services
ix. Manage data connection files
x. Manage the Web service proxy
xi. Create or configure this farm’s shared services
xii. Grant or configure shared services between farms
xiii. Configure session state
xiv. Security for Web Part pages
xv. Self-service site management
xvi. User permissions for Web application
xvii. Policy for Web application
xviii. Authentication providers
xix. Manage Search service
xx. Workflow settings

c. Shared Services Administration (Not Applicable in WSS3.0)
i. In each SSP, document the following
1. User profiles and properties
2. Profile services policies
3. My Site settings
4. Trusted My Site host locations
5. Published links to Office client applications
6. Personalization site links
7. Personalization services permissions
8. Search settings
9. Search usage reports
10. Edit Excel Services settings
11. Trusted file locations
12. Trusted data connection libraries
13. Trusted data providers
14. User-defined function assemblies
15. Audiences
16. Usage Reporting
17. Import application definition
18. View applications
19. View entities
20. Business Data Catalog permissions
21. Edit profile page template

3. Next we will need to have you take a backup using the Central Administration site
a. In the Operations tab, click on Perform a Backup
b. Check the box next to Farm, click on Continue to Backup Options
c. Be sure that Full is selected
d. Enter in a share for the backup to be placed in that folder
i. Note: The MOSS service account needs full control for the Share, as well as
the NTFS permissions.
e. Click OK
i. It will take a few minutes before the backup is started.

Full Farm Backup using command prompt:
stsadm -o backup -directory -backupmethod full

To backup individual site collections:
Open a command prompt
Cd “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN”
stsadm -o backup -url -filename -overwrite

Backup all SharePoint Databases from SQL Server Management Studio:
1. Configuration database (Configuration database name can be found from Central admin>Operations>Topology and Services>Servers in Farm)
2. Content Databases (We can find the association of the web application and Content database from Central administration>Application Management>Content Database>On right hand side we need to select drop down list>change web application & we need to select a web application for which the Content database will be listed below.)
3. WSS_Search Database (WSS Search database name can be found from Central admin>Operations>Topology and Services>Services on server>Click on Windows SharePoint Services Search>Search Database>Database Name)
4. Shared Services DB Databases (Not Applicable in WSS3.0)
5. Shared Services SEARCH Databases (Not Applicable in WSS3.0)
6. Any other databases related to Product integrated with SharePoint (For example: SQL Reporting Services, Project Server etc)

4.Disconnecting from existing Configuration Database & creating a new Configuration Database:
This will cause loss of following:

1. Central admin configured settings (Need to be reentered from screenshots taken earlier)
2. Any solutions deployed in farm (Need to read & redeploy)
3. 3rd party web parts or templates (Need to reinstall)
4. Integration with other products (Need to reconfigure)

5. After the backup finishes successfully, run SharePoint Products and Technologies Configuration from each server(one at a time)
a. Click next; click Yes
b. Select Disconnect from this server farm; click Next

6. Creating a new configuration database;
run the SharePoint Products and
Technologies Configuration from the server that will be hosting Central
Administration.
a. Click Next; Click Yes
b. Select No, I want to create a new server farm
c. Type in Database server
d. Make sure the Database name is unique(This will be the name of your
configuration database)
e. Enter in your username and password
f. Click next
g. Specify a port(optional)
h. Click Next; Click Next

7. Connect other servers up to the farm; run SharePoint Products and Technologies Configuration from the other servers one at a time
a. Click Next; click Yes
b. Make sure Yes, I want to connect to an existing server farm is selected; click
Next
c. Enter in the database server name; Click Retrieve Database Names
d. Select the database that you just created for Database name
e. Type in the password for the service account
f. Click Next 3 times

8. Start the services in the Central Administration -> Operations -> Services on server
a. Start the services that were documented in the previous steps for each server
b. Make sure the services are in the Started status, not Starting

9. Restoring from backup; Central Administration -> Operations -> Restore from backup
a. Specify the location of the backup; click OK
b. Select the backup that was taken in the previous steps; Click Continue the
Restore Process
c. Check the box next to Farm; Click Continue the Restore Process
d. Select New Configuration
i. NOTE: DO NOT USE SAME CONFIGURATION
e. Complete the forms with the correct information about database names/servers
and service account usernames/passwords
f. Click OK
i. The Restore process will take a few minutes to start.

10. If above restore Operation does not work try one of following:

A. For catastrophic restore
stsadm -o restore -directory -restoremethod

B. For site collection restore
stsadm -o restore -url -filename [-hostheaderwebapplicationurl] -overwrite

C. Create new web application & use stsadm -o addcontentdb to attach original content database
stsadm.exe -o addcontentdb -url -databaseserver -databasename

Restoring On the same server:
Since Configuration Database is same & all the files are in place, most of the sites work without problem.
If New Configuration Database is created on same server then follow instructions below

Restoring On new server:
1.Since we need to create a new configuation database & all required files are not present, We need to copy the contents of backed up folders partially or fully to the new server.
2.We also need to redeploy the lost settings mentioned in step 4 above,
3.SSL certificates needs to be assigned again.
4.Host/CNAME records in DNS needs to be updated to point to new Server.