How about
Error Message:
Msg 6115, Level 16, State 1, Line 1
KILL command cannot be used inside user transactions.?
Or this one:
The DROP DATABASE statement must run in autocommit mode and is not allowed in an explicit or implicit transaction.
Also
The BACKUP statement is not allowed in an explicit or implicit transaction.
I found this today in BOL:
"You can use all Transact-SQL statements in an explicit transaction, except for the following statements:
ALTER DATABASE
DROP DATABASE
ALTER FULLTEXT CATALOG
DROP FULLTEXT CATALOG
ALTER FULLTEXT INDEX
DROP FULLTEXT INDEX
BACKUP
RECONFIGURE
CREATE DATABASE
RESTORE
CREATE FULLTEXT CATALOG
UPDATE STATISTICS
CREATE FULLTEXT INDEX
You also cannot use the following:
Full-text system stored procedures in an explicit transaction. For more information, see Full-Text Search Stored Procedures (Transact-SQL).
sp_dboption to set database options or use any system procedures that modify the master database inside explicit or implicit transactions."
Ref:
SQL Server 2008 Books Online (July 2009)
Transact-SQL Statements Allowed in Transactions
Thanks, Carlosdl.
This is the document that I was interested in.
It does not seem to be complete though:
c:1>sqlcmd -Sigorinspironsqlexpress -E
1> begin tran kill 51 rollback
2> go
Msg 6115, Level 16, State 1, Server IGORINSPIRONSQLEXPRESS, Line 1
KILL command cannot be used inside user transactions.
This a question to BOL authors, I know.
Sincerely,
--Igor
Discuss This Question: 3  Replies