Questions tagged [filegroup]

A filegroup is a named collection of SQL Server database objects and files used for allocation and administration purposes.

SQL Server databases can store their data in one or more filegroups. There is always a "primary" filegroup which is the default storage area. There can be one or more additional "user-defined" filegroups which can also store data. Reasons to use multiple filegroups include:

  • Larger storage capacity
  • Better performance by distributing requests to multiple drives
  • Additional security options

Drawbacks include:

  • Restore, backups, and disaster recovery can be more complicated
  • Additional programming to make sure that all filegroups are used

See File and Filegroups Architecture at MSDN for more information and examples.

93 questions
0
votes
1 answer

SQL Server Primary File Group full when tables set to use Secondary

I have a database with two file groups, the second file group (Default) being used for the database tables. For some reason, when I check the file group sizes, the Primary file group is still being used to store all the data while the secondary…
TheLegendaryCopyCoder
  • 1,658
  • 3
  • 25
  • 46
0
votes
1 answer

SQL Server--piecemeal restore of filegroups from complete backup in Simple Recovery Mode

We have a large database in MS SQL in which one of the tables is partitioned by a date column. The Primary key index is also partitioned using the same partition function. The database is kept in Simple Recovery model, since data is added to it in…
river5
  • 21
  • 2
0
votes
0 answers

SQL Server. Table resides in a filegroup which is not online

I have such a table structure: CREATE TABLE Table1 ( Id1 INT IDENTITY(1,1) NOT NULL PRIMARY KEY, Value VARCHAR(50) ) ON [PRIMARY] GO CREATE TABLE Table2 ( Id2 INT IDENTITY(1,1) NOT NULL PRIMARY KEY, Value VARCHAR(50) ) ON…
GriGrim
  • 2,891
  • 1
  • 19
  • 33
0
votes
1 answer

MsSql whate drive is my file group stored on

I have moved some data from one file group to another, however when I check the drive with master.sys.xp_fixeddrives the drive does not say that it has been altered in size. I want to know how to check what drive the filegroup is physically stored…
Charles Bryant
  • 995
  • 2
  • 18
  • 30
0
votes
1 answer

SQL Server restore data without filegroups

We have a SQL Server database with terabytes of files stored in filegroups. In case of a catastrophic failure we restore a backup (includes data and files) which takes hours to completely restore. We would like to find a way to speed up the…
0
votes
1 answer

How to find type and size of content of a filegroup in SQL server?

I have a database using two filegroups. Let's call them PRIMARY and FG1. All data was originally in PRIMARY and then moved to be in FG1. This was achieved by moving the clustered indexes to FG1. The other indexes were removed and recreated without…
Marc
  • 9,012
  • 13
  • 57
  • 72
0
votes
2 answers

How to bringing an offline filegroup to online?

I took one of my database filegroups offline . I want to know is there any way to bring this offline filegroup online? Prior thanks to your answers.
Amir Keshavarz
  • 3,050
  • 1
  • 19
  • 26
0
votes
1 answer

What file is my sql table stored in?

I have a table in SQL Server 2008 R2. I want to know what file the data is being stored on. I know what filegroup the table is stored on. But I want to know which file it's on. Or is that not possible? I guess the whole idea of filegroups is to…
Trevor
  • 4,620
  • 2
  • 28
  • 37
0
votes
3 answers

SQL Server filegroup full during a large INSERT INTO statement

Consider a SQL script designed to copy rows from one table to another in a SQL 2000 database. The transfer involves 750,000 rows in a simple: INSERT INTO TableB([ColA],[ColB]....[ColG]) SELECT [ColA],[ColB]....[ColG] FROM TableA This is a long…
p.campbell
  • 98,673
  • 67
  • 256
  • 322
0
votes
1 answer

Piecemeal restore of database with filstream filegroups

I have tried taking the backup of database containing filestream and it works fine. I have tried restoring it on other server also and that works too. Now, i am facing a problem. Our database is big in size (approx. 320 GB) and it takes time to…
prashant
  • 1
  • 1
0
votes
1 answer

sql server split mirror db on to multiple devices

Say I have a large production mirrored 1TB DB that resides on a single MDF device and I would like to split that up into say 5 200 Gig devices. I want to do this without interruption to Production. I thought I could break the mirror and use the…
-1
votes
1 answer

Partition Insertion Issue while inserting data

I have table ABC in Oracle which has partition b100 and b200 which holds data like 100 and 200 accordingly. When we try to insert data apart from these Oracle developer throws an error. Now when we try to implement the same thing in SQL SERVER, the…
-1
votes
1 answer

How can I change filegroup location?

I used filetable for storing files in my project. now I want to change the filegroup location and move it to another drive. How can I do this?
kkarimi
  • 3
  • 1
-1
votes
1 answer

Move existing Foreign Key to different file group

I used the following code ALTER TABLE Table_name DROP CONSTRAINT constraint_name ALTER TABLE Table_name ADD CONSTRAINT constraint_name FOREIGN KEY (column_name) REFERENCES ref_table (ref_column) ON [filegroup_name] But I got this error…
Pரதீப்
  • 91,748
  • 19
  • 131
  • 172
-1
votes
1 answer

How to use file groups in SQL Server to speed up my database and optimization?

How to use file groups in SQL Server to speed up my database and optimization ? Please help me for create and use it . Thanks .