Friday, March 23, 2012

MS SQL Server 2005 data folder

It seems SQL Server 2005 can store data in both C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data and C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Data. But what's the difference of the 2 folders? I accidentally found identical mdf files in the two folders and got confused. Thanks.This is assuming you have more than one database in your SQL Server if you find all your MDF files and LDF files in one and not the other then the second one was created by VS for SQL Server I will leave it alone. Hope this helps.|||

The difference is that the 2 folders are default data folders of 2 different SQL2005 instance. In SQL 2005 the machanism of resolving instance names has been changed, as well as the file locations. For more information, you can refer to:

File Locations for Default and Named Instances of SQL Server 2005

No comments:

Post a Comment