Home All Groups Group Topic Archive Search About

SQL7 2 DB files down to one???



Author
1 Jun 2005 3:15 PM
J Hotch
having moved 2 of our SQL servers onto new hardware, we now have no space
issues. previously some of out DB's had to have multiple files spread across
different disks due to disk size limits.

now that we can locate a whole DB on a single disk again, is there any way
(or even any point) of moving the data from the other files back into a
single Primary file for each DB?..... and would you expect this to improve
performance in any way (especially in backup and restore times)

not being an SQL wizz, i've looked and found the "alter database" T-SQL
command..... am i on the right track?

many thanks in advance.

Author
1 Jun 2005 4:34 PM
Hari Prasad
Hi,

Use dbcc shrink file with the EMPTYFILE option. This is under the assumption
that the mdf
and the ndf files are in the same filegroup. aFTER that you can use ALTER
DATABASE
to remove the unwanted ndf file.

Thanks
Hari
SQL Server MVP

Show quoteHide quote
"J Hotch" <jonathan.hotchkiss-remo***@tesco.net> wrote in message
news:6B714A48-B081-4D33-9A6B-C19C9F949F3F@microsoft.com...
> having moved 2 of our SQL servers onto new hardware, we now have no space
> issues. previously some of out DB's had to have multiple files spread
> across
> different disks due to disk size limits.
>
> now that we can locate a whole DB on a single disk again, is there any way
> (or even any point) of moving the data from the other files back into a
> single Primary file for each DB?..... and would you expect this to improve
> performance in any way (especially in backup and restore times)
>
> not being an SQL wizz, i've looked and found the "alter database" T-SQL
> command..... am i on the right track?
>
> many thanks in advance.
Are all your drivers up to date? click for free checkup

Author
1 Jun 2005 9:37 PM
Wayne Snyder
If you have multiple filegroups then it will be more difficult... If the
other filegroup only has indexes, you can simply drop and re-create the
indexes... If the other FG has tables, you can drop/recreate the Clustered
index on the FG you wish to keep..
Then you can drop the files in the other FG...


--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)

I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org

Show quoteHide quote
"J Hotch" <jonathan.hotchkiss-remo***@tesco.net> wrote in message
news:6B714A48-B081-4D33-9A6B-C19C9F949F3F@microsoft.com...
> having moved 2 of our SQL servers onto new hardware, we now have no space
> issues. previously some of out DB's had to have multiple files spread
> across
> different disks due to disk size limits.
>
> now that we can locate a whole DB on a single disk again, is there any way
> (or even any point) of moving the data from the other files back into a
> single Primary file for each DB?..... and would you expect this to improve
> performance in any way (especially in backup and restore times)
>
> not being an SQL wizz, i've looked and found the "alter database" T-SQL
> command..... am i on the right track?
>
> many thanks in advance.
Author
6 Jun 2005 4:45 AM
Anthony Thomas
Actually, the Backup and Restore operations are Chief Considerations for
actually RETAINING the multiple files per filegroup.  This is how you ensure
disk parallelism.

Now, to achieve this, you do NOT have to have the files on seperate disks to
gain the performance boost.

Sincerely,


Anthony Thomas


--

"J Hotch" <jonathan.hotchkiss-remo***@tesco.net> wrote in message
news:6B714A48-B081-4D33-9A6B-C19C9F949F3F@microsoft.com...
having moved 2 of our SQL servers onto new hardware, we now have no space
issues. previously some of out DB's had to have multiple files spread across
different disks due to disk size limits.

now that we can locate a whole DB on a single disk again, is there any way
(or even any point) of moving the data from the other files back into a
single Primary file for each DB?..... and would you expect this to improve
performance in any way (especially in backup and restore times)

not being an SQL wizz, i've looked and found the "alter database" T-SQL
command..... am i on the right track?

many thanks in advance.

Bookmark and Share