错误解释 Explanation
SQL commands, such as Data Definition Language (DDL) commands, that are allowed in transactions only if the required database option (ddl in tran) is set to TRUE. SQL commands that are run across databases to create, alter or drop objects in another database, and are allowed in transactions only if the required database option (ddl in tran) is set to TRUE for that database.
Error 226 is a similar error that may be raised along with Error 2762. While Error 2762 typically involves commands that are run across databases, Error 226 is raised when the command affects only the local database. The following commands are never allowed in multi-statement transactions:
create database dbcc reindex, dbcc fix_text disk init drop database dump database, dump transaction load database, load transaction reconfigure select into set transaction isolation level truncate table update statistics
drop default, drop index, drop procedure, drop rule, drop table, drop trigger, drop view grant revoke
For Commands Involving tempdb Database 1> begin transaction The error is raised when ddl in tran is set to FALSE in tempdb. Use one of the following strategies to correct this error:
Execute the command outside a multi-statement transaction. Warning! Using data definition language commands on tempdb within transactions may cause concurrency problems in tempdb. Always leave ddl in tran set to FALSE in tempdb.
For Commands Not Involving tempdb Database Warning! Data definition language commands hold locks on system tables such as sysobjects and this can affect performance. Avoid using them inside transactions; if you must use them, keep the transactions short.
Additional information Versions in which this error is raised |
【转】 SELECT INTO command not allowed within multi-statement transaction
最新推荐文章于 2024-10-12 10:08:16 发布
SELECT INTO command not allowed within multi-statement transaction