Microsoft KB Archive/915094

= How to roll back an upgrade from Microsoft Business Solutions CRM 1.2 to Microsoft Dynamics CRM 3.0 =

Article ID: 915094

Article Last Modified on 3/10/2006

-

APPLIES TO


 * Microsoft Dynamics CRM 3.0
 * Microsoft CRM 1.2

-





INTRODUCTION
This article describes how to do the following:
 * Determine whether an upgrade from Microsoft Business Solutions CRM version 1.2 to Microsoft Dynamics CRM version 3.0 has failed.
 * Successfully roll back the Microsoft CRM installation to a state where you can perform the upgrade again.

These two tasks are divided into the following five areas:
 * Prerequisites to roll back from a failed upgrade.
 * How to verify that the upgrade has failed.
 * How to uninstall the Microsoft CRM 3.0 binary components.
 * How to roll back the Microsoft CRM 3.0 databases to Microsoft CRM 1.2.
 * How to try the upgrade again or how to reinstall to existing databases.

Note In this article,  represents the name of a Microsoft CRM organization.



Prerequisites to roll back from a failed upgrade
 Try to upgrade only those supported Microsoft CRM 1.2 environments that are operating without problems. If you are experiencing problems in Microsoft CRM 1.2, contact a Microsoft support professional by submitting a support request. This procedure is described in the &quot;References&quot; section. The support professional will help you determine whether the problems must be resolved before you try to upgrade to Microsoft CRM 3.0. Perform the upgrade at a prearranged time to avoid unforeseen production outages. Create Microsoft SQL Server database backups for the following databases immediately before the upgrade:   _CRMCRYSTAL  _METABASE  _MSCRM</ul> </li> Review Chapter 20 of the Microsoft CRM 3.0 Implementation Guide for detailed information about the upgrade backups and about additional requirements. To obtain this guide, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyID=1ff067f8-4f77-40f0-ae9c-68ada7d4f16a&DisplayLang=en

</li></ul>

Note We recommend that you test a Microsoft CRM upgrade in a disconnected test environment by using the data from a Microsoft CRM 1.2 production environment. To do this, use the Microsoft CRM 1.2 Redeployment Tools. To obtain these tools, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyID=bfced393-61db-49af-9a50-4a90b311fa7d&DisplayLang=en

How to verify that the upgrade has failed
The upgrade has failed if one of the following conditions is true:
 * You receive a message that states that the upgrade &quot;Failed.&quot;
 * You receive multiple error messages. The final error message does not have a restart requirement check box.
 * You receive multiple error messages. The final error message contains a Finish button.

To verify the upgrade failure, examine the Crm30svrsetup.log file for failure messages. To do this, follow these steps:
 * 1) On the Microsoft CRM 3.0 server, start Windows Explorer. In the %userprofile%\Application data\Microsoft\MSCRM\Logs folder, locate the Crm30svrsetup.log file.
 * 2) Open the Crm30svrsetup.log file in Notepad.
 * 3) If the log file contains one of the following entries, the upgrade has failed:
 * 4) * Info| Microsoft CRM 3.0 Server Setup Failed
 * 5) * Info| Microsoft CRM 3.0 Server Setup Setup did not complete successfully

After you verify that the upgrade has failed, follow the steps that are listed in the next three sections.

How to uninstall the Microsoft CRM 3.0 binary components

 * 1) On the Microsoft CRM 3.0 server, click Control Panel.
 * 2) Double-click Add or Remove Programs, click Microsoft CRM Server, and then click Click here for support information to verify that the build is version 3.0.5300.0 or a later version.
 * 3) After you verify the build version, click Change/Remove to open the Microsoft CRM Server Maintenance window.
 * 4) Click the Uninstall option, and then click Uninstall to remove the Microsoft CRM 3.0 binary components.

How to roll back the Microsoft CRM databases to Microsoft CRM 1.2
First, restore the following three databases by using Microsoft CRM 1.2 database backups that were created before the failed upgrade:
 * _METABASE
 * _MSCRM
 * _CRMCRYSTAL

Note The CRMCRYSTAL database will not be listed as a Microsoft CRM 1.2 database. Restore CRMCRYSTAL as a new database.

For more information about how to restore databases, review the following topics in SQL Server Books Online:
 * Using File Backups
 * Files and Filegroups
 * Backing up and Restoring Databases

After you restore the databases, you must roll back the databases. To do this, follow these steps: <ol> Remove any components that have been created by replication and that are still in the databases. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> On the computer that is running SQL Server, click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.</li> In the Connect to SQL Server dialog box, connect to the SQL Server installation that contains the Microsoft CRM databases that were restored. Make sure that you log on as a SQL Server administrator.</li> On the toolbar drop-down list, click  _METABASE.</li> In the Command box, type the following statement:

SP_RemoveDBReplication ' _METABASE'

</li> Press F5 to run the statement, and then make sure that the statement runs successfully.</li> In the Command box, delete the previous statement. Replace the statement in step 1d with the CleanupRepl.sql script that is included in the &quot;More Information&quot; section, and then press F5.</li> Repeat steps 1c through 1f for the  _MSCRM database.</li></ol> </li> Verify that all the databases are restored. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> Click Start, point to All Programs, point to Microsoft SQL Server, and then click Enterprise Manager.</li> Expand the selections to locate the SQL Server installation that contains the Microsoft CRM databases.</li> Make sure that the following three databases are listed in this SQL Server installation: <ul>  _CRMCRYSTAL</li>  _METABASE</li>  _MSCRM</li></ul> </li> <li>If these databases are not listed, contact a Microsoft support professional by submitting a support request.</li></ol> </li></ol>

How to try the upgrade again or how to reinstall to existing databases
To try the upgrade again, follow these steps:
 * 1) Start Microsoft CRM 3.0, and then specify the organization name and the SQL Server installation.
 * 2) Click Existing databases. The installation code recognizes the earlier version, and then starts the upgrade.
 * 3) If you continue to experience upgrade problems, contact a Microsoft support professional.

To reinstall Microsoft CRM 1.2 to existing databases, follow these steps: <ol> <li>Start Microsoft CRM 1.2, click Use Existing Databases, and then specify the existing organization’s database.</li> <li>Select a Web server in the domain. The Microsoft CRM Web server must be in the same domain because Microsoft CRM 1.2 does not support the use of SQL Server installations and Web servers across domains.</li> <li>Restore the Crystal Reports filestore folder. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Click Start, point to Programs, point to Crystal Enterprise, and then click Crystal Configuration Manager.</li> <li>Start all services.</li></ol> </li></ol>

Important If you reinstall to existing databases, do not delete the Microsoft CRM organizational unit from the Active Directory directory service. If you do this, you use the procedures that are listed in this article. To recover a deleted organizational unit, you must restore a system state backup on the domain controller.

The CleanupRepl.sql script
--BEGIN SCRIPT-- if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ASReplicationObjects]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[ASReplicationObjects] GO CREATE TABLE ASReplicationObjects (           name sysname,            type char(2),             crdate datetime ) DECLARE @objectName sysname DECLARE @objectType sysname DECLARE @sqlStatement nvarchar(1024) DECLARE @sqlStatementBegin sysname DECLARE @sqlStatementAndType sysname DECLARE @sqlStatementDropTrigger sysname DECLARE @sqlStatementDropProcedure sysname DECLARE @sqlStatementDropView sysname DECLARE @sqlStatementDropTable sysname SET @sqlStatementBegin = N'IF EXISTS (SELECT name FROM sysobjects WHERE name = N SET @sqlStatementAndType = N AND type=N SET @sqlStatementDropTrigger = N) DROP TRIGGER ' SET @sqlStatementDropProcedure = N) DROP PROCEDURE ' SET @sqlStatementDropView = N) DROP VIEW ' SET @sqlStatementDropTable = N''') DROP TABLE ' -- Delete triggers          SET @objectType = N'TR' insert into ASReplicationObjects select name, type, crdate from sysobjects where (type=@objectType)  and             (name like N'del_%' or name like N'ins_%'  or name like N'upd_%' )             order by name select count(*) from ASReplicationObjects as CountTriggers  -- debug DECLARE trigger_cursor CURSOR FOR SELECT name FROM ASReplicationObjects WHERE type = @objectType OPEN trigger_cursor FETCH NEXT FROM trigger_cursor INTO @objectName WHILE @@FETCH_STATUS = 0 BEGIN   SET @sqlStatement =            @sqlStatementBegin + @objectName + @sqlStatementAndType +@objectType + @sqlStatementDropTrigger + @objectName   PRINT @sqlStatement   EXEC sp_executesql @stmt = @sqlStatement   FETCH NEXT FROM trigger_cursor INTO @objectName END CLOSE trigger_cursor DEALLOCATE trigger_cursor DELETE ASReplicationObjects -- Delete stored procedures SET @objectType = N'P' insert into ASReplicationObjects select name, type, crdate from sysobjects where (type =@objectType) and (name like N'sp_cft_%' or name like N'sp_ins_%' or name like N'sp_sel_%' or name like N'sp_upd_%' or name like N'sel_%') order by name select count(*) from ASReplicationObjects as CountStoredProcedures_cft_ins_sel_upd  -- debug DECLARE storproc_cursor CURSOR FOR SELECT name FROM ASReplicationObjects WHERE type = @objectType OPEN storproc_cursor FETCH NEXT FROM storproc_cursor INTO @objectName WHILE @@FETCH_STATUS = 0 BEGIN SET @sqlStatement =           @sqlStatementBegin + @objectName + @sqlStatementAndType +@objectType + @sqlStatementDropProcedure + @objectName PRINT @sqlStatement EXEC sp_executesql @stmt = @sqlStatement FETCH NEXT FROM storproc_cursor INTO @objectName END CLOSE storproc_cursor DEALLOCATE storproc_cursor DELETE ASReplicationObjects -- delete sp like %xpand_%. 53 sp for each Replication setup. - Done below SET @objectType = N'P' insert into ASReplicationObjects select name, type, crdate from sysobjects where (type =@objectType) and (name like N'%xpand_%' or name like N'%p_cft_%') order by name select count(*) from ASReplicationObjects as CountStoredProceduresLikeExpand -- debug DECLARE storproc_cursor2 CURSOR FOR SELECT name FROM ASReplicationObjects WHERE type = @objectType OPEN storproc_cursor2 FETCH NEXT FROM storproc_cursor2 INTO @objectName WHILE @@FETCH_STATUS = 0 BEGIN SET @sqlStatement =           @sqlStatementBegin + @objectName + @sqlStatementAndType +@objectType + @sqlStatementDropProcedure + @objectName PRINT @sqlStatement EXEC sp_executesql @stmt = @sqlStatement FETCH NEXT FROM storproc_cursor2 INTO @objectName END CLOSE storproc_cursor2 DEALLOCATE storproc_cursor2 DELETE ASReplicationObjects -- Delete views SET @objectType = N'V' insert into ASReplicationObjects select name, type, crdate from sysobjects where (type='V') and (name like N'ctsv_%' or name like N'tsvw_%' ) order by name select count(*) from ASReplicationObjects as CountViews -- debug DECLARE view_cursor CURSOR FOR SELECT name FROM ASReplicationObjects WHERE type = @objectType OPEN view_cursor FETCH NEXT FROM view_cursor INTO @objectName WHILE @@FETCH_STATUS = 0 BEGIN SET @sqlStatement =           @sqlStatementBegin + @objectName + @sqlStatementAndType +@objectType + @sqlStatementDropView + @objectName PRINT @sqlStatement EXEC sp_executesql @stmt = @sqlStatement FETCH NEXT FROM view_cursor INTO @objectName END CLOSE view_cursor DEALLOCATE view_cursor DELETE ASReplicationObjects -- Delete tables SET @objectType = N'U' insert into ASReplicationObjects select name, type, crdate from sysobjects where (type='U') and (name like N'%onflict_%' ) order by name select count(*) from ASReplicationObjects as CountTables -- debug DECLARE table_cursor CURSOR FOR SELECT name FROM ASReplicationObjects WHERE type = @objectType OPEN table_cursor FETCH NEXT FROM table_cursor INTO @objectName WHILE @@FETCH_STATUS = 0 BEGIN -- &quot;-&quot; in table name has a syntax problem, therefore, add [] around table name SET @sqlStatement =           @sqlStatementBegin + @objectName + @sqlStatementAndType +@objectType + @sqlStatementDropTable + N'['+@objectName + N']' PRINT @sqlStatement EXEC sp_executesql @stmt = @sqlStatement FETCH NEXT FROM table_cursor INTO @objectName END CLOSE table_cursor DEALLOCATE table_cursor DELETE ASReplicationObjects DROP TABLE ASReplicationObjects --END SCRIPT--

<div class="references_section">

Customers
Microsoft Business Solutions customers who are on the Enhancement plan or who are on a service plan can visit CustomerSource to submit a new support request. To do this, visit the following Microsoft Business Solutions Web site:

https://mbs.microsoft.com/customersource

Type your security key to gain access to the site. Click the Support link to visit the Support page. Under Support, click New Support Requests.

Business Solutions Partners
Certified Microsoft Business Solutions partners can visit PartnerSource to submit a new support request. To do this, visit the following Microsoft Business Solutions Web site:

https://mbs.microsoft.com/partnersource

Type your security key to gain access to the site. On the PartnerSource home page, click the Support link under Resources, and then click New Support Request.

General Information
Microsoft Business Solutions customers who are not on plans and other Microsoft partners can submit support requests and can review their support options on the Microsoft Support Web site. To do this, visit the following Microsoft Web site:

http://support.microsoft.com

Keywords: kbhowto kbmbsmigrate kbmbsinstallation kbmbsupgrade kbmbsredeploymenttool KB915094

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.