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

How can I move an existing index on a normal table to a memory optimized file group?

How can I move an existing index on a normal table to a memory optimized file group in sql server?
user1297556
0
votes
1 answer

How to append filegroup dynamically while creating an index in SQL Server?

I have to move some tables from primary file group to the default prime group. I have 3 different environments and in each environment name of the default file group is different. Thus, I can fetch the default file group name as: select name from…
codeLover
  • 2,571
  • 1
  • 11
  • 27
0
votes
1 answer

How to handle melon of record in SQL server

In SQL server every time i got Filegroup is full, Execution timeout. How can i release some space in SQL database. System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server…
Deepak Jha
  • 359
  • 2
  • 10
0
votes
1 answer

SQL recovery - partitioned table (file groups) - each on separate disk (and one of disk crashes)

For huge tables I am thinking of using the concept of partitioning using file groups and have each file group on a separate disk. My question is that - If one of the file group disk crashes, then should this incident be treated as database crash?…
variable
  • 8,262
  • 9
  • 95
  • 215
0
votes
1 answer

SQL - How to create a partition on multiple keys

We have following two columns in table schema. ClientID INT TransactionDate Date Currently, this table is partitioned based on TransactionDate. But we also want to partition on ClientID and TransactionDate. Is it possible in SQL Server 2016…
mit
  • 1,763
  • 4
  • 16
  • 27
0
votes
1 answer

Find Last Modifcation Time of Filegroup Option in SQL Server

I searched almost everywhere but I couldn't find a solution. I'm looking for a way to find the last time that user change an option of a filegroup in SQL Server database. For example, the last time of changing read-only property of a specific…
0
votes
0 answers

SQL Server Preparing testing environment

I had to prepare testing environment with SQL Server 2014 database. On PROD DB has two file group PRIMARY (operational - 50 GB) and STROAGE (archive - 1100 GB). In TEST environment I have copy of database from 6 months ago, it hasn't got STORAGE…
Peter_K
  • 93
  • 1
  • 10
0
votes
1 answer

Move file-group to a different database

Is it possible to move SQL Server file-group from one database to another one on the same server ? If no , is there any work around?
Hossam Elsagheer
  • 151
  • 1
  • 5
  • 15
0
votes
1 answer

Can we distribute the file groups of a single database to reside on multiple servers?

We have a requirement to distribute the filegroups of one of our database on multiple servers. Can you please let me know if that is possible and if yes how can we do that? We are using SQL server 2012 standard edition
0
votes
1 answer

SQL Server: Bulk Insert Data Loading to Partitioned Table with Multiple File Groups

I am trying to load a series of CSV files, ranging from 100MB to 20GB in size (total of ~3TB). So, I need every performance enhancement that I can. I am aiming to use filegrouping, and partitioning as a mean. I performed a series of tests to see the…
MeysaM
  • 21
  • 10
0
votes
0 answers

filegroup in sql server doesn't map my inserted records to correct file

I create this file group as you can see : Create database AdventureWorksDW ALTER DATABASE AdventureWorksDW ADD FILEGROUP [Filegroup_2001] GO ALTER DATABASE AdventureWorksDW ADD FILEGROUP [Filegroup_2002] GO ALTER DATABASE AdventureWorksDW…
Ehsan Akbar
  • 6,977
  • 19
  • 96
  • 180
0
votes
1 answer

Distributed File's and named filegroups in SQL Server performance

I have 2 options when creating a database and the number 1 priority for these databases is performance. Option 1: Distributed Files over multiple drives on 1 Filegroup. Therefore all files are managed by SQL server and the Hard-Drives are…
0
votes
1 answer

Single Column Huge table (2.5 B rows). Clustered index Vs Clustered Columnstore index

We are having a huge table Table1(2.5 billion rows) with single column A(NVARCHAR(255) datatype). What is the right approach for seek operations against this table. Clustered index on A Vs Clustered Column store index on A. We are already keeping…
0
votes
0 answers

Adding file to filegroup with Dynamic SQL

hope you can help me, I'm trying to add a file with the name of the corresponding filegroup, here's my code: DECLARE @SQL1 nvarchar(1024), @SQL2 nvarchar(1024), @name varchar(255); SET @SQL1 = 'DECLARE vend_cursor CURSOR GLOBAL …
Yeinor
  • 21
  • 3
  • 7
0
votes
1 answer

Moving Large Tables and All Indexes to a new File Group

I'm looking at implementing File Groups on an existing database that's roughly 600GB. The largest hurdle I have is actually setting this up in production. I need the database to still be available but moving some of the tables will take a…
nikolifish
  • 503
  • 1
  • 5
  • 18