Hi
I wanted the know the syntax, how we can move a particular table (lets say a
database having two filegroup in c, d drive) from c: drive to d: drive
without detaching that particular database
Hello,
If you have a clustered index on that table use CREATE INDEX with
DROP_EXISTING on your clustered index specifying new filegroup. THis will
move the table, data
and clustered index to the new filegroup (Data always follws the clustered
index). Incase if you do not have one then craete it temporarly on the new
file group
and drop it after.
Syntax:-
CREATE CLUSTERED INDEX <Clust_idx_name> ON Table_name
(COlumn_name) WITH DROP_EXISTING ON "NewFileGroup"
For non clustered index you could use DROP_Existing on the Create index
statement to move it to new filegroup.
Thanks
Hari
"shiva" <shiva@.discussions.microsoft.com> wrote in message
news:3EB80D03-5B8B-4032-88B5-5789B3966A5F@.microsoft.com...
> Hi
> I wanted the know the syntax, how we can move a particular table (lets say
> a
> database having two filegroup in c, d drive) from c: drive to d: drive
> without detaching that particular database
No comments:
Post a Comment