Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

TempDB Files gone missing... Expand / Collapse
Author
Message
Posted Monday, November 25, 2013 3:15 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 13, 2014 12:46 PM
Points: 3, Visits: 14
I had an issue a few weeks back that we have gotten past, however I still do not know the reason for why it happened and I am hoping someone can help me shed some light on it....

I was in the process of migrating a server from one physical box to another. They are identical drive setups, same OS (2003), same SQL install (2005). Our server team did a 'PlateSpin', which copies the drives from one server to another, as long as the files are not in use. I did not reinstall SQL on the new box, i let the 'PlateSpin' tool copy everything over for me. I then stopped the SQL services on the old server and new server and copied over all of the system database (.mdf & .ldf) files. As soon as i started up the services on the new server, it looked great with one exception. The TempDB was only showing one datafile. When i queried sys.master_files, it was showing me 8 TempDB files. I tried restarting the services, but i still saw the same, only 1 file. I then tried to re-add TempDB files with the same name, but it would error saying they already existed. In turn, i could add new files with different names and they showed up fine. However, on a restart, they would not show up in the properties of the TempDB.
When i queried, sys.master_files again, i now had 16 Temp db files listed in the results. I deleted all but the original single file that was recognized out of the sys.master_files table and re-added the additional 7 files with he original names, restarted the service and then they all appeared.

In all, this is not really an issue I am having, I am just looking to see if anyone can give me a reason as to why this was happening. Hopefully this is understandable...
Post #1517484
Posted Tuesday, November 26, 2013 4:33 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 4:03 PM
Points: 2,564, Visits: 2,192
I had a similar issue on SQL 2008 R2 just recently when we lost the tempdb disk (well, actually, the drive letter changed). In our config we have 8 tempdb files. I had to start the instance in maintenance mode and change the paths of the tempdb files to the new drive letter but it only allowed me to change the main data and log file. When the instance started, tempdb.sys.database_files showed 2 files but the sys.master_files showed 8 files. I had to drop the additional 6 files (couldn't do anything else with them) and add them again.

I know it's not the same version as you but it is a similar scenario. I think SQL defaulted back to 2 tempdb files somehow when it restarted but the meta data about the files didn't get updated in the system views.
Post #1517603
Posted Wednesday, November 27, 2013 10:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 13, 2014 12:46 PM
Points: 3, Visits: 14
That actually sounds very similar. There must be a simple answer or explanation... Sounds like we both got around it, I was just curious for the cause.
Post #1518137
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse