Author |
Topic |
InfraDBA
Starting Member
38 Posts |
Posted - 2011-01-09 : 09:13:30
|
Since each time SQL server gets restarted the data and log of tempDB is also newly created.Then where does TempDB gets its recovery information from? |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-01-09 : 09:21:12
|
Recovery information?--Gail ShawSQL Server MVP |
|
|
InfraDBA
Starting Member
38 Posts |
Posted - 2011-01-09 : 09:50:55
|
As far as I know recovery will consist roll forward and roll back to bring the database into consistent state.For this database needs a transaction log.How does it happen in case of TempDB. |
|
|
InfraDBA
Starting Member
38 Posts |
Posted - 2011-01-09 : 10:57:05
|
Please reply! |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-01-09 : 11:30:57
|
Please be patient! Bumping your post after an hour is just rude, especially considering it's a weekend. We're volunteers, we post in our spare time.TempDB doesn't need to be recovered, it's recreated completely when SQL starts. Nothing that was in there before the restart will remain afterwards.--Gail ShawSQL Server MVP |
|
|
InfraDBA
Starting Member
38 Posts |
Posted - 2011-01-09 : 23:24:50
|
Thank you so much.... |
|
|
InfraDBA
Starting Member
38 Posts |
Posted - 2011-01-10 : 11:44:38
|
I have one more confusion..when the statement hold good when you say tempdb allows only roll back not roll forward,when the statement hold good? |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-01-10 : 12:25:49
|
Sorry, don't understand what you're asking.--Gail ShawSQL Server MVP |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-01-10 : 12:57:35
|
There is no recovery phase for tempdb. It is recreated from scratch (with no user objects) every time SQL is restarted. Thus, no roll forward.The only rollback will occur if an explicit transaction is rolled back, or if the service is shutdown during a transaction. |
|
|
InfraDBA
Starting Member
38 Posts |
Posted - 2011-01-10 : 13:49:46
|
So even if we delete Tempdb log file it will come up without any issues? |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-01-10 : 13:58:08
|
Yes. But why would you do that? |
|
|
InfraDBA
Starting Member
38 Posts |
Posted - 2011-01-10 : 14:10:39
|
Just out of curiosity... |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-01-10 : 14:12:45
|
Sure, you can delete it (as long as the SQL Service isn't running), won't hurt anything. |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-01-10 : 14:35:55
|
Don't go randomly deleting database files out of curiosity (unless on an instance that you're happy to completely reinstall). You could break things beyond repair--Gail ShawSQL Server MVP |
|
|
InfraDBA
Starting Member
38 Posts |
Posted - 2011-01-10 : 14:42:45
|
well just asking in case of TempDB...:-) Thanks to all..... |
|
|
|