This article has been archived. It is offered "as is" and will no longer be updated.
Bug #: 469152 (SQL Server 8.0)
Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
You programmatically connect to an instance of Microsoft SQL Server 2000 as a user who is not a member of the sysadmin fixed server role or of the db_owner fixed database role, and then you use the SQL Distributed Management Objects (SQL-DMO) BulkCopy object to import data into a SQL Server table. After you do so, you may receive an error message that is similar to the following:
Server: Msg 3704, Level 16, State 1, Line 1 User does not have permission to perform this operation on table 'Table Name'.
Server: Msg 3704, Level 16, State 1, Line 1 User does not have permission to perform this operation on index 'Index Name'.
This problem occurs because the bulk copy operation that is initiated by the SQL-DMO BulkCopy object tries to update the statistics for the SQL Server table. However, to run the Update Statistics command, the current user must have system administrator (sysadmin) permissions or database owner (db_owner) permissions.
Service pack information
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
290211 How to obtain the latest SQL Server 2000 service pack
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name -------------------------------------------------------------- 17-Mar-2003 07:38 2000.80.790.0 4,215,360 Sqldmo.dll
Notes Because of file dependencies, the most recent hotfix or feature that contains these files may also contain additional files. To disable updating statistics for BulkCopy, you may have to add the
For additional information, see the "More Information" section.
To work around this problem, you can use another method to perform the bulk copy operation, such as the bcp utility, the BULK INSERT Transact-SQL statement, or a DTS package.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
This problem does not occur in the earlier versions of SQL Server 2000.This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
This fix works with a DWORD registry entry, BCPNoUpdateStats. If you turn on BCPNoUpdateStats, the automatic Update Statistics command is disabled when you import data. To add and to turn on the BCPNoUpdateStats registry entry, follow these steps: