file in sysaltfiles not in sysfiles??

Last Post 21 Apr 2011 07:37 PM by yupsay. 9 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
oshaw
New Member
New Member

--
25 Sep 2007 08:20 AM
There are tempdb files in sysaltfiles that do not appear in sysfiles. I cannot issue the "Alter database name Remove..." command because I get the message ... the file does not exist. How can I get rid of these files?? Fortunately, this is my test environment.

Thank You
oshaw
New Member
New Member

--
26 Sep 2007 05:12 AM
Somewhat, the file was create when I attempted to add datafiles to the test server (tempdb) using Enterprise manager and the files were added by not completely?? The extra files appear in the sysaltfiles table but not the sysfiles table.
oshaw
New Member
New Member

--
26 Sep 2007 07:28 AM
I looked at sysfiles in the tempdb table - 2 files existed. I also looked at sysaltfiles in the master database where more than 2 files existed with the DBID of tempdb??
oshaw
New Member
New Member

--
26 Sep 2007 07:29 AM
I did restart the server since the change. I will check the log for messages and report back.

Thanks

oshaw
New Member
New Member

--
26 Sep 2007 07:41 AM
The server started up smoothly with no error messages.
oshaw
New Member
New Member

--
26 Sep 2007 09:25 AM
Yes, I can see them all via explorer.
oshaw
New Member
New Member

--
26 Sep 2007 05:50 PM
The size of the files are the same and I was able to rename them (i.e. The physical files in explorer). they aer not being used by sql server.
oshaw
New Member
New Member

--
27 Sep 2007 05:44 AM
Thank You!!! ... I will try this tonight.
oshaw
New Member
New Member

--
03 Oct 2007 03:26 AM
Using the "Alter Database" command, I tried to fool it by adding and removing a file but this did not work. After my backups ran, I deleted the entries from sysaltfiles, rebooted and sql server came up just fine. Thank You again for your help.
yupsay
New Member
New Member

--
21 Apr 2011 07:37 PM
Not sure of there were any changes in the mean time but as I checked the sysfiles & sysaltfiles tables are updated at the same time. This applies to addition & removal of DB files and any change in space allocations.

As per http://msdn2.microsoft.com/en-us/li...l.80).aspxThe sysfiles system table in the local database always has current information about the size of the database files; however, the sysaltfiles system table in the master database is updated only when the server is restarted.
You are not authorized to post a reply.

Acceptable Use Policy