Hey guys I have a VLDB and I would like to point or move several tables to another filegroup.
1). Add a filegroup to the database
ALTER DATABASE dbname
ADD FILEGROUP filename_table
go
2). Add a file to the file group
ALTER DATABASE dbname
ADD FILE
....
TO FILEGROUP filename_table
go
If a table is already part of the primary filegroup:
Can I change it to another filegroup?
When changed to the another filegroup will it move the whole table to the other filegroup or just start to write data to the newly created filegroup?In order to move the table to another filegroup, you need to first move the data, then move any indexes that you also want on that filegroup or another filegroup. To move the data, you need to create or alter the clustered index. To move the indicies, you need to drop and recreate the indicies.
-PatP|||thanks Pat for the heads up I will work towards that...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment