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
 General SQL Server Forums
 New to SQL Server Programming
 FILEGROUP NAME MODIFY ERROR

Author  Topic 

johnny1walker
Starting Member

17 Posts

Posted - 2012-03-12 : 17:57:32
HI everybody.i got a problem

first i add filegroup;
ALTER DATABASE test
ADD FILEGROUP testgrup1

then;(i add a data file)
ALTER DATABASE test
ADD FILE (NAME = test5, FILENAME = 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\test5.ndf',
SIZE=8MB, MAXSIZE=100MB,FILEGROWTH=10MB )
TO FILEGROUP testgrup1
GO

-------------------------------------

ALTER DATABASE test
MODIFY FILE
( NAME = testgrup1, NEWNAME = testgrup3 )

ALTER DATABASE test
MODIFY FILE
( NAME = testgrup2, NEWNAME = testgrup4 )


^^^ BUT When I wrote this code, gives the following error!! vvv

Msg 5041, Level 16, State 1, Line 1
MODIFY FILE failed. File 'testgrup1' does not exist.
Msg 5041, Level 16, State 1, Line 5
MODIFY FILE failed. File 'testgrup2' does not exist.

johnny1walker
Starting Member

17 Posts

Posted - 2012-03-12 : 19:12:34
THANKS.. I FIND
--ALTER DATABASE test
--MODIFY FILEGROUP testgrup1 NAME = testgrup3
--GO
TRUE

Go to Top of Page
   

- Advertisement -