Article ID: 817081 - Last Review: September 27, 2005 - Revision: 3.1 FIX: You receive an error message when you use the SQL-DMO BulkCopy object to import data into a SQL Server tableBug #: 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
(http://support.microsoft.com/kb/256986/
)
Description of the Microsoft Windows Registry On This PageSYMPTOMSYou 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'. CAUSEThis 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. RESOLUTIONService pack informationTo 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
(http://support.microsoft.com/kb/290211/
)
How to obtain the latest SQL Server 2000 service pack Hotfix informationThe 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 To disable updating statistics for BulkCopy, you may have to add the BCPNoUpdateStats registry entry at the following registry path: HKLM\Software\Microsoft\Microsoft SQL Server\80\Tools\DMO For additional information, see the "More Information" section.WORKAROUNDTo 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.
STATUSMicrosoft 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. MORE INFORMATIONWarning 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:
REFERENCES
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
299865
(http://support.microsoft.com/kb/299865/
)
FIX: DMO BulkCopy fails to copy data when column names contain the
space character
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
824684
(http://support.microsoft.com/kb/824684/
)
Description of the standard terminology that is used to describe
Microsoft software updates
| Article Translations
|
Back to the top
