How to put a Sharepoint Page in Maintenance Mode

Add ?contents=1 to the end of the page will place the page into maintenance mode

How to Restore a Site Collection directly from SQL Content DB

How to Restore a Site Collection directly from SQL Content DB

Here is how you can restore a site collection directly from a SQL Content DB

  • Restore a backup of the SQL database to your SQL server, add this DB to the SQL server using a different name.  do not use the production name (will explain later)
  • Run this stsadm command: 
    • stsadm -o  addcontentdb -url http://temp_web_applicaion -DATABASENAME name of your_restore_DB
    • Note:  I recommend you add this DB to a temp web application, back it up, and then restore it to its properly location.
  • If you browse to your Central Admin and click on Site Connections list for the web app http://temp_web_application, you should see that all the site collection in this DB will not be available.
  • Run a backup using: 
  • Restore it back to its properly location by running a restore using: 
    • stsadm -o restore -url http:// web_applicaion/sites/site_youwant_to_restore -filename c:\restore.cmp

Manually add agent to DPM Server

Here are the steps to manually install and add agent to DPM server

Copying the agent install files over:

– You should be able to find it on your install CD at in the Agent folder

– if you have SP1 or other version install, you can find the newer version of the agent on your server locally:  <drive letter>:\Programs Files\Microsoft DPM\DPM\Agents\

If you are installing the agent for the first time:

– (x64) DPMAgentInstaller_amd64.exe <DPM server name>

– (x86) DPMAgentInstaller.exe <DPM server name>

Depends on the version of the agent you are installing, your .exe might be different, for example:

– (x64) DPMAgentInstaller_KB959605_amd64.exe <DPM server name>

– (x86) DPMAgentInstaller_KB959605.exe <DPM server name>

If you already have the agent install and want to change/modify/add the DPM Server

SetDpmServer.exe –dpmServerName <DPM server name>

Example:  SetDpmServer.exe –dpmServerName DPMServerName

On the DPM Server using DPM Management Shell, run the following command:

Attach-ProductionServer.ps1 <DPM server name> <production server name> <user name> <password> <domain>

Note:  you don’t really need username, password, and domain if you don’t want to, DPM will ask you for those info after the command.

Example:  Attach-ProductionServer.ps1 DPMServerName NameOfServerWithAgent

How to set up SSO in SharePoint

How to set up SSO in SharePoint

Was having problem setting up SSO.  Keep getting error.  Here is what I did to get it setup properly (I notice there are post out there in the internet, but some are missing some information:

1.  Create a domain service account (ex: moss_sso)

2. OPTIONAL: Create a domain security group with “Global” and with “Group Type” as “Security”.  Add the moss_sso service account to this group.  (you can create two group, one for Definition Administrator and one for SSO Administrator)

3. Add the domain services account (or security group) to the local administrators group on all SharePoint servers.

4. Log into the server that is running “Central Administration” web site.

5. Navigate to “Central Administration -> Operations -> Service Accounts” and double check the “Single Sign-on Service” credentials, set the services to run from the domain services account (moss_sso).

6. Also add the domain service account used to run the service to the Farm’s administrators group

7. Start the “Microsoft Single Sign-on Service” in the Windows Services under Manage.  Set the services to start “Automatic”.  Run the service under a domain service account (moss_sso).  Start the service. (if not already started)

6. Repeat 6 on all server except server which will only act as WFE.

7. In SQL, set the domain service account (moss_sso) running the Microsoft SSO service has the following roles assigned on SQL Server:  dbcreator and securityadmin

8. Log into the server that is running “Central Administration” web site.  NOTE:  make sure you log using the New Services account (moss_sso)!!!  This is the part that give the issue when I was trying to set this up.

12.Navigate to “Central Administration -> Operations -> Manage Single Sign-On -> Manage Server Settings” to setup SSO for SharePoint

12.1 Single Sign-On Administrator Account: Domain Group or the Services account moss_sso

12.2 Enterprise Application Definition Administrator Account: Domain Group or the Services account moss_sso

12.3 Database Server Name (use netbios naming convention)

12.4 Database Name

12.5 Timeout settings (I used Default)

12.6 Ok.

 

 

Determine version of SQL server and Release Version Number

Some useful references:

Query to determine the version of a SQL 2000/2005/2008

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel')
, SERVERPROPERTY ('edition')

SQL 2008 Release Revision:

  • SQL Server 2008 RTM – 2007.100.1600.0
  • SQL Server 2008 Service Pack 1 – 2007.100.2531.0

SQL 2005 Release Revision:

  • SQL Server 2005 RTM 2005.90.1399
  • SQL Server 2005 Service Pack 1 – 2005.90.2047
  • SQL Server 2005 Service Pack 2 – 2005.90.3042
  • SQL Server 2005 Service Pack 3 – z2005.90.4035

SQL 2000 Release Revision:

  • SQL Server 2000 RTM – 2000.80.194.0
  • SQL Server 2000 SP1 – 2000.80.384.0
  • SQL Server 2000 SP2 – 2000.80.534.0
  • SQL Server 2000 SP3 – 2000.80.760.0
  • SQL Server 2000 SP3a – 2000.80.760.0
  • SQL Server 2000 SP4 2000.8.00.2039

XSL Code to develop custom Search Result Page

XSL Code to develop custom Search Result Page

For those who are looking to develop custom search result page, here is the XSL which alone you to get a XML dump of the results (so you can put it into Sharepoint Designer to edit the look and feel)

<xsl:stylesheet version=”1.0″

xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”&gt;

<xsl:output method=”xml” version=”1.0″ encoding=”UTF-8″ indent=”yes”/>

<xsl:template match=”/”>

<xmp><xsl:copy-of select=”*”/></xmp>

</xsl:template>

</xsl:stylesheet>

 

Site Template removal option Missing

It looks like if you have certain features enable, the option to disable “site template” (option for Owner to create various site template) is remove as a result. 

However, I found that you can still force the site collection to remove them, add the following to your site URL:  /_Layouts/AreaTemplateSettings.aspx  it will still allow you to remove the site template

InfoPath Field Limit – Form Fail to Publish

Run into this error, and there wasn’t much info about this issue…  If anyone know anything about this one, please post a solution

– created a InfoPath form

– attempt to promote various field to the Content Type.

– InfoPath fail to publish more than 30 field.  (works perfectly find if I keep the # below 30)

– I read some where there was a hot-fix for it (forgot where), applied it, but still didn’t fix it…

I end up just publishing the form with less than 30 fields

SQL 2005/2008 Mirroring Databases

Was working on mirroring a few SQL databases for Sharepoint.  but keep getting the following error:

– error 1817, fail to connect to the server xxx

– when you check the server’s event log, it mention there were a log showing the 2 SQL server were trying to connect thru anonymous account.

Here is what I did to fix it:

– ensure to use a FQDN  such as sqlserver1.abc.local

– ENSURE SQL services is running on a Services account AND NOT LOCAL OR NETWORK SERVICES!!!! (this was my problem).

Building Dashboard in Sharepoint using Sharepoint search (with no custom code)

Building Dashboard in Sharepoint using Sharepoint search (with no custom code)

Build a custom dashboard the other day base on the Sharepoint search, want to share with you all how I did it.  Hope someone else will also find this useful.

  • I need to get data from various site collections
  • The users wants to make a Announcements in a site collections and certain Announcements needs to roll up into a page to form a dashboard.
  • These Announcements can be anywhere on the farm.

The good old way to do this would be to create a custom app that loop thru all the pages to Identify all content marked to include in the dashboard.  BUT here is a new way to approach this with NO CUSTOM CODE:

  • Create a new content type for Announcements (its optional, but this way you can save it as a List Template and reuse it)
  • Add a column to the Announcements list, for the purpose of this article we will call it “Announcements Type”, have this as a Choice and set the choice as “Include in Dashboard” and “Exclude in Dashboard” (the name and field type is entity up to you)
  • Let the Sharepoint Search runs a crawl
  • The new column “Announcements Type” should now be available in SSP.  Add this to Metadata Property Mappings in your SSP.  Call it “AnnouncementsTypeData”.  Check the box to allow this metadata to be usable in Scope.
  • Go to the place where you want to have the dashboard and create a “search result page” (or blank  page and then add the Search Core Result web part)).
  • Modify the Search Core web part.
  • Modify the Results Query Options and add AnnouncementsTypeData to Selected Columns in the Search Core Result Web.
  • Create a scope call “Dashboard” and set the rule to include all contents base on the following rule “AnnouncementsTypeData = Include in Dashboard”
  • The Core Search Result should now be able to understand AnnouncementsTypeData.
  • Set the Cross-Web Part query ID not to use User Query, but manually define the Query.
  • Set the Scope in this web parts to “Dashboard”.
  • Save your changes and Exit
  • Now whenever you access this page, you should only see all Announcements that the user mark as Include in Dashboard.
  • To make your dashboard looks better, edit the XSL in the core result (I highly recommend you edit the XSL so it doesn’t look like the sharepoint out of the box search.  I made it so no one notice the back end was base on the sharepoint search J, by editing the XSL you can make it look and feel like a “fancy” dashboard.)