Microsoft KB Archive/199038

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

Article ID: 199038

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q199038



BUG #: 16749



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 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a

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: kbbug kbfix KB199038

-

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

© Microsoft Corporation. All rights reserved.