none
deleting dbo.object from config DB Sharepoint_config

    Question

  • This is related to Project Server 2007 in Sharepoint 2007 farm.

    On running the SP product and technology wizard, we get an error " Cannot open database "ProjectServer_Published_test" requested by the login. The login failed."  however this was an earlier provisioned site. The provisioned site was earlier deleted and corresponding 4 databases were also deleted from DB server. But it looks like some instances of those database still remain. Under SharePoint_config, dbo.object , I see the entries for the 4 provisioned databases.

    I ran databaserepair to see if there is any orphaned site or DB on the contentdb . but it returned zero.

    Can I delete the 4 entries from the dbo.object table? If yes how? Is that supported by microsoft?

    Thursday, December 26, 2013 10:18 AM

Answers

  • Check the permission for Service account then 

    you check the web app and see if that DB is still attached to the web app.If its present their remove from the web app. you can check at Central admin>Application? Content DB> and select the web which was using this Content Db before. hope this will work thanks 

    Run this against the config DB
    SELECT OD.ID AS DepID,OD.Name AS DepName, O.ID AS ObID,O.Name AS ObName
    FROM Objects AS O
    INNER JOIN Dependencies AS D ON O.ID = D.ObjectID
    INNER JOIN Objects AS OD ON D.DependantID = OD.ID
    WHERE O.Name like ‘[INSERT-DB-NAME-HERE]‘
    Copy the DEPID that is returned and execute the following command
    STSADM -o deleteconfigurationobject -ID


    kirtesh

    • Marked as answer by NS_SPAdmin Friday, December 27, 2013 9:13 AM
    Thursday, December 26, 2013 11:11 AM

All replies

  • Check the permission for Service account then 

    you check the web app and see if that DB is still attached to the web app.If its present their remove from the web app. you can check at Central admin>Application? Content DB> and select the web which was using this Content Db before. hope this will work thanks 

    Run this against the config DB
    SELECT OD.ID AS DepID,OD.Name AS DepName, O.ID AS ObID,O.Name AS ObName
    FROM Objects AS O
    INNER JOIN Dependencies AS D ON O.ID = D.ObjectID
    INNER JOIN Objects AS OD ON D.DependantID = OD.ID
    WHERE O.Name like ‘[INSERT-DB-NAME-HERE]‘
    Copy the DEPID that is returned and execute the following command
    STSADM -o deleteconfigurationobject -ID


    kirtesh

    • Marked as answer by NS_SPAdmin Friday, December 27, 2013 9:13 AM
    Thursday, December 26, 2013 11:11 AM
  • You can also try this if : site has been orphaned in the content db then




    - Open your content db and select all from dbo.webs

    - look fo the title of the Site Collection you created that you wish to delete in the Title field

    - Copy the SiteID Guid

    - in the 12/Bin folder of the app server, run:  


    stsadm -o deletesite -force -siteid [enter the guid here] -databaseserver [database server name] -databasename -[name of your content database]



    This will delete the orphaned records.



    to confirm, run enumsites again on your web app to check all is well

    kirtesh

    Thursday, December 26, 2013 11:21 AM
  • NS_SPAdmin,

    Above procedure is not supported by Microsoft.

    Thanks,

    Hrishi


    Hrishi Deshpande Senior Consultant

    Friday, December 27, 2013 6:19 AM
  • Hi Hrishi, Hi NS_SPAdimn, The stsadm commands are supported.... Deleting entries directly from the SharePoint admin config DB is not supported. Paul

    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Friday, December 27, 2013 8:52 AM
    Moderator
  • Thank you so much. This resolved my issue.
    Friday, December 27, 2013 9:14 AM
  • Paul,

    While working at Microsoft we have been told by SharePoint Support group executing deleteconfigurationobject command still violates support boundary, supported guideline is to use this command under SharePoint Support personal, I agree this command works pretty well and does what it suppose to.

    Point is if you accidently delete working object and your SharePoint stops working MS will not support other than rebuilding SharePoint Config.


    Hrishi Deshpande Senior Consultant

    Friday, December 27, 2013 5:07 PM
  • Hi Hrishi,

    Agreed, it can we dangerous and should be used with caution! Sometimes there is no other option, and this is much better than trying to delete data from the databases directly :)

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS

    Friday, December 27, 2013 5:13 PM
    Moderator