July 14, 2005 at 12:15 pm
I am working on SQL Server 2000.
I created a local temporary table called #temp. I inserted some rows into this table. I stepped away for about 30 minutes. When I came back to run a query against this temporary table, #temp, I got a message saying that the table #temp is unavailable. I did not disconnect that query window or any for that matter - please advise.
Thank you,
July 14, 2005 at 12:19 pm
Try again. Start a tracem create the temp table then leave the table alone for 30 minutes. Then redo the query. If it fails go back to the trace to see where it was dropped. You'll probabely find that the connection got killed by QA or the server.
July 14, 2005 at 12:22 pm
How do I 'start a trace' and go back to it?
Please advise.
Thanks
July 14, 2005 at 12:35 pm
Start / all programs / ms sql server / profiler
Open a new trace on the server in question (don't start it just yet), then in QA run Select @@spid. Go back in the profiler, go under filters/spid, enter that number in equal.
Now start the trace, make a select statement in QA and make sure it registers in the trace, then you can start with the temp table test.
July 14, 2005 at 1:06 pm
Thank You for your quick reply Remi. I did exactly what you said. But was not very sure on how 'to make sure that it registers in the trace'. I have the SQL profiler with a message at the bottom of the screen saying 'Trace is running' - please advise if I need to do anything else.
Thank you,
July 14, 2005 at 1:21 pm
That's a good start. Now if you run select statement in query analyser you should see them added at the end of the list in the profiler.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply