Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

moving tables
Hi,

ms-sqlserver 2000 sp4 - entrerprise edition

Can you help me on this issue. I would like to move some user
tables(about 100 MB) to new file group. Can you tell me what I need to
do?

Thanks in advance,


Report this thread to moderator Post Follow-up to this message
Old Post
he_msql
01-31-06 01:23 AM


RE: moving tables
If you have clustered index on all the tables then just recreate the
clustered and non-clustered indexes and specify the new filegroup. Else
you can bcp out the data and then create the table in new file group and bcp
in the data.

"he_msql" wrote:

> Hi,
>
> ms-sqlserver 2000 sp4 - entrerprise edition
>
> Can you help me on this issue. I would like to move some user
> tables(about 100 MB) to new file group. Can you tell me what I need to
> do?
>
> Thanks in advance,
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
harvinder
01-31-06 01:23 AM


RE: moving tables
Hi,

Due to the details of moving tables (i.e. moving constraints, etc), it is
considered best practice to allow Enterprise Manager do the work for you.
Enterprise Manager knows what to move.  I haven't found a stored procedure t
o
do the trick, so you will have deal with the GUI of Enterprise Manager.  If
you happen to know one, please post.

This subject is located in the Books Online under  'filegroups:switchin
g
filegroup for table'.   Here is the procedure...

How to place an existing table on a different filegroup (Enterprise Manager)
To place an existing table on a different filegroup
1. Expand a server group, and then expand a server.
2. Expand Databases, expand the database in which the table belongs, and
then click Tables.
3. In the details pane, right-click the table, and then click Design Table.
4. Right-click any column, and then click Properties.
5. On the Tables tab, in the Table Filegroup list, select the filegroup on
which to place the table.
6. Optionally, in the Text Filegroup list, select a filegroup on which to
place any text, image, and ntext columns.

HTH,
Adam

"he_msql" wrote:

> Hi,
>
> ms-sqlserver 2000 sp4 - entrerprise edition
>
> Can you help me on this issue. I would like to move some user
> tables(about 100 MB) to new file group. Can you tell me what I need to
> do?
>
> Thanks in advance,
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Goose
01-31-06 08:23 AM


Re: moving tables
If the tables are defined relations (i.e. Foreign Key constraints), then
it is probably easiest to use Enterprise Manager to do the work and/or
create the script to do the work.

If there are no tables referencing the table you want to move, and if
this table has a clustered index, then the most efficient way to move
it, is to recreate the clustered index with the original name and
definition with "CREATE INDEX ... ON ...(...) WITH DROP_EXISTING ON
[your target filegroup]"

The same method can be used for nonclustered indexes.

If the table is a heap, then create a clustered index ON [your target
filegroup] and drop the clustered index afterwards.

HTH,
Gert-Jan

he_msql  wrote:
>
> Hi,
>
> ms-sqlserver 2000 sp4 - entrerprise edition
>
> Can you help me on this issue. I would like to move some user
> tables(about 100 MB) to new file group. Can you tell me what I need to
> do?
>
> Thanks in advance,

Report this thread to moderator Post Follow-up to this message
Old Post
Gert-Jan Strik
02-01-06 01:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 05:08 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006