FileGroups is full | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

FileGroups is full

Hello Friends, I have a problem concerning file Groups. On my database, I have one file-group(PRIMARY),
if my hardDisk is full, the sql server cannot allocate more space. how can I expancd the database file groups on another drives. Thank you so mutch for your help.
Books online specifies:
B. Add a filegroup with two files to a database
This example creates a filegroup in the Test 1 database created in Example A and adds two 5-MB files to the filegroup. It then makes Test1FG1 the default filegroup.
USE master
GO
ALTER DATABASE Test1
ADD FILEGROUP Test1FG1
GO ALTER DATABASE Test1
ADD FILE
( NAME = test1dat3,
FILENAME = ‘c:program FilesMicrosoft SQL ServerMSSQLData 1dat3.ndf’,
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB),
( NAME = test1dat4,
FILENAME = ‘c:program FilesMicrosoft SQL ServerMSSQLData 1dat4.ndf’,
SIZE = 5MB,
MAXSIZE = 100MB,
FILEGROWTH = 5MB)
TO FILEGROUP Test1FG1 ALTER DATABASE Test1
MODIFY FILEGROUP Test1FG1 DEFAULT
GO
Satya SKJ
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Firstly make sure you are truncating you transaction logs, – the primary cause of filegrowth (shrink them afterwards if this is the case). If you really do need to add more files: For ALTER DATABASE dbnamehere
ADD FILE
(NAME = dbnamehere2,
FILENAME = ‘pathheredbnamedata2.ndf’,
SIZE = specifyhere
MAXSIZE = specifyhere,
FILEGROWTH = specifyhere) and/or ALTER DATABASE dbnamehere
ADD LOG FILE
(NAME = dbnamehere2,
FILENAME = ‘pathheredbnamelog2.ldf’,
SIZE = specifyhere
MAXSIZE = specifyhere,
FILEGROWTH = specifyhere)
]]>