Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
    
Script your restore command out to a new window using the script button on the restore dialog box and paste that into the question. –  Jason Cumberland Oct 5 '11 at 15:44

2 Answers 2

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
share|improve this answer

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.

share|improve this answer
    
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. –  StanleyJohns Oct 6 '11 at 12:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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