Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message during database upgrade in Microsoft Dynamics SL: "Error 91: Object referenced not set to an instance of an object"


Symptoms

Consider the following scenario in Database Maintenance in Microsoft Dynamics SL:

  • You open the Database Maintenance (98.290.00) screen and then select the Update Databases tab.
  • You select the Microsoft Dynamics SL system database in the System Database Name box and then select all associated Microsoft Dynamics SL application databases in the Databases box.
  • You select the appropriate update scenario in the Update Scenarios box.
  • You click Begin Processing.
In this scenario, you receive the following error message:

Error 91: Object referenced not set to an instance of an object

↑ Back to the top


Cause

This problem occurs if a record exists in the Domain table of the Microsoft Dynamics SL system database that references a database name that no longer exists.

Additionally, this problem occurs if a record exists in the Domain table for a database that is not found in the databases collection because the database was not restored.

↑ Back to the top


Resolution

To resolve this issue, delete the invalid record from the Domain table in the Microsoft Dynamics SL system database by using SQL Server Management Studio. To do this, follow these steps.

Note Before you follow the instructions in this article, make sure that you have a complete backup copy of the database that you can restore if a problem occurs.


  1. Using Query Analyzer or SQL Server Management Studio, access the appropriate system database, and then run the following statement to identify the record that has the invalid Database Name:

    SELECT DATABASENAME, * from DOMAIN
  2. Review the results for any database names that no longer exist or that are currently not being upgraded.
  3. Confirm that this record is invalid, and then run the following statement to delete this record: 

    DELETE from DOMAIN where DatabaseName = 'XXXXXXXX' 
    --(replace XXXXXXXX with the invalid Database Name)


↑ Back to the top


Keywords: kbmbsmigrate, kbmbspartner, kbsurveynew, kbsolomon, kb

↑ Back to the top

Article Info
Article ID : 2405736
Revision : 1
Created on : 1/7/2017
Published on : 8/5/2011
Exists online : False
Views : 119