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 Administration (2000)
 moving tables between filegroups

Author  Topic 

potinenir
Starting Member

19 Posts

Posted - 2003-09-15 : 11:36:44
is it a valid method to move tables between filegroups using the enterprize manager.
1. open the table in design mode and click the icon table and index propertiies and change the table filegroup from primary to another filegroup and click the save .

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-09-15 : 11:54:58
Sure it is valid, but why would you want to do it that way? You won't learn anything by using EM to do the work. Use Query Analyzer instead.

Tara
Go to Top of Page

potinenir
Starting Member

19 Posts

Posted - 2003-09-15 : 16:43:19
Thank you. I was just wondering if this is a safe method. I donot know all the in and outs of sqlserver as i rarely work on SQLSERVER.
Go to Top of Page

VyasKN
SQL Server MVP & SQLTeam MVY

313 Posts

Posted - 2003-09-15 : 16:48:03
quote:
Originally posted by potinenir

Thank you. I was just wondering if this is a safe method. I donot know all the in and outs of sqlserver as i rarely work on SQLSERVER.



Enterprise Manager is a good tool to start with and to discover the features of SQL Server. But parallelly you should be looking up the commands and T-SQL syntax, if you are interested.

Sometimes Enterprise Manager does things in a roundabout manner. So, on a production system, you are better off doing stuff using Query Analyzer and scripting, where you know what you are doing. I suggest you use Profiler to see what Enterprise Manager is doing behind the scenes. Expect some surprises :-)

--
HTH,
Vyas
http://vyaskn.tripod.com
Go to Top of Page

potinenir
Starting Member

19 Posts

Posted - 2003-09-15 : 18:31:15
Thank you all once again for the input.
Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2003-09-15 : 21:17:21
Make your changes in EM, then instead of pressing "SAVE".. Use the "SAVE AS SCRIPT" option..
Good way to learn ...


DavidM

"SQL-3 is an abomination.."
Go to Top of Page

potinenir
Starting Member

19 Posts

Posted - 2003-09-16 : 07:53:43
That is a good one. Now is can see sql's EM uses to move the table.
Thankyou.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-09-19 : 21:59:15
One shortcut that lets you move existing data from one filegroup to another is to drop the table's clustered index (if it has one) then re-create the clustered index on the filegroup you wish:

CREATE CLUSTERED INDEX IX_myTable ON myTable(myColumn) ON [myFileGroup]

If you are using a clustered primary key constraint, you'd need to use ALTER TABLE...ADD CONSTRAINT to achieve the same result.
Go to Top of Page
   

- Advertisement -