I am trying to restore a database from a backup (.bak) file which has four different files. I am trying point each file into a different disk drive on the server. The server has following four drives:
- Data (
G:\) - Index (
H:\) - Changes (
I:\) - Log (
J:\)
I'm getting the following error when I try to save the file into the root folder (for example: I have pointed the index file to H:\DbRestore_Test-index.mdf), but if I point to a subfolder in the same disk drive it is working without an issue (for example: H:\Indexes\DbRestore_Test-index.mdf).
TITLE: Microsoft SQL Server Management Studio
Restore of database 'DbRestore_Test' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)
------------------------------ ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'H:\DbRestore_Test-index.mdf'. (Microsoft.SqlServer.SmoExtended)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&LinkId=20476
I have taken a look at this Stackoverflow page: Ticking the Relocate all files to folder checkbox doesn't help as I need to save files into four different drives and there is an option to specify only two drives.
As I mentioned above, I can resolve this by simply pointing/saving the file into a subfolder within that drive, but curious to know the reason why I wasn't able to restore it into the root folder itself. Any help/advise would be much appreciated.
Environment:
SQL Server 2012
Windows Server 2012 R2 Standard
