Re: Renaming temporary tables terminated connection. Session 1:
create table #mytable ( col int);
sp_rename #mytable, XYZ
select * from XYZ // Works fine
Session 2:
Use tempdb;
select * from XYZ // Works fine
Session 1:
select * from #mytable //the SQL connection terminates
And i got the stack trace. |