June 1, 2005 at 6:53 am
Is there any quick way of moving data from one filegroup to the other. I dont want to rebuilt the create table and create index script but just findinga way to create a new filegroupa nd move entire data form one to the other. any help will be greatly appreciated.
TIA
June 1, 2005 at 7:37 am
(Re)Create the clustered index on the new filegroup and specify WITH DROP_EXISTING. That will move the table. In case of indexes you'll need to drop and recreate manually, AFAIK.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 1, 2005 at 8:03 am
I believe Frank is right. If you have stored procedures and other objects, I think they have to be dropped and recreated on a new filegroup to move them as well.
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
June 2, 2005 at 4:26 am
If you don't want to have to re-script and your maintenance slot allows, you could do via Ent Mgr. Right click on table, select design, select the 'manage relationships' icon and then the table and/or indexes tab. You can switch filegroups there. Quick and easy if you haven't many tables or there not large. It clearly needs to do an underlying re-build though so be careful as large objects will take time
June 2, 2005 at 6:59 am
I would actually like to advocate that you never use EM for any kind of write operations, especially not as sensitive as shuffling data around. Main reason for this is simply that you lack control over what EM does, and in some cases interrupted work may stay that way - interrupted and unusable.
However, you may very well use EM to generate the scripts that EM itself uses on your behalf. The only difference is that you don't let EM execute the operation, instead you save the script. This also lets you review what EM intended to do with your request, and you can verify that your intentions was indeed those. After you have reviewed the EM-generated scripts, you should run it in QA. This will give you total control over any transactions performed.
..just my .02 anyway
/Kenneth
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply