filegroup

Create a table on a filegroup other than the default

随声附和 提交于 2019-12-21 17:56:05
问题 The title is clear enough, I created a new Filegroup "ArchiveFileGroup": ALTER DATABASE MyDataBase ADD FILEGROUP ArchiveFileGroup; GO I want to create a table called : arc_myTable in order to store old data from this one : myTable I used the following query : CREATE TABLE [dbo].acr_myTable( [Id] [bigint] NOT NULL, [label] [nvarchar](max) NOT NULL, )on ArchiveFileGroup I'm not sure if it's the right way, I don't know where the FileGroup is created to check if it contains the table. 回答1: You

Create a table on a filegroup other than the default

给你一囗甜甜゛ 提交于 2019-12-21 17:55:41
问题 The title is clear enough, I created a new Filegroup "ArchiveFileGroup": ALTER DATABASE MyDataBase ADD FILEGROUP ArchiveFileGroup; GO I want to create a table called : arc_myTable in order to store old data from this one : myTable I used the following query : CREATE TABLE [dbo].acr_myTable( [Id] [bigint] NOT NULL, [label] [nvarchar](max) NOT NULL, )on ArchiveFileGroup I'm not sure if it's the right way, I don't know where the FileGroup is created to check if it contains the table. 回答1: You

Should static database data be in its own Filegroup?

我怕爱的太早我们不能终老 提交于 2019-12-13 17:46:16
问题 I'm creating a new DB and have a bunch of static data that won't change. If it does, it will be a manual process AND it will happen very rarely. This data is a mix of varchars and Geographies. I'm guessing it could be around 100K or so in total, over 4 or so tables. Questions Should I put these on a READ ONLY filegroup Can I create the tables in the designer and define the filegroup during creation? Or is it only possible via a script? Once the data is in the table (on a read only filegroup),

Efficient way to change the table's filegroup

廉价感情. 提交于 2019-12-12 04:31:33
问题 I have around 300 tables which are located in different partition and now these tables are not in use for such huge data as it was. Now, I am getting space issue time to time and some of but valuable space is occupied by the 150 filegroups that was created for these tables so I want to change table's filegroup to any one instead of 150 FG and release the space by deleting these filegroups. FYI: These tables are not holding any data now but defined many constraints and indices. Can you please

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

送分小仙女□ 提交于 2019-12-12 01:45:28
问题 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 specifying a file group, but FG1 was defined as default so they are now effectively in FG1. However, the file for PRIMARY still gets filled over time. How can I find the type of stuff that remains in PRIMARY, including its size? My goal is to get

Would a filegroup with many files located on the same drive outperform if it had just one file on SQL Server 2008 R2?

血红的双手。 提交于 2019-12-08 02:31:55
问题 I've a couple of questions regarding filegroups and their files (.ndf). A filegroup with many files is faster than a filegroup with just one file? (All files are located on the same drive, i.e., same access time for their data) If (1) is false. A filegroup with many files spread over drives A and B is faster than one with just one file on drive A or B? (let's suppose drives A and B are of the same model) 回答1: Usually, you'd have one file per filegroup, one filegroup per disk set/volume

Create a table on a filegroup other than the default

限于喜欢 提交于 2019-12-04 11:24:42
The title is clear enough, I created a new Filegroup "ArchiveFileGroup": ALTER DATABASE MyDataBase ADD FILEGROUP ArchiveFileGroup; GO I want to create a table called : arc_myTable in order to store old data from this one : myTable I used the following query : CREATE TABLE [dbo].acr_myTable( [Id] [bigint] NOT NULL, [label] [nvarchar](max) NOT NULL, )on ArchiveFileGroup I'm not sure if it's the right way, I don't know where the FileGroup is created to check if it contains the table. You can easily check with this sql query : SELECT o.[name], o.[type], i.[name], i.[index_id], f.[name] FROM sys

SQL Server 2005 / 2008 - multiple filegroups?

China☆狼群 提交于 2019-12-03 06:01:30
问题 I'm a developer at heart - but every now and then, a customer doesn't have a decent DBA to deal with these issues, so I'm called in to decide.... What are your strategies / best practices when it comes to dealing with a reasonably sized SQL Server database (anything larger than Northwind or AdventureWorks) - do you use multiple filegroups? If so: how many? And why? What are your criteria to decide when to move away from the "one filegroup for everything" approach: database size? database

Moving all non-clustered indexes to another filegroup in SQL Server

被刻印的时光 ゝ 提交于 2019-12-03 04:23:23
问题 In SQL Server 2008, I want to move ALL non-clustered indexes in a DB to a secondary filegroup. What's the easiest way to do this? 回答1: Run this updated script to create a stored procedure called MoveIndexToFileGroup . This procedure moves all the non-clustered indexes on a table to a specified file group. It even supports the INCLUDE columns that some other scripts do not. In addition, it will not rebuild or move an index that is already on the desired file group. Once you've created the

Moving all non-clustered indexes to another filegroup in SQL Server

青春壹個敷衍的年華 提交于 2019-12-02 17:39:11
In SQL Server 2008, I want to move ALL non-clustered indexes in a DB to a secondary filegroup. What's the easiest way to do this? Run this updated script to create a stored procedure called MoveIndexToFileGroup . This procedure moves all the non-clustered indexes on a table to a specified file group. It even supports the INCLUDE columns that some other scripts do not. In addition, it will not rebuild or move an index that is already on the desired file group. Once you've created the procedure, call it like this: EXEC MoveIndexToFileGroup @DBName = '<your database name>', @SchemaName = '<schema