dbTalk Databases Forums  

spliting db files into multi-files

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss spliting db files into multi-files in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JJ Wang
 
Posts: n/a

Default spliting db files into multi-files - 06-01-2004 , 08:53 PM






hi,

I have a sql server 2000 database which has only one file
and one file group (primary). This file has grow to be
over 40 gig, I want to have two db files for this db,
which should have 20 gig each. What's the best way to do
it?

I don't think 'DBCC SHRINKFILE' with 'emptyfile' command
will do the trick if you only have one .mdf file.

the only way I can think of right now, is to create a new
identical db with two db files defined, and then DTS the
tables from the old db into the new db.

any better and faster ways?

many thanks,

JJ

Reply With Quote
  #2  
Old   
oj
 
Posts: n/a

Default Re: spliting db files into multi-files - 06-01-2004 , 10:27 PM






You want to add a new file/group to your database. Drop and recreate clustered
indexes for the table(s) on the new filegroup. This will move the data for you.


"JJ Wang" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
hi,

I have a sql server 2000 database which has only one file
and one file group (primary). This file has grow to be
over 40 gig, I want to have two db files for this db,
which should have 20 gig each. What's the best way to do
it?

I don't think 'DBCC SHRINKFILE' with 'emptyfile' command
will do the trick if you only have one .mdf file.

the only way I can think of right now, is to create a new
identical db with two db files defined, and then DTS the
tables from the old db into the new db.

any better and faster ways?

many thanks,

JJ



Reply With Quote
  #3  
Old   
JJ Wang
 
Posts: n/a

Default Re: spliting db files into multi-files - 06-08-2004 , 07:32 PM



thanks oj. this is a good trick.

JJ
Quote:
-----Original Message-----
You want to add a new file/group to your database. Drop
and recreate clustered
indexes for the table(s) on the new filegroup. This will
move the data for you.


"JJ Wang" <anonymous (AT) discussions (DOT) microsoft.com> wrote in
message
news:16b9201c44844$628759b0$a401280a (AT) phx (DOT) gbl...
hi,

I have a sql server 2000 database which has only one
file
and one file group (primary). This file has grow to be
over 40 gig, I want to have two db files for this db,
which should have 20 gig each. What's the best way to
do
it?

I don't think 'DBCC SHRINKFILE' with 'emptyfile' command
will do the trick if you only have one .mdf file.

the only way I can think of right now, is to create a
new
identical db with two db files defined, and then DTS the
tables from the old db into the new db.

any better and faster ways?

many thanks,

JJ


.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.