Error 268

Severity Level 16

Message Text

You can't run SELECT INTO in this database. Please check with the Database Owner.

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. For example, sp_help selects into temporary tables that belong in tempdb. If the select into/bulkcopy database option is not enabled for tempdb, this error will occur.

Note Enabling the select into/bulkcopy database option permits non-logged operations to take place. Use caution when enabling this option. You should have a specific backup strategy in place to ensure data integrity after non-logged operations have been performed. You cannot dump a transaction log after a non-logged operation. You must use the dump database statement after non-logged 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 isql command-line utility to perform the following steps:

  1. Switch to the master database and set the database option for the pubs database. Type:
    use master
    go
    sp_dboption pubs, 'select into/bulkcopy', true
    go
    use pubs
    go
    checkpoint
    go
  2. Verify that the change has taken place correctly. Execute the sp_helpdb system stored procedure on pubs. The status result column should show the select into/bulkcopy database option as enabled. Type:
    sp_helpdb pubs
    go

You may want to review information about the bcp utility and select into statement. For details, see the and the Microsoft SQL Server Transact-SQL Reference. In some cases, bcp is a logged operation that can affect your backup strategy and transaction log dumping frequency.