[dba-SQLServer] SELECT INTO Versus CREATE #temp

Arthur Fuller fuller.artful at gmail.com
Fri Jul 18 16:30:50 CDT 2008


Something to consider. I'm still inspecting the previous code but I will
make sure to look for ## in the code.

We are still trying to figure out why U2 ended up with U1's data and it does
not happen consistently so this one is maybe going to take a while to
resolve.

Thanks,
Arthur

On Fri, Jul 18, 2008 at 6:17 PM, Francisco Tapia <fhtapia at gmail.com> wrote:

> Not at all, each execution of a sproc should be in it's own session. thus
> after the 2nd create table, you should be able to view the Temp Tables in
> the TempDB and see that you have #Asger000000000000000001 and
> #Asger000000000000000002 (or some such number).  I'm not sure why User 1
> would have User2's data unless you were createing ## temporary tables which
> expand beyond the current users' session.
>
>



More information about the dba-SQLServer mailing list