Tempdb 1 MDF file and 3 LDF file Can we get same file after server restart?
Hi Usually Temp db have 1 MDF file and 1 LDF file. My Question is If User added 2 LDF file then 1 MDF File and 3 LDF File in SQL Server So whether After system Restarted User 2 added LDF files existing or only default 1 MDF file and 1 LDF File would be there in SQL Server?
If you are asking whether the files (.mdf and .ldf [1,2,3....n]) will be present physically on disk, then in my opinion, answer is yes. But since this is for tempDB that you specifically ask, the file contents wont be the same in both files(.mdf and .ldf), as it was before system was restarted, as tempDB will be built from scratch post such an event. Thus, If you ask "Can we get same file (for tempDB) after server restart?" - Answer is no.
We have multiple tempdb data files and they certainly get recreated that way after a restart. I don't know about log files as we have only one. As far as I can see, there's no benefit in having more than one log file on a database unless you need more than the maximum file size ( see