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.

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


View products that this article applies to.

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, Adventure_Works_Cycle represents the name of a Microsoft CRM organization.

↑ Back to the top


More information

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 "References" 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:
    • Adventure_Works_Cycle_CRMCRYSTAL
    • Adventure_Works_Cycle_METABASE
    • Adventure_Works_Cycle_MSCRM
  • 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:
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:

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 "Failed."
  • 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:
    • Info| Microsoft CRM 3.0 Server Setup Failed
    • 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:
  • Adventure_Works_Cycle_METABASE
  • Adventure_Works_Cycle_MSCRM
  • Adventure_Works_Cycle_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:
  1. Remove any components that have been created by replication and that are still in the databases. To do this, follow these steps:
    1. On the computer that is running SQL Server, click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.
    2. 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.
    3. On the toolbar drop-down list, click Adventure_Works_Cycle_METABASE.
    4. In the Command box, type the following statement:
      SP_RemoveDBReplication 'Adventure_Works_Cycle_METABASE'
    5. Press F5 to run the statement, and then make sure that the statement runs successfully.
    6. In the Command box, delete the previous statement. Replace the statement in step 1d with the CleanupRepl.sql script that is included in the "More Information" section, and then press F5.
    7. Repeat steps 1c through 1f for the Adventure_Works_Cycle_MSCRM database.
  2. Verify that all the databases are restored. To do this, follow these steps:
    1. Click Start, point to All Programs, point to Microsoft SQL Server, and then click Enterprise Manager.
    2. Expand the selections to locate the SQL Server installation that contains the Microsoft CRM databases.
    3. Make sure that the following three databases are listed in this SQL Server installation:
      • Adventure_Works_Cycle_CRMCRYSTAL
      • Adventure_Works_Cycle_METABASE
      • Adventure_Works_Cycle_MSCRM
    4. If these databases are not listed, contact a Microsoft support professional by submitting a support request.

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:
  1. Start Microsoft CRM 1.2, click Use Existing Databases, and then specify the existing organization�s database.
  2. 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.
  3. Restore the Crystal Reports filestore folder. To do this, follow these steps:
    1. Click Start, point to Programs, point to Crystal Enterprise, and then click Crystal Configuration Manager.
    2. Start all services.
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
   -- "-" 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--

↑ Back to the top


References

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: 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: 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:

↑ Back to the top


Keywords: KB915094, kbmbsredeploymenttool, kbmbsupgrade, kbmbsinstallation, kbmbsmigrate, kbhowto

↑ Back to the top

Article Info
Article ID : 915094
Revision : 3
Created on : 3/10/2006
Published on : 3/10/2006
Exists online : False
Views : 436