![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Now assuming I know enough about my database tables and relationships that I can formulate the SQL necessary for estimating the row and table sizes and dumping the actual data, the rest is really what I'm after. I've ascertained that S2K meta-data (namely in the dbo.sysfiles table) will tell me the size of the database file on disk by number of 8K pages. But I've also noticed (in playing around with a sandbox database) that it appears that the database allocation maybe larger than the actual data in it, I assume to keep from adding extents or something similiar? Again, my partial ignorance shines through... For example, the following script truncated my sandbox database down from 104mb on disk to 60-ish mb on disk without even removing a single record in the single flat table I had in the database: |
|
In summary, I'm not really asking someone to work out the logic for me. I feel adequate to put it together myself for what we need with a little bit of guidance. Perhaps someone pointing to a similar snippet of code or a URL that would be helpful. Finally, it's been suggested that this be done using DTS. My reading and little bit of S2K knowledge leads me to beleive this is more appropriate as an Agent Job. (We do want to be able to schedule, which I know we can do via DTS or as an SAJ.) |
![]() |
| Thread Tools | |
| Display Modes | |
| |