Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Temp tables

Author  Topic 

chai1836
Starting Member

2 Posts

Posted - 2004-08-12 : 11:14:07
Where are temp tables stored? Is there a way that I can see a temp table (@temp, #temp, ##temp any of these) in enterprise manager like I would see regular tables?

TIA.

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2004-08-12 : 11:19:46
They are stored in tempdb.
You can see which exist by querying the sysobjects table in tempdb

[CODE]
select * from tempdb.dbo.sysobjects where name like '#%'
[/CODE]

Duane.
Go to Top of Page

chai1836
Starting Member

2 Posts

Posted - 2004-08-12 : 11:29:23
Thank you very much!
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2004-08-12 : 14:16:10
@temp however are stored in memory so they woun't show up...they are only accessible within the scope of the transaction. And they are not written to disk so they are usually alot faster than normal temp-tables...

--
Lumbago
"Real programmers don't document, if it was hard to write it should be hard to understand"
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-08-12 : 14:57:28
If your recordsets are under 10k rows and you don't need indexes.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -