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
0 answers

Restore Files And Filegroups using .back file

I have a database [Ordering_Live] and took the backup yesterday and today I restored this to another database Ordering_Live_Test using File and Filegroups option instead of database. The data got restored successfully. I had this as shown in the…
0
votes
0 answers

How to define filegroup for SQL server in AWS?

I've been tasked to move on-prem SQL Server database to AWS RDS SQL Server and from there migrate the data to postgresql. I'm preparing for those and in the DB creation script found the term "FILEGROUP" and each file group has been mentioned a path…
luckyluke
  • 642
  • 2
  • 7
  • 22
0
votes
0 answers

SQL Server 2008 R2 - database file is 10GB, can't shrink it

I've got a database on SQL Server 2008 R2 that has grown to 10GB (log file is tiny). Users cannot work because they get the message about not being able to allocate space, filegroup PRIMARY being full. Database is in simple mode, the .mdf file is…
0
votes
1 answer

SQL Server file and filegroup, creating order

When it comes to files and filegroups, I want to create a secondary filegroup, so I should create a secondary file first, then create a user-defined filegroup, or I should create a user-defined filegroup first, then create a secondary file? What is…
0
votes
0 answers

How I can know what is stored in SQL filegroup data/rows?

I am working on cleaning data saved in SQL filegroups monthly , where I delete data for one month and then shrink the data filegroup to save space, noting that filegroup is based on date, each month has its' own filegroup. But this time after…
0
votes
0 answers

Enabling filegroup in SQL Server Management Studio

I have enabled filestream in SQL Server configuration manager and also restarted SQL Server, but when I want to enable file group for my database the option is locked for me SSMS database properties:
0
votes
0 answers

SQL Express: Primary filegroup is full -> What workarounds are there?

as it seems I manoeuvred myself into a dead end in SQL but definitely need to solve my tasks with the resources that I have at hand... I use SQL Server Express and I need to process a rather (not very) large table. Due to the fact that SQL Express…
0
votes
0 answers

Dynamics AX 2009 SQL Server multiple file groups

My .MDF file size is increasing and I want to add multiple file groups for Dynamics Ax 2009. I want a primary file for tables and clustered indexes and secondary file group for nonclustered indexes. Is this possible? Does anyone have implemented…
0
votes
1 answer

why does bazel copy resources from subdirectories to the top level of a jar

So the BUILD structure are like below: java: /src/java/com/abc/code/Code.java resources: /src/resources/com/abc/code/application.properties BUILD filegroups filegroup( name = "properties", srcs = glob(["application.properties"]) …
McGar
  • 205
  • 1
  • 10
0
votes
1 answer

Tables in 2 filegroups sql server

My predecessor for some reason split the data between two filegroups in our SQL Server 2005 database. I'm thinking about just putting everything in one. Any speculation on why someone would split things between filegroups with two files on the same…
Caveatrob
  • 12,667
  • 32
  • 107
  • 187
0
votes
0 answers

MS Sql Server - Clustered index requirement when changing filegroup of table

Can someone explain to me the reason a clustered index is required on Sql Server tables when moving them to another file group. A table without a clustered index is stored as a heap where as adding a clustered index would change it to a B-Tree.…
J Sidhu
  • 677
  • 1
  • 4
  • 19
0
votes
1 answer

Drop empty partition objects after truncate partition

I have a table partitioned by a date column, and each partition stores one month of data. Furthermore, each partition is associated with one filegroup, and each filegroup has exactly one db file (NDF). My setup is pretty simple: CREATE PARTITION…
Avi
  • 1,066
  • 1
  • 15
  • 37
0
votes
0 answers

Changing a file-stream file group on an existing table in SQL

I'm implementing the file stream in my database for the first time and I need to write a script that is going to change the file-group of file stream in a specific table. I was trying to work with the solutions that I found on the internet like…
Endrit Sheholli
  • 101
  • 1
  • 3
  • 19
0
votes
0 answers

SQL Server: restoring filegroup restores truncated table in another filegroup

I am looking into filegroup backups for a database. I want to have all the tables in the PRIMARY filegroup to be backed up and restored, while the tables in the SECONDARY filegroup are not. My queries work fine when the tables are just being edited,…
0
votes
0 answers

Archive partition files to target server database form source server database

I have two Windows Servers with same SQL Server 2017 software and data model setups. The two databases have the same kind of file group structure too. The goal is to be able to drop oldest quarter partitions on OLDB from source server and move them…
kota
  • 41
  • 5