I am trying to restore a database from a backup I got on the hosting server. I have checked the logical names using:
restore FILELISTONLY from
disk = 'c:\DBBackup2_17092013.bak'
and used them to perform the following query:
restore database StadlerTest
from disk = 'c:\DBBackup2_17092013.bak'
with replace,
move 'Stadler_base' to 'C:\Program Files\Microsoft SQL
Server\MSSQL10.SQLEXPRESS\MSSQL\StadlerTest.mdf',
move 'Stadler_base_log' to 'C:\Program Files\Microsoft SQL
Server\MSSQL10.SQLEXPRESS\MSSQL\StadlerTest.ldf'
I run the above two queries from master after I created the empty database StadlerTest but I am getting a series of error that sound like these (translation from italian):
""Message 3634, level 16, state 1, row 1 The operating system returned error '5(Access denied.)' during the attempt to 'RestoreContainer::ValidateTargetForCreation' on 'C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\StadlerTest.mdf'.""
I am doing something wrong but I do not know what is wrong, I already checked several answers given on SO and other sites but I am not getting it right. Some help will be appreciated. Thanks.