I am testing sql server 2005 in different disaster situations happened under 2000. I was reading a lot about no update on system tables, so:
sp_detach_db 'tempdb'
In sql 2000 i could issue something like the following command to recover:
use mastersp_configure
'allow updates', 1reconfigure
with overridego
insert
sys.sysdatabases (name, dbid, sid, mode, status, status2, crdate, reserved, category, cmptlevel, filename, version)values
('tempdb', 2, 0x01, 0, 8, 1090520064, '2007-01-27 13:03:10.873', '1900-01-01 00:00:00.000', 0, '90', 'D:\beep\mssql\temp\tempdb.mdf', 611)go
sp_configure 'allow updates', 0
reconfigure
with overridego
As tempdb is hardcoded db id 2, I do not have a chance to recover without a master backup.
Of course, this situation can be recovered using a master backup, but it is not always available.
Thank you for your comments.