%ls WITH NO LOG is not valid at this time. Use sp_dboption to set the 'select into/bulk copy' option on for database '%.*ls'.
This error occurs upon executing either the UPDATETEXT or WRITETEXT statements, or either the dbupdatetext or dbwritetext routines in a database that does not have the sp_dboption system stored procedure’s select into/bulkcopy option enabled. Because these are nonlogged operations, the option must be enabled.
Often, UPDATETEXT, WRITETEXT, dbupdatetext, and dbwritetext are run against a temporary table. The select into/bulkcopy option must be enabled in tempdb, or these will not run successfully.
Enable the sp_dboption system stored procedure’s select into/bulkcopy option for all databases affected by the query that contains a nonlogged operation. To do this, the system administrator and database owners should follow these steps:
USE master
GO
sp_dboption database_name, 'select into/bulkcopy',true
GO
USE database_name
GO
CHECKPOINT
GO
sp_helpdb database_name
GO
Caution After executing a nonlogged operation, do not back up the transaction log. Although the procedure may appear to succeed, you may have been backing up only empty text pages. Whenever you make nonlogged changes to your database, you must use the BACKUP DATABASE statement, because changes made by the nonlogged operation cannot be recovered from transaction logs.
USE master
GO
sp_dboption database_name, 'select into/bulkcopy',false
GO
USE database_name
GO
CHECKPOINT
GO
sp_helpdb database_name
GO
Backing Up and Restoring Databases | Setting Database Options |
CHECKPOINT | sp_dboption |
dbupdatetext | sp_helpdb |
dbwritetext | UPDATETEXT |
Errors 7000-7999 | WRITETEXT |