![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have inherited a system where the previous DBA added 7 data files to the PRIMARY filegroup and left the AUTOGROW option at 8MB. What I have now is a set of eight files each about 3 - 4 GB in size that has been slowly growing over a two-year period. I'd like to remove the fragmentation in the fastest way possible. Here are the options I can think of: 1. Expand the 1st file in the PRIMARY filegroup by ~28 GB (7 files x 4 GB) 2. Move the data off each of the successive files and mark them for deletion 3. Delete the other 7 files 4. Detach the database 5. Copy the detached database file to a different drive on the server 6. Copy the detached database file back to the original drive 7. Reattach the database or 1. Create a new database 32 GB in size (8 x 4 GB) 2. Transfer all of the objects, tables, users and permissions to the new database using SSIS 3. Drop the old database 4. Rename the new database I honestly do not know which is the best or if it will even work. Also, this database is being mirrored and replicated. |
#3
| |||
| |||
|
|
Hi, I have inherited a system where the previous DBA added 7 data files to the PRIMARY filegroup and left the AUTOGROW option at 8MB. What I have now is a set of eight files each about 3 - 4 GB in size that has been slowly growing over a two-year period. I'd like to remove the fragmentation in the fastest way possible. Here are the options I can think of: 1. Expand the 1st file in the PRIMARY filegroup by ~28 GB (7 files x 4 GB) 2. Move the data off each of the successive files and mark them for deletion 3. Delete the other 7 files 4. Detach the database 5. Copy the detached database file to a different drive on the server 6. Copy the detached database file back to the original drive 7. Reattach the database or 1. Create a new database 32 GB in size (8 x 4 GB) 2. Transfer all of the objects, tables, users and permissions to the new database using SSIS 3. Drop the old database 4. Rename the new database I honestly do not know which is the best or if it will even work. Also, this database is being mirrored and replicated. Thanks for your help. |
![]() |
| Thread Tools | |
| Display Modes | |
| |