|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, December 09, 2009 2:58 AM
Points: 4,
Visits: 32
|
|
Hi,
I have a database with 2 Filegroups and a log file. The filegroups are named PRIMARY and Data FileGroup1. The strange thing is that while Data FileGroup1 is set as default the PRIMARY filegorup is increasing. For example. the size of PRIMARY is 900MB whereas Data FileGroup1 is 40 MB. I want this to be the other way round. PRIMARY 40 MB and Data FileGroup1 900MB .
Can anyone please explain why this is hapenning and how to reverse the filegroups?
Regards, Vasilis
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Yesterday @ 4:14 AM
Points: 360,
Visits: 1,261
|
|
| Did you, by any chance, create any objects in "PRIMARY"?
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, December 09, 2009 2:58 AM
Points: 4,
Visits: 32
|
|
Yes i did. but when i create new objects now they go on the Data FileGroup1. So probably i added the Data FileGroup1 after i added objects on the Primary.
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Yesterday @ 4:14 AM
Points: 360,
Visits: 1,261
|
|
| Is there any activity involving the objects from "PRIMARY" - such as table inserts, etc ?
|
|
|
|
|
SSC-Dedicated
           
Group: Administrators
Last Login: Today @ 12:01 PM
Points: 31,436,
Visits: 13,750
|
|
Objects do not cross filegroups. If there is data being added to objects that were created in PRIMARY, that filegroup will grow. To move those objects to filegroup1,
- For tables, rebuild the clustered index on filegroup1 - for indexes, rebuild them on filegroup1 - for stored procs/UDFs, drop and recreate on filegroup1.
Follow me on Twitter: @way0utwest
 Forum Etiquette: How to post data/code on a forum to get the best help
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, December 09, 2009 2:58 AM
Points: 4,
Visits: 32
|
|
Well, I have around a hundred tables using the Primary file group with data.
Thanks for your help. How do i mark the post as closed?
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:16 PM
Points: 37,739,
Visits: 30,015
|
|
v_charalambous (12/9/2009) Thanks for your help. How do i mark the post as closed?
You don't. Don't worry about it.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:16 PM
Points: 37,739,
Visits: 30,015
|
|
Steve Jones - Editor (12/8/2009) - for stored procs/UDFs, drop and recreate on filegroup1. Stored procs, views and functions cannot have a filegroup specified. They're always stored inside the system tables which are always on the primary filegroup
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|