We've just found the issue.
The proc was being called from a proc which had set the isolation level to 0.
The definition of the table SystemLog is simple enough (just int's and varchar's).
On SP122 we get no issues and on SP132 we get the error.
Have I missed something in the new features list for SP132. Why is this feature useful ?
Try this..
create procedure LogSystem
( @SpName varchar(32),@Logtype char(1),@Message varchar(255), @Message2 varchar(255) = null )
as
begin
set transaction isolation level 0
insert into SystemLog
( Timestamp, SpName, NestLevel, Uid, Logtype, Hostname,
ProgramName, HostProcess, Ipaddr, Message, Message2
)
select getdate(), @SpName, @@nestlevel - 1, uid, @Logtype, hostname,
program_name, hostprocess, ipaddr, @Message, @Message2
from master..sysprocesses
where spid = @@spid
end