Hi,
I have a database made up of a single Primary file group that SHOULD be about 12GB in size. I added 2 columns, Image_Sla and Image_Tif each being of type varbinary(max). Next I added data to them and the database has grown to more than 250GB and is completely unmanageable. If I do a simple select it takes 10 minutes for results.
So, to fix I thought that I should move those 2 fields into their own filegroup along with a key. I created filegroups FG_ImageSLA and FG_ImageTIF and created 2 tables ImageSLA and ImageTIF and placed each one into their own matching file group. Next, I copied the data from the primary filegroup's table into their matching table located in the new filegroups.
Next I deleted the 2 columns from the main table located in the Primary filegroup.
The size of the Primary mdf and ldf files refuses to shrink....
I set the recovery type to simple and that did reclaim the space that the log file was using, however I cannot get the mdf to go any lower than 250GB, even after:
1. defragmenting the harddrive,
2. backing up the trans log,
3. doing a full master backup,
4. doing a shrink database with full release option set,
5. doing a shrink on all the files with full release option set,
6.
Each of these steps has been done many different times and also in different sequences.
What do I do next?
Thanks, Stanley
My frustration level is currently high with SQL Server... Sorry, I come from a VFP background where things are done predictable and quickly. Add a blob field and add data to it the table size increases, delete the field and the table size decreases instantly back to its previous size. So far, it feels like the transition from VFP to SQL is actually going backwards. I see why 1 person can easily manage 20 VFP sites, while he/she has their hands full managing only a few SQL sites.
I have a database made up of a single Primary file group that SHOULD be about 12GB in size. I added 2 columns, Image_Sla and Image_Tif each being of type varbinary(max). Next I added data to them and the database has grown to more than 250GB and is completely unmanageable. If I do a simple select it takes 10 minutes for results.
So, to fix I thought that I should move those 2 fields into their own filegroup along with a key. I created filegroups FG_ImageSLA and FG_ImageTIF and created 2 tables ImageSLA and ImageTIF and placed each one into their own matching file group. Next, I copied the data from the primary filegroup's table into their matching table located in the new filegroups.
Next I deleted the 2 columns from the main table located in the Primary filegroup.
The size of the Primary mdf and ldf files refuses to shrink....
I set the recovery type to simple and that did reclaim the space that the log file was using, however I cannot get the mdf to go any lower than 250GB, even after:
1. defragmenting the harddrive,
2. backing up the trans log,
3. doing a full master backup,
4. doing a shrink database with full release option set,
5. doing a shrink on all the files with full release option set,
6.
Each of these steps has been done many different times and also in different sequences.
What do I do next?
Thanks, Stanley
My frustration level is currently high with SQL Server... Sorry, I come from a VFP background where things are done predictable and quickly. Add a blob field and add data to it the table size increases, delete the field and the table size decreases instantly back to its previous size. So far, it feels like the transition from VFP to SQL is actually going backwards. I see why 1 person can easily manage 20 VFP sites, while he/she has their hands full managing only a few SQL sites.