locked
enumallwebs RRS feed

  • Question

  • Hi,

    One of the clients have migrated (Database migration) from sharepoint 2010 to sharepoint 2013.
    When the stsadm command "Enumallwebs" is executed to get the webparts we get the below message.

    "Invalid object name 'WebParts'."

    What would case that to happen and how can that be resolved to get the webparts information?

    Satyam.

    Monday, April 27, 2015 4:10 PM

All replies

  • Hi Satyam,

    Based on your description, you want to get webparts by stsadm command “Enumallwebs” and encounter the error “Invalid object name 'WebParts'”.

    About the cause of the error, I suppose that the content database and application are not the same version. It also could be SharePoint does not have the schema to support a table named "WebParts".

    You could check if there is a webparts table in the content database.

    You could follow troubleshooting steps:

    1. Detach and re-attach the content databases, then run the updates to check if it can work.

    2. Migrate the site collection to a new database, then run the updates to check if it can work.

    There are similar cases:

    http://www.networksteve.com/enterprise/topic.php/SharePoint_2013_WSS_Content_database_upgrade_failed/?TopicId=79231&Posts=1

    https://social.technet.microsoft.com/Forums/office/en-US/6b0d9707-6b1f-4115-bb05-4b66981918a9/enumallwebs-command-line-error?forum=sharepointadminlegacy  

    Best regards,

    Sara Fan


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.


    • Edited by Sara Fan Tuesday, April 28, 2015 7:36 AM
    Tuesday, April 28, 2015 7:33 AM
  • Hi Sara,

    Thanks for your reply.

    I contacted the DBA team and they were able to see the table called All webparts.

    i detached and remounted the databases and still i get the same message, you suggested to run the update, i was not able to understand that part (Please explain).

    Satyam

    Wednesday, April 29, 2015 2:23 PM
  • You need to migrate your sites to a new content database while the sites are on SharePoint 2010. Add a new Content Database to the SharePoint 2010 Web Application, then use Move-SPSite to move each Site Collection from the 'broken' Content Database to the new Content Database. You can then take that new Content Database and upgrade it on SharePoint 2013.

    Trevor Seward

    Follow or contact me at...

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Wednesday, April 29, 2015 2:37 PM
  • Trevor,

    Thanks for the reply.

    Before performing your suggested steps, i ran the same command (STSADM enumallwebs) on a different SharePoint2013 farm which has no migrated content databases, i still get the same message "Invalid object name 'WebParts'."

    Am i missing someting or doing something wrong.

    Satyam.


    Friday, May 1, 2015 8:20 PM
  • Yep, that is an invalid table name for SharePoint 2013 content databases. You need to get rid of that content database.

    Trevor Seward

    Follow or contact me at...

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Friday, May 1, 2015 8:22 PM
  • Trevor,

    But i get the same message to all the content databases on the SharePoint 2013 server, and these databases were not migrated they were created on SharePoint 2013 environment 

    Satyam

    Tuesday, May 5, 2015 3:21 PM
  • Hi Satyam,

    I also faced the same issue, when checked the content database of SP2013, there is no table called, "WebParts" but it has a table, "WebPartsLists".

    I think, the enumallwebs stsadm might be looking for a table, "WebParts" where is not there in SP2013 and stsadm commands are depreciated (just continued for backward compatibility/support) in SP2013.


    Thanks, Krishna

    Thursday, March 9, 2017 10:19 PM
  • Krishna, you are correct. -includewebparts is looking for the WebParts table. Here is the query it is trying to run.

    SELECT tp_WebPartTypeId, COUNT(1), tp_Assembly, tp_Class
        FROM WebParts (NOLOCK)
      JOIN AllDocs (NOLOCK) ON  WebParts.tp_PageUrlID = AllDocs.Id
    WHERE tp_SolutionId IS NULL AND tp_WebPartTypeId IS NOT NULL AND tp_SiteId = '{0}' AND WebId = '{1}'
    GROUP BY tp_WebPartTypeId, tp_Assembly, tp_Class

    You would also get the same error when using -includecustomlistview too, with the -enumallwebs function, as that is also looking for the WebParts table in the content database.

    Monday, March 13, 2017 10:56 PM
  • I verify what Satyam has experienced.  Here's what I execute on 2010:

    1. CD C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\BIN\
    2. echo ^<?xml version="1.0" encoding="ISO-8859-1"?^>  > "D:\temp\Report.xml"
    3. stsadm -o enumallwebs -databasename "[content database name]" -includefeatures -includewebparts -includeeventreceivers -includesetupfiles -includecustomlistview >> "D:\Report.xml"

    This completes successfully on 2010, and the extra command here gives me a nice XML file that I can easily view through a browser and search through.  However, on 2013, if I run that command, I get this message in the elevated DOS shell:

    • Invalid object name 'WebParts'.

    To get around that, just like Somu76 indicated, I had to leave out these two switches :

    • -includewebparts
    • -includecustomlistview

    Then the command completed successfully.

    I was not able to verify what Krishna Chaluvadi states regarding what tables are there for 2010 and 2013.  Reviewing the tables in any 2010 content database in one of our farms, I find these tables that specifically include the word "webparts":

    • AllWebParts
    • WebPartLists

    Looking at a 2013 content database in one of our farms, I find these tables that specifically include the word "WebParts":

    • AllWebParts
    • WebPartLists

    No changes.  I compared some other content databases and found the same thing: no changes from 2010 to 2013 for table names that include "WebParts". Therefore, it's not clear to me that the problem here lies with changes in content database table naming, since there didn't seem to be any.  Nor do I think this is a problem with content database corruption, since I can generate this error for any 2013 content database, whether it was migrated from 2010 or it was created directly on the 2013 farm via New-SPContentDatabase.  I did find a clue when I reviewed the output file generated by the enumallwebs command when it didn't complete.  The last line in the file is this:

    • "<WebParts"

    This maps to the error message pretty well.  Now, the elements in the output file do not map exactly to tables in the content database.  For example, there is a table "EventReceivers" in the content database, but the element in the output file that seems to correspond to this is "<EventReceiverAssemblies>".  So, there seems to be some internal mapping undertaken by stsadm -o enumallwebs -includewebparts, when it is running.  What it could be, I haven't a clue.  Maybe I made a mistake somewhere?  It would be great if a solution for this could be found since the stsadm -o -enumallwebs function generates an excellent file to help clean up server-side dependencies post-upgrade.


    Wednesday, July 25, 2018 6:04 PM