Microsoft KB Archive/321456

= PRB: SQL 6.5 Upgrade Results in Errors 4850 and 4851 =

Article ID: 321456

Article Last Modified on 11/14/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q321456



SYMPTOMS
When you perform a one computer or two computer upgrade by using the Microsoft SQL Server Upgrade Wizard from SQL Server 6.5 to SQL Server 7.0 or to SQL Server 2000, you may receive one of the following error messages:

Msg 4850, Level 0, State 1, Server Server1, Procedure, Line 1 Data import: Table 'table1' is already locked by another user.

-or-

Msg 4851, Level 0, State 1, Server Server1, Procedure, Line 1 Data import: Table 'table1' already has data. Skipping to next table.

These errors are written to one of the log files that are created during the upgrade. The name of the log file depends on the database name and ID. The log file typically contains the following text where  is the database ID and   is the name of the database being upgraded:

IMPORT EXPORT VIA NAMED PIPES - 0 .OUT



CAUSE
These errors may occur for serveral reasons, some of which are as follows:
 * 1) There are consistency errors present in the SQL Server 6.5 table that prompt the Upgrade Wizard to skip some tables and to place this message into the upgrade log.
 * 2) The SQL Server 6.5 database is being upgraded to a SQL Server 7.0 (or to a SQL Server SQL Server 2000) database that already has some of the tables that are created and populated before the upgrade started.
 * 3) These errors may also occur if you perform the upgrade on a symmetric multiprocessing computer. Under certain circumstances, Upgrade Wizard might start several threads to transfer the same table. The first thread that reaches SQL Server 7.0 (or SQL Server 2000) creates the table, and then starts populating the table with data. The other threads place one of these messages in the upgrade log file, and then continues to transfer other tables.



RESOLUTION
To resolve this behavior, follow these steps:
 * 1) Run DBCC CHECKDB and NEWALLOC on the SQL Server 6.5 database (or databases). Additionally, perform DBCC CHECKDB on the SQL Server 7.0 (or SQL Server 2000) database (or databases). If these checks report no errors, proceed to step 2. If the checks report errors on SQL Server 6.5, correct these errors as appropriate, and then perform the upgrade again. If these checks report errors on SQL Server 7.0 (or SQL Server 2000), correct the errors as appropriate, and then proceed to Step 2.
 * 2) Perform a rowcount comparison on the source and destination tables, and then verify that all rows were transferred as part of the upgrade. If rowcounts from the source and destination tables are the same, you can conclude that the upgrade was successful.



MORE INFORMATION
Before you try to upgrade SQL Server 6.5 databases to SQL Server 7.0 or to SQL Server 2000, there are certain prerequisite steps which you can read about in the following white paper:

SQL Server 2000 Upgrade Whitepaper

You must address all the steps that are described in the &quot;Preparing to Upgrade from SQL Server 6.5&quot; section in this white paper before you start the Upgrade Wizard. The prerequisites are the same for an upgrade to both SQL Server 7.0 and to SQL Server 2000.

For additional information about an upgrade from SQL Server 6.5, click the article numbers below to view the articles in the Microsoft Knowledge Base:

302850 PRB: Upgrade from SQL Server 6.5 Fails During Import and Export Step

261334 INF: FAQs - SQL Server 2000 - Upgrade

Keywords: kbprb KB321456

-

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

© Microsoft Corporation. All rights reserved.