SQL Server 2012 SP1 Installation issue - by John Bocachica

Status : 


Sign in
to vote
ID 778275 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 2/1/2013 11:30:48 AM
Access Restriction Public


Hi, when you try to install SQL Server 2012 SP1, this returns an error when tries to validate the registry key DefaultData, if you see the logs you can found this text "The User Data directory in the registry is not valid. Verify DefaultData key under the instance hive points to a valid directory."

To reproduce this scenario:

1. Install a SQL Server 2012 by default (Next, Next, Next, ect.)
2. Once installed, go to REGEDIT.exe and verify the key DefaultData (As you can see, this key is not available)
3. Go to SSMS and change your default data directory to other one like "C:\IDontExists" or if you want run this script
    USE [master]
     EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE',    N'Software\Microsoft\MSSQLServer\MSSQLServer', N'DefaultData', REG_SZ, N'C:\IDontExists'
4. If you do this using the script this does not verify that this, however if you do this using the GUI, this does not verify this either (If you write the new directory directly into the textbox)
5. Now, your SQL Server have an invalid configuration, if you try to créate a Database by default, for example using the script CREATE DATABASE NewDatabase this will be created without a problem in the first default directory (C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\)
6. Try to install SP1, this will fail, a lot of people use the easy way (Drop the registry key), however the right way is just reconfigure your SQL Server to use a valid directory.

Where is the bug?, easy, you have to validate if the data directory is a valid directory when a user is trying to change this configuration and/or during the installation process you have to validate this directory and as i'm showing you, you should reconfigure SQL Server to use the first default directory as is doing during the creation of a new database by default.
Sign in to post a comment.
Posted by donsjones on 9/11/2014 at 8:42 AM
Even though this is closed, I thought I would post that the message comes up even when the directory is valid and has current master database data file in the directory.

Not sure if SQL Server installation is properly handling directories containing spaces.
Posted by HAL9256 on 2/24/2014 at 11:13 AM
To throw my hat into this: I think that the reasoning is that if the data directory is changed, then your SQL server will stop working if you restarted the service. Why would you be updating your server if your instance can't even run?
Also, by not running the check, It will still update everything else (shared services etc.) just not the SQL Server.
Posted by RickGot on 4/19/2013 at 3:04 PM
Why doesn't the installer validate this? It seems to validate everything else ... (and then some!) And then the "standard" response from MS ... that basically our opinions don't matter, even when suggestions might be useful, like this one. What's the matter MS? You're a software vendor, that's all ... please remember that. Are you folks too busy breakdancing with tablets that sell as well as the Zune to listen to your customers?
Posted by Microsoft on 4/18/2013 at 7:35 PM
After carefully evaluating all of the suggestion items in our pipeline, we are closing items that we will not implement in the near future due to current higher priority items. We will re-evaluate the closed suggestions again in the future based on the product roadmap.
Thanks again for providing the product suggestion and continued support for our product.