Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 add FILE to a filgroup erroring out

Author  Topic 

leodone
Starting Member

30 Posts

Posted - 2012-02-08 : 16:49:24
Hello everyone
I am getting this error message below for Adding a file but I am doing it on my PC and I have full rights to it.

go
alter database AdventureWorks2008R2
ADD FILE
(NAME = LEdata1,
FILENAME = 'C:\AWd1LE.ndf',
SIZE = 1MB,
MAXSIZE = 5MB,
FILEGROWTH = 1MB)
to Filegroup LE_fg1;

Msg 5009, Level 16, State 1, Line 1
One or more files listed in the statement could not be found or could not be initialized.
Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:\AWd1LE.ndf'.

Do know what I am doing wrong here.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-02-08 : 17:08:42
Try a folder and not the root drive, and double check that the account has full access.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -