Error 7130

Severity

16

Message text

WRITETEXT with no log is not valid at this time. Database %s must first be configured for this.

Explanation

This error occurs when you try to execute the writetext command or dbwritetext routine in a database which does not have the sp_dboption option select into/bulkcopy enabled. Because these operations do not log the changes to your data, the option must be enabled.

Often, writetext and dbwritetext run against a temporary table. The select into/bulkcopy option must be enabled in tempdb before these will run successfully.

Action

Enable the sp_dboption option select into/bulkcopy on all databases affected by the writetext just before you perform this nonlogged operation. To do this, the System Administrator or Database Owner can use the following steps:

  1. Enable the option using this procedure:

    1> use master 
    2> go
    

    1> sp_dboption <database_name>, 
    2> "select into/bulkcopy", true
    3> go
    
  2. To verify that the change is active, enter:

    1> sp_helpdb <database_name> 
    2> go
    
  3. Execute the nonlogged operation.

  4. When the nonlogged operation is complete, dump the database using normal system administration procedures.

  5. Return the database to its original condition by disabling the select into/bulkcopy option:

    1> use master 
    2> go
    

    1> sp_dboption <database_name>, 
    2> "select into/bulkcopy", false
    3> go
    

    Repeat step 2 above if you want to verify that the change is active.

Additional information

Refer to “writetext” in the Reference Manual: Commands and to “dbwritetext” in the “Routines” chapter of the Open Client DB-Library Reference Manual.

For more information about database dumps and recoverability, refer to “Developing a Backup and Recovery Plan” in the System Administration Guide: Volume 2.

Versions in which this error is raised

All versions