Error 268
Severity Level 16
Message Text
Cannot run SELECT INTO in this database. The database owner must run sp_dboption to enable this option.
Explanation
This error occurs when an attempt to use the SELECT INTO statement has not been permitted because the select into/bulkcopy database option is not enabled for this database. The database owner must turn on the select into/bulkcopy database option before the SELECT INTO statement can be completed successfully.
This error can also be triggered by stored procedures.
Caution Enabling the select into/bulkcopy database option permits nonlogged operations to take place. Have a specific backup strategy in place to ensure data integrity after nonlogged operations have been performed. A transaction log cannot be backed up after a nonlogged operation. Use the BACKUP DATABASE statement after nonlogged operations have been performed.
Action
The database owner or system administrator must use the sp_dboption system stored procedure to enable the select into/bulkcopy database option. For example, for the pubs database, you would use the osql command prompt utility to perform the following steps:
- Switch to the master database and set the database option for the Northwind database. Type:
USE master GO sp_dboption Northwind, 'select into/bulkcopy', true GO USE Northwind GO CHECKPOINT GO
- Verify that the change has taken place correctly. Execute the sp_helpdb system stored procedure on Northwind. The status result column should show the select into/bulkcopy database option as enabled. Type:
sp_helpdb Northwind GO
You may want to review information about the bcp Utility and SELECT INTO statement. For more information, see the SELECT and bcp Utility. In some cases, bcp is a logged operation that can affect your backup strategy and transaction log backup frequency.