Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Summery of all Used Oracle-Blocks

Re: Summery of all Used Oracle-Blocks

From: <markp7832_at_my-deja.com>
Date: Thu, 11 Nov 1999 14:31:20 GMT
Message-ID: <80ejvo$qn0$1@nnrp1.deja.com>


In article <80e9t3$rcu$1_at_news2.tor.accglobal.net>,   "John Chiu" <johnymc_at_netscape.net> wrote:
> to obtain the number of blocks allocated (A):
> select blocks from dba_segments where segment_name='table_name';
>
> to obtain the number of unused blocks (B):
> analyze table tablename compute statistics;
> select empty_blocks from dba_tables where table_name=;tablename';
>
> # of used blocks (including headers) = A - B
>
> HTH
>
> John Chiu
>
>

Karl R asked >>>
Hello!

I am backing up with Oracle8/rman80.
Rman only backups used Oracle-Blocks.

But the statement i used for to control the backupsetsize gives the allocated segments not the used OracleBlocks, they could be less.

Do you know a statement for the exact number of used Oracle-Blocks? Thank you! <<<<<

Karl,

For those not familiar with rman, it will back up only blocks used since the last backup or all blocks in a files as requested via its control cards.

If you are asking how to calculate how many blocks have been used by Oracle since the last backup then the only way I can think of to determine this would be to take the scn number of the last backup and compare it to the scn number in each Oracle data block in the file. Oracle does not track this information in its SGA or control file to my knowledge. So unless rman gives you this information then you will have to write your own program to do this. I do not think it is worth the trouble.

--
Mark D. Powell -- The only advice that counts is the advice that  you follow so follow your own advice --

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Nov 11 1999 - 08:31:20 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US