|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL7 2 DB files down to one???
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. 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. 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... -- Show quoteHide quoteWayne 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 "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. 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 having moved 2 of our SQL servers onto new hardware, we now have no spacenews:6B714A48-B081-4D33-9A6B-C19C9F949F3F@microsoft.com... 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.
Other interesting topics
Problem with osql.exe -L
Simple Question: What's the best way to duplicate a DB under another name? Server: Msg 7391, Level 16, State 1, Procedure <OBJECT>, Line varchar vs nvarchar stored procedure with different criteria Removing Identity Property Autonumber Query Cost - how is it calculated? Memory usage - double of the expected value? Reflective linking |
|||||||||||||||||||||||