Wednesday, December 9, 2009

How to Backup and Restore SSP (Shared Service Provider)

I post this article in response of one of my colleague's problem . Suppose that you delete by accident the dbs of the SSP (Shared Service Provider) and you have to restore it afterwards.
Back up Your SSP
Before restoring it, the first thing to know is how to backup it. :)
Back up using the user interface
1. Go to the operations page in the Central Administration, in the Backup and Restore Section, Click Perform a backup.
2. Select the SSP you want to backup. Click to Continue to Backup Options.
3. On the Backup Options page:
o Verify if your SSP is present.
o The type of backup needs to be Full.
o Select the UNC path of the backup folder.
4. Click OK.
If you go to the status page you will see the status of your backup. It refreshes every 30 seconds.
Back up using the SSP using the command line
Execute this command :
stsadm -o backup -directory SERVER\FOLDER_NAME -backupmethod full -item SSP_NAME
If you have a warning or an error you will find information in your log file spbackup.log in the folder you specified.
Back up the SSP using the SQL Server
1. Go to the SQL Server Management Studio and connect to your database server.
2. Expand Databases in the Object Explorer.
3. Right click on the SSP database, go to Tasks, then click Back Up.
4. Select the full Backup Type.
5. Select the Database option.
6. Type the name and the description of the backup.
7. Set when it will expire.
8. Specify the location to store the backup.
9. Click OK.

Restore Your SSP
Now that you know how to back up your SSP, here the way to restore it.
Restore the SSP using the user interface
1. Go to the operations page in the Central Administration, in the Backup and Restore Section, click Restore from Backup.
2. Enter the UNC path to the backup folder in the Backup File Location section.
3. Select the backup file that you want to restore, click Continue Restore Process.
4. Select the SSP you want to restore, Click Continue Restore Process.
5. On the Restore Option page :
o Verify if you select the good SSP.
o Select Same configuration in the Restore Options and accept the warning message.
o Verify the names and URLs.
6. Click OK.
Restore the SSP using the command line
1. Catch the GUID of the backup you want to restore in executing this command :
o stsadm -o backuphistory -directory UNC_PATH_TO_BACKUP_FOLDER
2. Now get the name of the SSP you want to restore using this command :
o stsadm –o restore –showtree -directory UNC_PATH_TO_BACKUP_FOLDER -backupid GUID
3. And now restore the SSP (the PATH_FROM_TREE is the full farm path as showed by the -showtree parameter) :
o stsadm -o restore -directory UNC_PATH_TO_BACKUP_FOLDER -backupid GUID -item PATH_FROM_TREE -restoremethod overwrite
4. Type y and press ENTER.
5. Type the user name and the password.
If you have a warning or an error you will find information in your log file sprestore.log in the backup shared folder.
Restore using the SQL Server
1. Stop WSS Timer service and don't restart it until you restore the database. Make sure all running procedures have completed before you continue.
2. Go to the SQL Server Management Studio and connect to your database server.
3. Expand Databases in the Object Explorer.
4. Right click on the SSP database, go to Tasks, then to Restore, click to Database.
5. Specify the destination and the source and select the backup you want to restore.
6. Click Options in the Select a page section.
7. Click OK.
8. Restart the WSS Timer service.

For more information regarding Back up and Restore I invite you to consult those articles on TechNet as I did for writing this article :
Back up SSPs (Office SharePoint Server 2007)
Restore SSPs (Office SharePoint Server 2007)
Back up databases
Restore Databases

Friday, November 13, 2009

change default column name 'Title ' in Item content type - Ankit

There is a file called FldEdit.aspx in layouts folder which contains a
javascript function as shown below

function doesFieldNameConflict( strName )
{
if (g_FieldName[strName.toLowerCase()] &&
strName.toLowerCase() != <
%SPHttpUtility.AddQuote(SPHttpUtility.EcmaScriptStringLiteralEncode(spField.Title),Response.Output);
%>.toLowerCase())
return true;
else
return false;
}

g_FieldName : Its an array collection of all possible fields...
Just modify the function to add your own logic and by passing the
check for existence of "Title" field as shown below


function doesFieldNameConflict( strName )
{
if( strName.toLowerCase() == "title")
return false;
if (g_FieldName[strName.toLowerCase()] &&
strName.toLowerCase() != <
%SPHttpUtility.AddQuote(SPHttpUtility.EcmaScriptStringLiteralEncode(spField.Title),Response.Output);
%>.toLowerCase())
return true;
else
return false;
}


I tried this method, and problem is resolved like this, dont forget to remove that 2 line once it get resolved.

follow this post : http://www.eggheadcafe.com/software/aspnet/29904441/change-default-column-nam.aspx

Thursday, October 1, 2009

Which w3wp.exe process belongs to which App Pool in IIS6

Which w3wp.exe process belongs to which App Pool in IIS6
Along with Windows Server 2003 and Internet Information Services 6.0 came a large number of benefits. For us IIS admins, it was a great welcome set of changes. But, one apparent difficultly is matching up the w3wp.exe processes displayed in Task Manager to the Application Pools in IIS.

Review of IIS5

In IIS5.0 (Windows 2000 Server), each site that is set to Out Of Process will spin up a new instance of dllhost.exe. Windows Task Manager lists them. Now, the trick is to find out which dllhost.exe matches which site. My favorite way is to use Component Services. To do so, open Component Services from Administrative Tools, drill down to Computers -> My Computer and select COM+ Applications. Now select View from the top menu and select Status. Beside each site that currently has a dllhost.exe process spun up is the Process ID (PID). Using Task Manager, you can tell the memory and CPU.

Note: If the Process ID doesn't display for you in Task Manager, select View -> Select Columns and add it.

What about IIS6?

But, that doesn't work anymore with IIS6.0. Now each site in IIS6 is placed in an Application Pool. Each Application Pool is completely separated from other App Pools by running in its own process called w3wp.exe. This make life SO much easier. Now, the trick is to match up the process shown in Task Manager with the Application Pool set up in IIS.

If there is a different user for each application pool, Windows Task Manager is the easiest way to find out which application pool belongs to which site since Task Manager will display the user the process runs as.

But, what happens if you have multiple application pools running as the same user? For example, if you keep to the default NETWORK SERVICE user but create multiple Application Pools, you may want to know which process belongs to which App Pool. Component Services doesn't work for this anymore.

Enough already, tell me how to do it!

Have no worries, Microsoft has given us the exact tool for the situation. IISApp.vbs lists all the applications, their PID and their App Pool name.

The script is already placed in systemroot\system32 on Windows Server 2003 so simply go to your Command Prompt and type in iisapp.vbs (the .vbs is optional) and you'll have an instant list of all the App Pool information you've always wanted to know. You may need to type cscript iisapp.vbs if CScript isn't your default WSH script host.

Let's see an example of the output:

W3WP.exe PID: 1468 AppPoolId: AppPoolForSite1.com
W3WP.exe PID: 3056 AppPoolId: AppPoolForSite2.com
W3WP.exe PID: 1316 AppPoolId: AppPoolForSite3.com


Direct from the horse's mouth, Microsoft documents this:

http://www.microsoft.com/resources/documentation/WindowsServ/2003