?
Solved

Master.mdf was originally formatted with sector size 4096 and is now on a volume with sector size 3072

Posted on 2012-09-14
19
Medium Priority
?
6,033 Views
Last Modified: 2016-11-23
Hello,

Since upgrading my computer to Windows 8, I've been trying to use Visual Studio 2012 to create a LightSwitch application, but it cannot run because Sql Express LocalDB fails with the following error:

2012-09-04 12:28:02.43 spid4s      Cannot use file 'C:\Users\UserName\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0\master.mdf' because it was originally formatted with sector size 4096 and is now on a volume with sector size 3072. Move the file to a volume with a sector size that is the same as or smaller than the original sector size.
2012-09-04 12:28:02.43 spid4s      Error: 5178, Severity: 16, State: 1.

I've been searching and searching for answer with no luck. Some indications point to Dell and the need for an updated Sata driver which has not been forthcoming.

Here's an MS Technet post I made looking for an answer:
http://social.technet.microsoft.com/Forums/en-US/sqlexpress/thread/5c090e72-e83d-4fca-a087-75a3df5d2b4f 

I'm frequently referred to the workaround on this link, which doesn't seem very viable, but which also seems to be incomplete, so I'm not able to try it out anyways:
http://connect.microsoft.com/SQLServer/feedback/details/733652/service-inicialization-failled-by-corrupted-system-resource-in-windows-8-client 

Has anybody got any ideas/suggestions that may help?

Thanks in advance,

--Jon
0
Comment
Question by:CoastalData
19 Comments
 
LVL 38

Expert Comment

by:Jim P.
ID: 38401075
Do you have access to another machine that you can restore your master on?

How much data do you have in the Master DB?

Over the years I have developed an attitude that the SQL Server system databases are about worthless. The way I do it is export the users/logins via the <a href = "http://support.microsoft.com/kb/918992">sp_help_revlogin</a> saved to disk. Maint jobs are created via a script as well.

So I would see if I can restore your master db to another machine. Then export the users via a script.

I would then recreate the instance with a fresh SQL install, and recreate the user's via the script.
0
 
LVL 3

Author Comment

by:CoastalData
ID: 38401824
There's nothing in it... it's a new install.
0
 
LVL 38

Accepted Solution

by:
Jim P. earned 2000 total points
ID: 38401858
I'm going to have to agree with your assessment in the Technet post that this is only affecting a few people. Win8 is so new that I don't think many have started using it.

You may want to point out that this needs to be moved up on the list of defects, because if developers can't develop on the platform, everyone else is going to be slow to adopt it.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 25

Expert Comment

by:TempDBA
ID: 38405686
did you try the suggestion in the link? What happens when you do chkdsk?
0
 
LVL 3

Author Comment

by:CoastalData
ID: 38405748
I've gotten further confirmation from MS that this problem only affects certain Dell computers because the BIOS is misreporting the sector size, and that because of the page size usage in SQL server if the sector size really was 3072 that it would be major performance problem...

Therefore, the only workaround (besides a BIOS update from Dell) that can work is the one that involves moving those system databases to a virtual HDD... To that end, I have created the VHDD, and mapped a drive letter to it, but have not been able to figure out the last steps of actually telling LocalDB to keep it's master databases there.
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 38406134
but have not been able to figure out the last steps of actually telling LocalDB to keep it's master databases there.

That will either be with a uninstall/reinstall. <-- The preferred method

Here's the other way without a reinstall.
http://msdn.microsoft.com/en-us/library/ms345408.aspx#master

You can also do it with a regedit. <-- Not suggested -- This is the desperation way.
Shut down the SQL Server Services
 in the HKLM\Software\Microsoft\MSSQLSERVER and SQL Server keys.
Move the master mdf/ldf files and restart.
0
 
LVL 3

Author Comment

by:CoastalData
ID: 38406906
Uninstal/reinstall of... the whole SQL Express product? From what I understand, LocalDB is part of that, isn't it?

Would that also be true of option #2?

I'm going to look at the registry keys of option #3 just to see what's there...
0
 
LVL 3

Author Comment

by:CoastalData
ID: 38407014
Hmmm, when I use Management Studio to connect to .\sqlexpress, it says that that's version 10.0.5500, but I think the problem server (LocalDB) is v 11....
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 38407393
Version 11 is SQL 2012. The 10.0.5 is SQL 2008 R2.

Uninstal/reinstall of... the whole SQL Express product? From what I understand, LocalDB is part of that, isn't it?

That is what I'm taking about. When you do the the reinstall, don't take the default options. Any time it gives you an option to change paths, take it. You will always have a small part of SQL on the OS drive (C:) but those are pointers and essential files that can't be changed. The rest will end up on the VHDD.
0
 
LVL 3

Author Comment

by:CoastalData
ID: 38411562
I'm sorry... Not to be repetitive, but...

Uninstall and reinstall ONLY 2012 Express? Or, all of the pieces parts that go with it, as well?

Ie, command line utilities, "data-tier app framework", objects, client, etc...
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 38411613
Not a problem. I've just done some of this stuff so often I don't think to write the detail in.

Yes, just the SQL 2012 Express.
0
 
LVL 3

Author Comment

by:CoastalData
ID: 38417982
I tried that... and it made me reboot on reinstallation... and didn't re-map the virtual drive, and so it failed...

So, I've liberated a 500gb drive, and will install that today, and put all Express + VS 2012 on that drive, and THAT should solve the problem, yes?
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 38418512
THAT should solve the problem, yes?

Yes. That should do it. I would suggest that after you uninstall, grab a registry cleaner and clean out the registry of prior installs.
0
 
LVL 84

Expert Comment

by:David Johnson, CD, MVP
ID: 38428263
Personally I'd be going after DELL for the bios update, since it is their fault that the program is failing.
0
 
LVL 3

Author Comment

by:CoastalData
ID: 38434018
Okay, I've got some progress!!!! I have installed everything over to a secondary harddrive, and it is not producing that error anymore, instead I'm getting this one:

Warning      1      The primary reference "Microsoft.LightSwitch" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".      C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets      1578      6      Application5

That might be worthy of a new question, but I'm not sure if that means that this one is answered? LOL... Any ideas?

Thanks!
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 38435333
You're probably going to have to reinstall LightSwitch as well.
0
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 38511492
Wait...Visual Studio 2012 supports .NET 4.5.  Check to see what version you're compiling for (VS2008 used 2.0 as default, VS2010 used 4.0, VS2012 may still use 4.0).  Certainly the error message clearly indicates that 4.5 is the Lightswitch .NET and 4.0 is your compilation target.  Set your project (or solution?) to compile against .NET 4.5, install it, and this problem should go away.
0
 
LVL 3

Author Closing Comment

by:CoastalData
ID: 38899333
After much pain and annoyance, I finally waived the white flag and reinstalled my primary operating system (win 8) on a 500GB drive, and use my other drives as storage, and all problems are gone.
0
 

Expert Comment

by:bssachdeva
ID: 39419009
Check if you have application named "Intel Matrix Storage Console" installed on server.
Opened this application and check for sector size. It will be reporting 3072 physical sector size.
=> This is the same size that is being reported in SQL as well.

Resolution:
**************
=> Install latest version of Intel® Rapid Storage Technology application from the Intel site. After this open "Intel® Rapid Storage Technology " console again now it will report correct sector size of 4096.
=> Reboot the server.
=> After this SQL Server will also see correct sector size and restarted fine.

Cause :
***************
This is due to an old version of driver which talks to Intel I/O controller. By installing latest version of "Intel® Rapid Storage Technology ", this driver gets upgraded and now it see's correct sector size.


Mark as Solution if it benefits you. This will help others in getting to correct resolution correctly.
Note: This solution worked on a non Dell server. There is a BIOS upgrade for few Dell Servers which report this error.
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question