Hi, I would like to know, during what occasions tempdb database is re-created or when the objects in them will be dropped out. In books online, it is mentioned that tempdb is re-created duirng sql server startup. It is fine. We found that objects in tempdb disappeared before we stoped and restarted the sql server service. Hence, I would like to know whether it will be cleared out at some other occasion as well, please help, thank you. Regards, Deva
Hi,<br />AFAIK it only refresh / re-createed only when you stops / restart sql server services .<br /><br /><img src='/community/emoticons/emotion-1.gif' alt='' /><br />Regards<br /><br />Hemantgiri S. Goswami<br />ghemant@gmail.com<br />"Humans don't have Caliber to PASS TIME , Time it self Pass or Fail Humans" - by Hemantgiri S. Goswami<br />
hi Deva, tempdb is created while server start up. But the temporary objects are created as per the user or application request at runtime. This wil be elimiated soon after the session is over, it won't wait till you restart the SQL Service restarts. -Johnson
http://www.windowsitpro.com/SQLServer/Article/ArticleID/39158/39158.html http://www.windowsitpro.com/Article/ArticleID/14156/14156.html /... to remember about more information on tempdb when SQL restarted. Satya SKJ Contributing Editor & Forums Moderator http://www.SQL-Server-Performance.Com This posting is provided “AS IS†with no rights for the sake of knowledge sharing.
I found something strange or good, I have changed my tempdb into 4GB (coz, it was my highest size of my tempdb in last siz months) and I tried to restart the services after changing the size manualy and it was shown as 4GB only instead of its default 8 MB after the service restarted. How come it happened? In all documentation it says, it will go to its default 8MB when you restart the SQL Server Services. -Johnson
Hi,<br />is their something in SQL ERROR LOG or in Windows Event Viewer ? <br /><br /><img src='/community/emoticons/emotion-1.gif' alt='' /><br />Regards<br /><br />Hemantgiri S. Goswami<br />ghemant@gmail.com<br />"Humans don't have Caliber to PASS TIME , Time it self Pass or Fail Humans" - by Hemantgiri S. Goswami<br />
Hi, Thank you all of you, even I am able to access the temporary tables only from the session where we create it and not from any other sessions. I don't have answer for your questions johnson, sorry. Regards, Deva
Hemant, No log related to this in the SQL Server Logs. Clearing tempdb database. Starting up database 'tempdb'. These are the messages related to tempdb. Deva: You can only access the temporary tables only from the session where you have created that. You can not refer those tables from any other sessions. -Johnson
Hi, but it should be back to its initial size , its strange ! Hemantgiri S. Goswami ghemant@gmail.com "Humans don't have Caliber to PASS TIME , Time it self Pass or Fail Humans" - by Hemantgiri S. Goswami
Yes, its strange, I have tried it in two servers, one is my test server, and I got a chance to do it in my Production too, We had to shutdown our production server(Active/Passive Cluster in Win2k Advanced Server with Wind2k SP4 and SQL2KEnt SP3a) yesterday night for Electrical maintenance. Soon after that, I checked in my Production server too. It was showing 4GB as it was earlier which I have set manualy. But when I did it in my personal computer with personal edition, the size of tempdb shrunk into 8mb. -Johnson