Solved

SQL Server files & filegroups

Posted on 2013-02-07
8
231 Views
Last Modified: 2013-02-07
Hi

We have a database that is growing quite large with legacy data, we are archiving the old data into archive tabes within the same database. The data has to be available for reporting.

It has been suggested that these archive tables can point to different files than the main database.

How is this done - I can create a new file, but how do I get the data from the archive tales to use it.

Andy
0
Comment
Question by:Andy Green
  • 4
  • 4
8 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 38863894
steps:
1) create a new filegroup
2) create a new file into this filegroup
3) move the table to the new filegroup
  => to perform that step, you use the "clustered index trick"
  a) if the table has already a clustered index: drop it, and recreate it and specify the new filegroup
  b) if the table does not have a clustered index, create a clustered index on the filegroup
0
 
LVL 3

Author Comment

by:Andy Green
ID: 38863926
I have done as you suggest, yet when I do a properties on the table, the storage still says Primary not Archive as I'd expect.

If I look at the properties for the index that too says Primary.

Andy
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38863942
then you did not create the clustered index correctly.
please show how you created the index
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 3

Author Comment

by:Andy Green
ID: 38863964
Opened the table in design mode
Clicked TableDesigner
Clicked Index Keys

from the pop up I clicked Add
In the section Data Space Specification I selected Archive.

If I go back into this it says Archive, its just the properties that report wrong.

I have refreshed.

Andy
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38863989
you have to "SAVE" those changes, otherwise it will not be effective.
0
 
LVL 3

Author Comment

by:Andy Green
ID: 38864039
Sorted it, rather than open the table in Design, I added the index by opening the table dropdown | Indexes | Add.

Andy
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38864061
good :)
glad I could help
0
 
LVL 3

Author Closing Comment

by:Andy Green
ID: 38864078
Thanks for your help

Andy
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question