SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Any way to split large .mdf files?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

vinceseg
Starting Member

USA
1 Posts

Posted - 11/09/2012 :  09:08:59  Show Profile  Reply with Quote
I have a database that is currently 1900GB and we normally use filegroups and smaller mount points (500GB or 1TB) for SAN performance purposes.

Is there a way to take this large mdf file and "split it into a new database with multiple filegroups?

My only other option (since this will be on VMware) is to utilize RDM's but I'd prefer not to go that route since we're also looking to utilize VMware's DR product, and RDM's are a real pain.

Thanks,

Vince

chadmat
The Chadinator

USA
1974 Posts

Posted - 11/09/2012 :  12:42:28  Show Profile  Visit chadmat's Homepage  Reply with Quote
Why can't you just move to multiple files/filegroups?

-Chad
Go to Top of Page

srimami
Posting Yak Master

160 Posts

Posted - 11/20/2012 :  09:50:05  Show Profile  Reply with Quote
This depends on how many tables you have in the database. If you have only 1 table of huge size, you can create a filegroup with multiple files to this filegroup and move the data from primary to secondary filegroup (You an use create Index idx_name with Move syntax). If you have multiple tables and need to move the data to multiple files then move each table to a new file group/files independently.
Go to Top of Page

prett
Posting Yak Master

USA
199 Posts

Posted - 11/21/2012 :  23:14:43  Show Profile  Visit prett's Homepage  Reply with Quote
you can create additional database files and force the SQL Server to move data from the primary database file to the secondary database files.

use SSMS to connect to the SQL Server, click on the database, display property page, select Files and than add additional data files using .ndf extensions specifying max file size less than the size of the drives.

After adding the additional files, click on the server and open the context menu and select Task -> Shrink > Data Files and shrink the larger primary database file (.mdf) to a size smaller than the destination drive.

the process of moving data takes a long time.

the process is also described here: http://msdn.microsoft.com/en-us/library/ms189253.aspx and http://msdn.microsoft.com/en-us/library/ms190757.aspx
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000