Indexes And File Groups

Jul 23, 2005

Something strange.

I have a database(SQL2000) with two file group(on seperate physical
drives).
One is meant for table data[PRIMARY] and one for indexes [INDEX].

So i create a table on the [PRIMARY] file group, and fill in
data.

Next I build a clustered index on the table, on the [INDEX] filegroup.

Once the index is built, the database now indicates that the filegroup
for the table [INDEX]! and not [PRIMARY] as i originally set it up for!

My question it then: Has the table been moved or is this somehow an
error in SQL server?
I would really appreciate any thought anyone might have on this?

View 4 Replies


ADVERTISEMENT

Pros And Cons Of Placing Indexes On Separate File Groups

Apr 20, 2001

We are in the process of replacing our primary production server. In the process of determining how SQL server is going to be structured, it has been suggested that I place all current and new indexes on a separate file group. These filegroups would then reside on a separate shelf on the server. What are the pros and cons of doing this?

View 2 Replies View Related

Split Data File Into Multiple File Groups..!

Dec 18, 2006

I have one of our production Accounting Databases starting from 2 GBnow grown into a 20 GB Database over the period of a few years...I have been getting timeouts when transactions are trying to updatedifferent tables in the database.. Most of the error I get are I/Orequests to the data file (Data file of the production dbAccounting_Data.MDF).I would like to implement the following to this Accounting database.I need to split the Data file into multiple files by placing some ofthe tables in different file groups. I have the server upgraded to beable to have different drives in different channels. I can place thesedata and log files in different drives so it will be less I/Oconflicts..I would like to have the following file groups..FileGroup 1 - which will have all database definitions (DDL).FileGroup 2 - I will have the AR Module tables under here..FileGroup 3 - I will have the GL module tables under here..FileGroup 4 - I will have the rest of the tables under hereFileGroup 5 - I will like to place the indexes under here....Also where will the associated transaction files go?I would like to get some help doing this. Is there any articles / helpavailable that I can refer to. Any suggestions / corrections/criticisms to what I have mentioned above is much appreciated...!Thanks in advance....

View 1 Replies View Related

SAN's And File Groups

Jan 8, 2001

If you have a SAN, is there any real benefit to breaking out large tables into file groups?

View 1 Replies View Related

File Groups

Nov 3, 2007

I am looking to find out when to use file groups when backing up. When should you use this, what's the benefit over just doing a full db backup? Is it better when you are dealing with large db's?

Also this question has been on my mind for a while. Why shouldn't you shrink the db after every full backup? What is the negative in doing so?

Thanks

View 1 Replies View Related

File Groups

Jun 28, 2006

Hi everyone,
When I do the following, did I put the files in Test1FG1 file group to the default file group(Primary) ?

ALTER DATABASE Test1

MODIFY FILEGROUP Test1FG1 DEFAULT
GO

Thanks

View 8 Replies View Related

File Groups

Jun 26, 2006

Hi everyone,
While creating our database in only one disc(C or D), suppose that we create more than one file group in order to group our data files. However, in this situation; I wonder that whether it brings any benefit or advantage to us.

Also, I wonder that why we always have to put our data file into separate file group if we use separate discs for data files. Is not it allowed to use only one file group even if we use separate dics ?

Would you explain these to me ?

Thanks

View 13 Replies View Related

Reduce File Groups

Aug 17, 2000

I had a database that’s comprised of different file groups and log files spread out among different hard drives. I have recently upgraded the database to SQL 7.0 on a RAID 10 volume. I would like to consolidate all the file groups and files as well as various log files into one primary datafile and logfile. How do I do that? Thanks in advance.

View 2 Replies View Related

How To List All File Groups

Jul 20, 2004

How to list all the file groups

View 1 Replies View Related

Regaring File Groups

May 6, 2004

I am currently converting some Oracle scripts to SQL Server. Encountered this following code segment in a CREATE TABLE query :

CONSTRAINT ck_PK PRIMARY KEY ( O_ID) USING INDEX TABLESPACE DIRECT PCTFREE 10 STORAGE ( INITIAL 65536)) TABLESPACE DIRECT PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE ( INITIAL 65536 MINEXTENTS 1 MAXEXTENTS 2147483645 FREELISTS 1 FREELIST GROUPS 1)

what is the equivalent conversion in SQL Server. Is it just ON PRIMARY in the PRIMARY KEY clause ?? Are the Segments and Extents in Oracle equivalent to Filegroups in SQL Server.

Appreciate your help

View 1 Replies View Related

Transfering Talbes To File Groups

Nov 23, 1999

hello

how can i transfer my already user created tables from primary group to newly created file group.

View 2 Replies View Related

Balancing IO. File Groups Vs Raid

Jul 20, 2005

I will be doing some performance testing on financial application nextmonth. Without going into a lot of details, I suspect I will have apotential bottleneck when writing to the log file.My hardware setup is a quad 2.8 Xeon Dell server direct attached to aDELL/EMC CX200 (Fibre channel array with 10 X 30something GB, 15,000rpm drives, with about 1GB of memory on the array for caching.This is a benchmark environment, so I am not concerned about loosingdata. I am looking for a little guidance on using raid (0 or 10)and/or file groups to spread IO to db objects (log file(s), data,indexes, tempdb, etc). I have read about and played with file groupsenough to know that SQL server does some level of load balancingacross file, but am unclear it is in parallel or serialized.Common wisdom seems to be to separate data, non-clustered index, logs,and tempdb onto separate files, but I am unclear on how to make bestuse of the high-speed disk array. I'd greatly appreciate opinions onwhich would perform better; one file on a stripe set of N drives (raid0 or 10), N files in a file group placed on N (non-striped) drives, ora combination of the two? Is the answer the same for both log and data(or index) files?Thanks,-Bernie

View 6 Replies View Related

SQL 2012 :: Rebalancing Data In File Groups

Apr 28, 2014

I am looking for the easiest way of rebalancing data across multiple files.

Instead of creating a secondary filegroup and then dropping and recreating all indexes in the database which is going to take ages (we have a lot of tables and indexes), I am trying to just add more files to the primary file group and then rebalance data evenly between these.

I guessed that adding the new files to the primary file group and then rebuilding all indexes on a table should redistribute the table over these multiple file groups evenly. This is not the case though. It does rebalance data a bit but I still end up with the majority on the first file that existed.

I have attached the script I am running, maybe it is something in the create database/file statements that is the issue.

Basically what I am seeing is to start off with the table is 160MB. I then add the file groups and rebuild all indexes on the table. The first file is then about 100MB and each of the three other files are about 20MB. I would expect them all to be the same size.

View 4 Replies View Related

SQL 2012 :: Tables On Separate File Groups

Jul 30, 2014

We have a large Datawarehouse and the size is 50TB.. The tables are placed in filegroups based on the schema like fact, dimensions, raw data each sit on seperate filegroups. I am thinking will it make sense to seperate the large facts which are having billions of rows so that they reside on filegroups on their own..

View 9 Replies View Related

Transact SQL :: List All File-groups For All Databases?

May 27, 2009

I would like to SELECT all filegroup on an SQL server instance, is that possible?Or only per database?

View 21 Replies View Related

Error Loading Tables Of Different File Groups.

Apr 6, 2006

Hi All,

I am facing a peculier problem. Problem definition goes like this,

I have one staging DB in which all the tables resides in Primary file and one production DB in which tables resides in 2 secondary files.

Now when iam trying to load the data from the table A in staging which is on primary file to the table A1 in production DB which in secondary file, all the data are going to error log instead of table A1.

Can you please tell me, where am i going wrong.

Regards,

Chetan

View 2 Replies View Related

File Groups: Moving A Large Table

May 8, 2007

We have recently added a new file group and file on a new drive. We have tested it by moving a small table to the new file group. We would like to relocate a new table to this file group but the table is about (we estimate) 75GB. My question is this: How long can we expect the transfer of data from the current file group to the new one for this table? I understand that depending on our hardware the answer may vary but does anyone have a rough estimate?

The current current (primary) file is located on a DELL SAN and the new secondary group is on a EMC 4700 both are connected via fiber channel.

Also a bonus question would be: Does a "normal" database backup created as a maintenance plan backup the seconary data as well into the BAK file?

Like I said a rough estimate is fine.

Many thanks,

Scott

View 4 Replies View Related

File Groups For Table Partitioning And Storage

May 31, 2007

Hello,



I am building partitiong tables, partitioning on different file groups:



the question is:



Partitioned table referred to old data that are not frequent accessed for reporting can be stored on separate location(External storage, tape and so on) or to make partitioning functioning must all file groups must be presents?



If not, how can I separate old data from current ones (still using partitioning) to reduce the size of DB?



What it is the best for storage data and easy to access it when needs arise (eg reporting): Tape, external storage, others?



Thank

View 1 Replies View Related

Problem With Matrix (in Subreport, Multiple Groups), Groups Repeating First Row Data

Jan 25, 2008

I have a new SQL 2005 (SP2) Reporting Services server to which I've just upgraded and deployed some SSRS 2000 reports.

I have a subreport that contains a matrix with two groups. The report data seems to be inexplicably repeating the data for the first row in the group for all rows in the group. Example:









ID1
ID2
DisplayData

1
1
A

1
2
B

1
3
C

2
1
A

2
2
B

2
3
C

Parent group is on ID1, child group is on ID2, report would show:








1
1
A

2
A

3
A

2
1
A

2
A

3
A


Is this a matrix bug in 2005 SP2, or do I need to do something differently? I can no longer pull a comparison version from an SSRS 2000 server to verify, but I believe it was working as expected before...

View 2 Replies View Related

SQL 2012 :: Any Variation While Adding File Groups And Files?

Sep 17, 2014

When the database is configured for mirroring and you want to do partitioning on that database, How can we do? Is this similar process or any variation there while adding file groups and files? The partition will reflect in the mirroring database also?

View 1 Replies View Related

SQL Server Admin 2014 :: Way To Restore All File Groups Except One?

Oct 19, 2015

is there a way to restore all file groups except one? example: Database A has 10 filegroups, but 1 of them is defunct, so i cant delete it and there's no backup for restore it.Can I create a new DB restoring the 9 good FGs from a database A's backup?

View 9 Replies View Related

Transact SQL :: Backup Primary File Groups With No Procedures?

Aug 20, 2015

I would have to handover my DB with only Primary tables to client as part of SLA. 

I am planning to keep these primary tables on a secondary file-group but how-ever, I will still have my procedures on primary file-group. 

How can I accomplish this with client having no exposure to my stored procedures. 

View 2 Replies View Related

SQL 2012 :: 500GB Data Warehouse - How To Split It Into File Groups

Aug 21, 2014

OK, so I have:

- 500 GB DW
- 5 GB in smaller DBs
- 220 GB TempDB
- 350 GB in Log files.

My machine is Fujitsu Primergy 64 cores (with HT) and 192 GB RAM.

I have several IO locations:

- 540 GB in-server HDD 15k RAID10
- 1 TB HDD 15k RAID10 on SAN (separete controller)
- 2 TB HDD 15k RAID10 on SAN (same controlller as below)
- 800GB SSD RAID10 on SAN (same controller as above)

Data warehouse has 2 fact tables that are absolutely crucial and quite large.

Now i want to organize DB into several Filegroups and put them on different drives. Filegroups I'm thinking of:

- FILEGROUP1: for 1st crucial Fact Table
- FILEGROUP2: for 2nd crucial Fact Table
- FILEGROUP3: for tempDB
- FILEGROUP4: for dimensions data
- FILEGROUP5: for the rest of facts data
- FILEGROUP6: for dimensions indexes
- FILEGROUP7: for the rest of facts indexes
- FILEGROUP8: for 1 log file of one smaller DB (its in full-recovery and its quite large)
- FILEGROUP9: for the rest of log files
- FILEGROUP10: others

How should I organize them across available drives? I was thinking about sth like:

800 GB SSD: FILEGROUPS 1-3
2 TB RAID10: FILEGROUPS 5+7+8
1 TB RAID10: FILEGROUPS 4+6+10
540 GB in-server: FILEGROUP 9

I know that having multiple filegroups on the same drive is pointless regarding performance, but in future i could actually add some more drives, so i want to separate them now.

Also - how much files per filegroups should i create? Considering 1 or 2. Except TempDB where I am going for 4.

View 2 Replies View Related

Restoring 2000 Backups On 2005 With Read-only Db And File Groups

Mar 30, 2007

We have a set of databases some are fully read-only others have read-only file groups, is there any way to restore backups of these taken on an MSDE 2000 to an SQL Express 2005 instance?

When doing the inplace upgrade we change these to read-write before the upgrade and set them back after the upgrade.

These databases are used in the field by customers althought the controlled upgrade requires a backup before (and blocks if it fails) and tries a backup after if the post upgrade backup fails (due to disk space) we might need to recover from this odd situation.

The only solution I have is install MSDE some place restore to this then do the controlled upgrade again, any other ideas?

View 2 Replies View Related

Indexes On Seperate Logical File...

Sep 22, 2000

Hi all -

Quick question... I want to move all my non-clustered indexes to their own seperate drive array. How would I accomplish this?

Do I just add the filename at the end of the statement like you do in Oracle? (EXAMPLE: CREATE INDEX IDX_Cls_Code on dbo.Class(Code) on secondary.ndf)

If this isn't correct, can someone please post the correct syntax?

Thanks!

Rich

View 1 Replies View Related

Create Indexes - Own File Group

Mar 12, 2007

With help of others on this group, I've been learning and researchingabout indexes; an area I neglected.I see I can specify which filegroup I wish to create an index, whichthe default is Primary.I have more than one drive in my SQL server where I put data and logson their own logical raid groups.My databases are SIMPLE, so they dont use much, if any logs (none as Iunderstand).I was thinking of adding an additional file to my database and use itsolely for the indexes.Any thoughts?SQL Server 2005 Enterprise x64 SP28 disk SAS Raid 1+0 w/ 512mb ram w/ battery backup.Thanks,Rob

View 2 Replies View Related

How To Migrate Existing Indexes To A Different File Group?

Apr 21, 2003

Is there any utility to migrate the existing indexes on default filegroup to a new user defined file group? The only way that I know is to delete the index and recreate with new filegroup.

How about for table? Is there any utility for migrating the existing tables to a different filegroup? The only way that I know is to create a clustered index on the new filegroup which will move the table to the new filegroup. If a clustered index exists then drop the clustered index and recreate it with the new filegroup

I am looking for an existing utility which would do the above?

Any help is appreciated.

Thanx in advance.

View 4 Replies View Related

DB Design :: Need To Recreate All Indexes From Primary To Secondary File Group

Jul 14, 2015

I have a database around 500 GB. right now the database have only one data file and one log, it has only one filegroup also.all the indexes and table are placed in Primary Filegroup . we are going to separate them. the planing is to move all the indexes to Secondary filegroup and all the table will be in Primary filegroup.But there will be a problem while implementing it because there are around 600 tables and each table have at least 2 non-clustered index , so is there any way to move all the index to Secondary Filegroup.

View 3 Replies View Related

Removal Of Selected Indexes / Script Index Create For List Of Indexes

Jul 1, 2014

I'm working to improve performance on a database I've inherited, and there are several thousand indexes. I've got a list of ones which should definitely exist within the database, and I'm looking to strip out all the others and start fresh, though this list is still quite large (1000 or so).

Is there a way I can remove all the indexes that are not in my list without too much trouble? I.e. without having to manually go through them all individually. The list is currently in a csv file.

I'm looking to either automate the removal of indexes not in the list, or possibly to generate the Create statements for the indexes on the list and simply remove all indexes and then run these statements.

As an aside, when trying to list all indexes in the database, I've found various scripts to do this, but found they all seem to produce differing results. What is the best script to list all indexes?

View 5 Replies View Related

A Question About Clustered Indexes Forcing Rebuild Of Non-clustered Indexes.

Sep 18, 2007

So I'm reading http://www.sql-server-performance.com/tips/clustered_indexes_p2.aspx and I come across this:
When selecting a column to base your clustered index on, try to avoid columns that are frequently updated. Every time that a column used for a clustered index is modified, all of the non-clustered indexes must also be updated, creating additional overhead. [6.5, 7.0, 2000, 2005] Updated 3-5-2004
Does this mean if I have say a table called Item with a clustered index on a column in it called itemaddeddate, and several non-clustered indexes associated with that table, that if a record gets modified and it's itemaddeddate value changes, that ALL my indexes on that table will get rebuilt? Or is it referring to the table structure changing?
If so does this "pseudocode" example also cause this to occur:
sqlstring="select * from item where itemid=12345"
rs.open sqlstring, etc, etc, etc
rs.Fields("ItemName")="My New Item Name"
rs.Fields("ItemPrice")=1.00
rs.Update
Note I didn't explicitly change the value of rs.fields("ItemAddedDate")...does rs.Fields("ItemAddedDate")=rs.Fields("ItemAddedDate") occur implicitly, which would force the rebuild of all the non-clustered indexes?

View 4 Replies View Related

SQL Server 2008 :: Logic To Rebuild Only Clustered Indexes / Skipping To Rebuild Non Clustered Indexes In Same Table

Jun 25, 2015

I have a requirement to only rebuild the Clustered Indexes in the table ignoring the non clustered indexes as those are taken care of by the Clustered indexes.

In order to do that, I have taken the records based on the fragmentation %.

But unable to come up with a logic to only consider rebuilding the clustered indexes in the table.

create table #fragmentation
(
FragIndexId BigInt Identity(1,1),
--IDENTITY(int, 1, 1) AS FragIndexId,
DBNAME nvarchar(4000),
TableName nvarchar(4000),

[Code] ....

View 5 Replies View Related

Indexes Vs Clustered Indexes

Sep 17, 2006

What is the difference please?

View 1 Replies View Related

Counts By Groups

Jan 8, 2007

I expect to get a record below with a count of 0 (and I do), but when I take the comments out (--) of lines 1 & 6 I don't understand why I get no records at all. I need to be able to see all teams in EvalAnswers even if none of the records satisfies the where clause.1 select Count(*) as cnt--, TeamID
2 from EvalAnswers
3 where CoID=@CoID
4 and EvaluatorID=@EvaluatorID
5 and (Scr0=0 and Sugg0 is NULL)
6 --group by TeamID
7

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved