Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9239

Re: Segment Usage/Freespace by device.

$
0
0

Sorry, but without some idea of *what* all of your possible database allocations look like, and what you think the report should look like, trying to 'debug' your SQL would be a waste of time.

 

I would suggest:

 

1 - rethinking the general plan; because segments can span disk fragments, and multiple segments can reside on a single fragment, I'd recommend reporting on space at the segment level ... or log vs non-log (though this gets tricky with fragments that include data and log allocations)

 

2 - take a look at the source code for sp_helpsegment; the logsegment calculations may take a few minutes to comprehend but once you understand how sp_helpsegment works you should have no problems coming up with a custom query to generate the report you want

 

NOTE: Once you've figured out how sp_helpsegment works you should look at removing the hard-coded page size (16) thus making sure you're query can run in any ASE.


Viewing all articles
Browse latest Browse all 9239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>