Question about active temp tables
i have been experiencing issues running queries on our sql server. i've been getting linked server null errors when using opendatasource open , import excel file. long story short, has been happening quite time, has gotten worse of late. so, i'm checking more.
while looking through performance counters, noticed following counter says there 24 active temp tables.
sqlserver:general statistics:active temp tables = 24
so, ran following query @ these temp tables.
select *
from tempdb..sysobjects
where name '#%'
it of course listed 24 temp tables. had hexadecimal names starting temp table # sign. xtype = 'u' , had crdates spanning 5 days ago through today. refdate same crdate in cases.
basically i'm wondering 3 things.
- is odd have many (24) active temp tables?
- can remove these safely?
- how tell process or script created these?
also, there reference how use system monitor , performance monitor diagnose problems? instance, learning locks. how many locks good/bad. when lock bad , makes way? when scanning on tools problems might exist (certain counters high, dates old, etc.)?
thanks in advance!
nathon dalton
nathon dalton
software developer
systems administrator
network administrator
blog: http://nathondalton.wordpress.com
50000874 | when stored procedure runs outside explicit transaction, temporary table in stored procedure not cleaned correctly. |
jonathan kehayias
http://sqlblog.com/blogs/jonathan_kehayias/
http://www.twitter.com/sqlsarg
http://www.sqlclr.net/
please click mark answer button if post solves problem!
SQL Server > SQL Server Database Engine
Comments
Post a Comment