3

I have a .bak file which gives the following error while restoring:

System.data.sqlclient.sqlerror:The path 'E:' has invalid attributes. It needs to be a directory. It must not be hidden, read-only, or on a removable drive.

Image of error message

But I verified that the directory is not read only. Anyone know how to restore the three files being restored ( .mdf,.ldf, and sysft)?

The script i had used for restoring database has been given below.

RESTORE DATABASE [new] FROM DISK = N'E:\a\L11.bak' WITH FILE = 1, MOVE N'itest' TO N'E:\a\3.mdf', MOVE N'itest_log' TO N'E:\a\4.ldf', MOVE N'sysft_test' TO N'E:\a', NORECOVERY, NOUNLOAD, REPLACE, STATS = 10 GO

1
  • Script your restore command out to a new window using the script button on the restore dialog box and paste that into the question. Oct 5 '11 at 15:44
1

I think you need a "\" at the end of the path.

RESTORE DATABASE [new] FROM DISK = N'E:\a\L11.bak' WITH FILE = 1, MOVE N'itest' TO N'E:\a\3.mdf', MOVE N'itest_log' TO N'E:\a\4.ldf', MOVE N'sysft_test' TO N'E:\a\', NORECOVERY, NOUNLOAD, REPLACE, STATS = 10 
GO
-1

Try changing the section:

MOVE N'sysft_test' TO N'E:\a' to MOVE N'sysft_test' TO N'E:\a\sysft_test.ndf'

Then rerun as see if the backup works.

2
  • SQL 2005 puts the full text index into a folder not a file. SQL 2008 and newer puts it into a normal data file.
    – mrdenny
    Oct 6 '11 at 1:11
  • @mrdenny tough crowd.... :). I thought it to be a secondary data file. Oct 6 '11 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.