问题描述
亲爱的朋友们,
请问有人告诉我为什么每次服务器重启时都会重新创建TempDB。
什么是这背后的实际原因,没有人说出确切的理由。我也无法在谷歌中找到相同的东西。
请告诉我们。 。 。 。 。
Regard's,
Thrilok。
Dear Friends,
Can u please anybody tell me that why TempDB Re-creates every time when server restarts.
What is the actual reason behind this, Nobody is telling exact reason. I am not able to find same thing in google also.
Please tell me guys . . . . .
Regard's,
Thrilok.
推荐答案
tempdb中的操作记录最少。这样可以回滚事务。 每次启动SQL Server时都会重新创建tempdb,以便系统始终以数据库的干净副本启动。临时表和存储过程在断开连接时自动删除,并且当连接时没有活动连接系统关闭。因此,tempdb中永远不会有任何内容从SQL Server的一个会话保存到另一个会话。 tempdb上不允许进行备份和恢复操作。
Operations within tempdb are minimally logged. This enables transactions to be rolled back. tempdb is re-created every time SQL Server is started so that the system always starts with a clean copy of the database. Temporary tables and stored procedures are dropped automatically on disconnect, and no connections are active when the system is shut down. Therefore, there is never anything in tempdb to be saved from one session of SQL Server to another. Backup and restore operations are not allowed on tempdb.
猜猜:google给了我这个...
And guess what: google gave me this...
这篇关于为什么每次服务器重启时都会重新创建TempDB。 。 。 。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!