This section describes errors for the Bulk Copy Utility (bcp).
20
Bulk_main: opentable on BULK INSERT table failed. Dbid=%d name=’%.*s’.
Error 4801 is raised when you attempt to bulk copy data into a table, but bcp is unable to locate the target table.
Possible causes include:
a bcp syntax error
more than one session attempting to bcp into the same table
the target table was deleted or renamed by a concurrent user
Check the syntax of your bcp in command and the target table named in the command.
Check that the target table exists, and that no other user is attempting to bulk copy to the table.
If you are making a substantial change, such as loading a large number of tables, you may need to increase the number of open objects configuration parameter. See the System Administration Guide for details.
All versions
16
You cannot run the non-logged version of bulk copy in this database. Please check with the DBO.
This error occurs when the select/into bulkcopy option is set to false and you use “fast” bulk copy into a table that has no indexes.
By default, the select into/bulkcopy option in newly created databases is set to the same as that in model.
You have the following options for recovering from this error.
Use the sp_dboption stored procedure to set the select into/ bulkcopy option to true:
1> sp_dboption database_name, 2> "select into/bulkcopy", true 3> go
1> use database_name 2> go
1> checkpoint 2> go
Once a minimally logged operation such as “fast” bulk copy runs in the database, you are not allowed to dump the transaction log to a device, because unlogged changes are not recoverable. Instead, you should do a dump database as soon as possible to restore recoverability and allow transaction dumps to devices again.
Put an index on the table you are trying to copy into. This causes inserts to be logged.
When you copy into a table that has indexes, a slower version of bcp is automatically used. The slow version, which does log data inserts in the transaction log, can cause the transaction log to become very large. You may need to use dump transaction with truncate_only until you can perform a full database dump. If you must do this, you will lose the ability to recover up-to-the-minute changes in data in case of a media failure. You may also consider using smaller bcp batch sizes.
All versions