I have SQL Server 2012 Local DB Installed, and am connecting to it via (localdb)\v11.0.
When trying to restore a backup file, I get:
TITLE: Microsoft SQL Server Management Studio
Property MasterDBPath is not available for Information 'Microsoft.SqlServer.Management.Smo.Information'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)
I have tried setting MasterDBPath string value in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11E.LOCALDB\MSSQLServer\CurrentVersion`
but this hasn't helped.
Anyone have any thoughts?
-
What is the source SQL Server edition and version of the backup file?Thomas Stringer– Thomas Stringer2012年09月04日 02:48:27 +00:00Commented Sep 4, 2012 at 2:48
-
The backup is from a SQL Server 2012 Developer edition install.Andy Neillans– Andy Neillans2012年09月04日 07:51:37 +00:00Commented Sep 4, 2012 at 7:51
3 Answers 3
I had the same problem, and solved it.
You need to add 2 strings in the Windows Registry via regedit.exe
at
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11E.LOCALDB\MSSQLServer
:
DefaultData
DefaultLog
For me, their values are both C:\Users\neil\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0
.
-
1Thanks - this worked for me running as administrator however I did also have to create a third key
BackupDirectory
which I pointed to a similar directory.DaveHogan– DaveHogan2013年07月06日 15:35:25 +00:00Commented Jul 6, 2013 at 15:35
Not really a proper solution, but this error does not occur if you create a blank database, then restore your backup overwriting the blank database.
Or you can use the restore T-SQL commands:
RESTORE DATABASE <database> FROM DISK = '<backupfile>' WITH NORECOVERY,
MOVE 'example_dat' TO 'C:\Temp\<database>.mdf',
MOVE 'example_log' TO 'C:\Temp\<database>.ldf'
The problem was fixed after I installed the newest Microsoft SQL Server Management Studio 2017.