Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Move table, with blobs, to new filegroup?

Author  Topic 

aiken
Aged Yak Warrior

525 Posts

Posted - 2005-03-02 : 13:01:57
I'm familiar with dropping and recreating the clustered index on a table to move the data to a new filegroup. However, I've got a thornier problem: I need to move the blob (text, ntext) data in an existing very large table to a new filegroup. It's fine if the other columns move as well.

Any ideas, other than a huge copy/rename operation?

Thanks
-b

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-03-02 : 21:48:43
You can't move it to new filegroup, but you can add new files to the existing filegroup, then use DBCC SHRINKFILE...EMPTYFILE to move data out of the old files. Take a look under "ALTER DATABASE" and "DBCC SHRINKFILE" in Books Online.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-03-02 : 23:43:07
If you want to place the TEXT or NTEXT data in a different filegroup, you will have to go through the copy/rename operation.

Enterprise manager will generate a script to do this if you want, but that is the way it does it. You can have it create the script by going into Design Table for that table, selecting Properties, selecting Text Filegroup on the Tables tab, select the new filegroup, and then clicking the Close button. Then click the Save Change Script button on the menu bar to get the script.

It's up to you to decide if this is worth it and possible if it means a lot of downtime.


quote:
Originally posted by aiken

I'm familiar with dropping and recreating the clustered index on a table to move the data to a new filegroup. However, I've got a thornier problem: I need to move the blob (text, ntext) data in an existing very large table to a new filegroup. It's fine if the other columns move as well.

Any ideas, other than a huge copy/rename operation?

Thanks
-b



Codo Ergo Sum
Go to Top of Page
   

- Advertisement -