FIX: Err 7130 Reports Incorrect Database for Cross-DB Writetext

ID: Q199038


The information in this article applies to:


SYMPTOMS

If you execute a cross-database WRITETEXT statement or DBWRITETEXT routine and the database does not have the SELECT INTO/Bulk Copy option enabled, you will receive error 7130. The error message is a valid one; however, it reports the problem in the user's current database, rather than the database the table is in.


CAUSE

The WRITETEXT statement and DBWRITETEXT routine are typically not logged so that the transaction log will not fill up with the large amount of data that often make up the TEXT datatype. Because these operations are not logged, the SELECT INTO/Bulk Copy option must be enabled for the database. SQL Server checks to make sure this option is enabled in the database; if it is not enabled, message 7130 is returned. However, when you receive error 7130, the error message reports the problem as being in the user's database rather than the database that contains the target table.


WORKAROUND

To work around this problem, carefully analyze the query to determine which database contains the TEXT table in question. Enable the SELECT INTO/Bulk Copy option for that database, either by using SQL Enterprise Manager or by using the sp_dboption stored procedure. For more information on using sp_dboption to set database options, see the "sp_dboption System Stored Procedure" topic in the SQL Server 6.5 Books Online.


STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5. This problem has been corrected in U.S. Service Pack 5a for Microsoft SQL Server version 6.5. For information about downloading and installing the latest SQL Server Service Pack, see http://support.microsoft.com/support/sql/.

For more information, contact your primary support provider.


MORE INFORMATION

For more information on error 7130, see the "Error 7130" topic in the SQL Server 6.5 Books Online.

This problem does not occur in SQL Server 7.0.

Additional query words: db err msg message bulkcopy


Keywords          : kbbug6.50 kbSQLServ650bug kbfix6.50.SP5 
Version           : winnt:6.5
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: May 4, 1999