help -- shrink data file size

help -- shrink data file size

Post by shu.. » Wed, 04 Oct 2000 04:00:00



Hello,

SQL 7.0 sp 2

After archiving some data, I need to release the unused space in data
file to the system. e.g. DBCC SHRINKDATABASE and DBCC SHRINKFILE didn't
work well. Do I need to reorganize every tables on the datafile? Is
there any kind of scripts/commands to check which tables are at the end
of the data file so that I can move them to a different datafile?
something like dbcc loginfo(databasename)?

Thanks a lot,

Shu

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

help -- shrink data file size

Post by Tibor Karasz » Fri, 06 Oct 2000 04:00:00


Shu,

From an architectural standpoint (I haven't had the need to shrink much myself, as I
preallocate space):

You don't have to reorganize first.
There is no problems with "tables at the end", such as there is with the log. SQL
Server moves datapages or rows to the beginning of the file for you.
--
Tibor Karaszi, SQL Server MVP
Please reply to the newsgroup only, not by email.
FAQ at: http://www.sqlserverfaq.com


> Hello,

> SQL 7.0 sp 2

> After archiving some data, I need to release the unused space in data
> file to the system. e.g. DBCC SHRINKDATABASE and DBCC SHRINKFILE didn't
> work well. Do I need to reorganize every tables on the datafile? Is
> there any kind of scripts/commands to check which tables are at the end
> of the data file so that I can move them to a different datafile?
> something like dbcc loginfo(databasename)?

> Thanks a lot,

> Shu

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

help -- shrink data file size

Post by Shu Huan » Fri, 06 Oct 2000 04:00:00


Thank Tibor for your reply.

After archiving some of my old data, I had the data file size around 18 GB
with about 5 GB unused. Even the autoshrink option was set to true, it took
some time for the system to reclaim the unused space. Now it's back to a
reasonable size now.

Appreciated,

Shu



> Shu,

> From an architectural standpoint (I haven't had the need to shrink much
myself, as I
> preallocate space):

> You don't have to reorganize first.
> There is no problems with "tables at the end", such as there is with the
log. SQL
> Server moves datapages or rows to the beginning of the file for you.
> --
> Tibor Karaszi, SQL Server MVP
> Please reply to the newsgroup only, not by email.
> FAQ at: http://www.sqlserverfaq.com




- Show quoted text -

Quote:> > Hello,

> > SQL 7.0 sp 2

> > After archiving some data, I need to release the unused space in data
> > file to the system. e.g. DBCC SHRINKDATABASE and DBCC SHRINKFILE didn't
> > work well. Do I need to reorganize every tables on the datafile? Is
> > there any kind of scripts/commands to check which tables are at the end
> > of the data file so that I can move them to a different datafile?
> > something like dbcc loginfo(databasename)?

> > Thanks a lot,

> > Shu

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

 
 
 

1. shrinking file size by deleteing data in image fields

I have an application that has a table that contains multiple small image files.  This table now needs to have it's images archived, but I wish to have the rest of the record remain.  I have set the image field data to 'null', and then proceeded to shrink the database.  No additional free space was reclaimed.

What i am really asking is how can i clean out field data on specific records and have the file size reduced because of less data in the file.  I have tried shrinking etc, but as of yet there is no way to regain that free area!

2. Journey near the end :)

3. DBCC Shrink File Bloating File Size

4. (?) How to get info into/out of DAC-Easy

5. Shrinking data file and log file

6. Help: SQL 6 Views read only (ODBC)

7. Shrinking Transaction Log File size in SQL7

8. Limiting the Display Width in Oracle

9. log file size - can't shrink

10. How Do I Shrink The Size Of A Data Device (Newbie)

11. How to shrink the Database size and Database Device size

12. Max database size vs max data file size

13. Newby help, please - shrinking table size