March 22, 2012 at 2:24 pm
Hi,
I have detached a database having Filestream and then moved the mdf,ldf and filestream folder to mount points under drive G (G:\SQLDATA and G:\SQLLOGS) and trying to attach the database. But getting the below error. Please advice.
CREATE DATABASE Test ON
PRIMARY ( NAME = Test_data,
FILENAME = 'G:\SQLDATA\Test.mdf'),
FILEGROUP RBSFileStream CONTAINS FILESTREAM( NAME = RBSFilestream_Test, FILENAME = 'G:\SQLDATA\RBSFileStream')
LOG ON (NAME = Test_log,
FILENAME = 'G:\SQLLOGS\Test.ldf')
FOR ATTACH
GO
Error:
msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "G:\SQLDATA\RBSFileStream". Operating system error 5: "5(Access is denied.)".
March 22, 2012 at 2:33 pm
Check the permissions on the folders. When you copied the filestream folder it may not have inherited the permissions from the SQLData folder. The service account needs permissions to all the folders.
March 22, 2012 at 2:47 pm
I'm new to this. Just want more info. Thanks.
March 22, 2012 at 3:24 pm
Check the permissions on the folders. When you copied the filestream folder it may not have inherited the permissions from the SQLData folder. The service account needs permissions to all the folders.
Permissions are all same for drives. I checked by right clicked the drives and all are having same permissions.
Error from error log:
Error: 3633, Severity: 16, State: 1.
2012-03-22 13:19:49.17 spid58 The operating system returned the error '2(The system cannot find the file specified.)' while attempting 'FsFileHeader::Open' on 'G:\SQLDATA\RBSFileStream' at 'stmfcb.cpp'(6583).
2012-03-22 13:19:49.20 spid58 Error: 17204, Severity: 16, State: 1.
2012-03-22 13:19:49.20 spid58 FCB::Open failed: Could not open file G:\SQLDATA\RBSFileStream for file number 0. OS error: 5(Access is denied.).
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply