April 22, 2015 at 4:44 am
I cant find anything that relates to the issue I am experiencing, and I am hoping I am not alone on this.
Scenario:
I have cloned a production database, but only the C:\ drive where the binaries exist. ie no user databases and no system databases.
So now I want to rebuild master, and once successful, I will restore the master database from backup. I have changed the parameters in the sql server configuration services to point to the C:\ drive, as I would hope that it would create them there.
from command prompt, as administrator, I execute this:
Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=accountname /SAPWD= password123 /SQLCOLLATION=Latin1_General_CI_AS
it fails with the following excerpt :
Attempting to set directory full path
Attempting to normalize directory path E:\Data
Attempting to check if directory E:\Data exists
SQLEngine: : Checking Engine checkpoint 'CreateDataDir'
SQLEngine: : Create E:\Data Directory
Attempting to set directory full path
Attempting to normalize directory path E:\Data
Attempting to check if directory E:\Data exists
Attempting to create directory E:\Data
Attempting to create directory E:\Data, security descriptor
Attempting to set directory full path
Attempting to normalize directory path E:\Data
Directory 'E:\Data' already exists, skipping creation, moving to set security descriptor.
Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigNonRC and scenario ConfigNonRC.
The device is not ready.
Configuration action failed for feature SQL_Engine_Core_Inst during timing ConfigNonRC and scenario ConfigNonRC.
Microsoft.SqlServer.Configuration.Sco.ScoException: The device is not ready.
---> System.IO.IOException: The device is not ready.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Microsoft.SqlServer.Configuration.Sco.SqlDirectory.Create(ServiceContainer ctx, String directoryFullPath, String sddlString, Boolean overwriteSecurityDescriptor)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Configuration.Sco.SqlDirectory.Create(ServiceContainer ctx, String directoryFullPath, String sddlString, Boolean overwriteSecurityDescriptor)
at Microsoft.SqlServer.Configuration.Sco.SqlDirectory.Create(ServiceContainer ctx, String directoryFullPath)
at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.CreateAndProvisionDataDirectories(EffectiveProperties properties, IEnumerable`1 dataDirs, Boolean breakInheritance)
at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.RebuildDatabase_ConfigNonRC(EffectiveProperties properties)
at Microsoft.SqlServer.Configuration.SqlEngine.SqlEngineSetupPrivate.RebuildDatabase(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcb)
at Microsoft.SqlServer.Configuration.SqlConfigBase.PrivateConfigurationBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
at Microsoft.SqlServer.Configuration.SqlConfigBase.SqlFeatureConfigBase.Execute(ConfigActionScenario scenario, ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbCurrent)
at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.ExecuteAction(String actionId)
at Microsoft.SqlServer.Configuration.SqlConfigBase.SlpConfigAction.Execute(String actionId, TextWriter errorStream)
Exception: Microsoft.SqlServer.Configuration.Sco.ScoException.
Source: Microsoft.SqlServer.Configuration.Sco.
Message: The device is not ready.
.Inner exception:
Exception: System.IO.IOException.
Source: mscorlib.
Message: The device is not ready.
Watson Bucket 1
Now, my question, is where on earth is it picking up the E:\Data from? Why is it looking for that particular drive? It is worth noting, that on the production server, the Database Default location is E:\Data, however, I would have thought when rebuilding, it scraps all that, and starts again.
If anyone has seen this before, any ideas would be appreciated
April 22, 2015 at 8:25 am
After trying almost everything, I eventually found the solution.
It appears that, if you change the default datafile locations, this is recorded in the registry. So I searched the registry for E:\Data, and found a registry key that matched my requirements:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer\DefaultData
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer\DefaultLog
I changed those values to the C:\ drive, and reran the setup.. and it worked
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply