My SharePoint Blog

Blogs On SharePoint Technologies


Search Site


My SharePoint Blog recommends any of the following books...


Recent comments

Tags

Don't show

    Categories


    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2009

    WSS Current Number of Sites 0 after SQL Restore of Content DB

    You restore a content db via SQL restore and attach it to another SharePoint web application via Central Administration "Add a content database" and for some reasone the "Current Number of Sites" is 0. WTF? You are sure the content db has content. In the Application Event Viewer you find the following error...

    Event Type:    Error
    Event Source:    Windows SharePoint Services 3
    Event Category:    Database 
    Event ID:    5763
    Date:        5/18/2007
    Time:        9:42:26 AM
    User:        N/A
    Computer:    TEAS-207
    Description:
    Primary key violation on SQL Server instance 'teas-207' in database 'SharePoint_Config'. Additional error information from SQL Server is included below.
    Violation of PRIMARY KEY constraint 'PK_SiteMap'. Cannot insert duplicate key in object 'SiteMap'.
    The statement has been terminated.
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    

     

    Here is the workaround. First find out the Id of the sites (site collection) in the [restored_db].Sites then delete the line in the [Config_db].SiteMap with the same Id. Now attach the content_db and you should see the sites.

    Categories: SharePoint
    Posted by Kevin on Friday, May 18, 2007 9:05 AM
    Permalink | Comments (13) | Post RSSRSS comment feed

    SharePoint WSS DateTime Format

    Curious what the format is for DateTime?

    YYYY-MM-DDTHH:MM:SSZ

     

    The ":SSZ" must be left in the format string.

    Categories: SharePoint
    Posted by Kevin on Wednesday, May 02, 2007 1:05 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    SharePoint SessionState Issues

    Say you want to run a 3rd party .NET app in a virtual direcotory outside of your SharePoint sites (or inside), you will need the following in the web.config file of that app.

    <system.web>
         <pages enableSessionState="true" />
         <httpModules>
              <clear />
              <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
         </httpModules>
    </system.web>

     

    Reason: By default SharePoint disables SessionState. Here is an excellent MS Article on Session State


    Categories: SharePoint
    Posted by Kevin on Wednesday, May 02, 2007 1:05 PM
    Permalink | Comments (0) | Post RSSRSS comment feed