Calculating the size of the depending on the AUTOEXTENSIBALE [message #679449] |
Mon, 02 March 2020 00:22 |
|
revathitirun
Messages: 16 Registered: May 2011
|
Junior Member |
|
|
Hi All ,
I need to calculate the my database total, used and frees size. I am using the below query :
SELECT Reserved_Space_gb,
Reserved_Space_gb - Free_Space_gb Used_Space_gb,
Free_Space_gb
FROM
(SELECT
(SELECT ROUND(SUM(bytes/(1014*1024*1024)),2) FROM dba_data_files) Reserved_Space_gb,
(SELECT ROUND(SUM(bytes/(1024*1024*1024)),2) FROM dba_free_space) Free_Space_gb
FROM dual
);
But as per my DBA Calculation was different. They are depending on the autoextensible parameter of table space.
Could any body please explain the significance autoextensible parametric to calculate the size of the database
Thanks
Revathi
|
|
|
Re: Calculating the size of the depending on the AUTOEXTENSIBALE [message #679450 is a reply to message #679449] |
Mon, 02 March 2020 01:24 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
First:
(SELECT
(SELECT ROUND(SUM(bytes/(1014*1024*1024)),2) FROM dba_data_files) Reserved_Space_gb,
(SELECT ROUND(SUM(bytes/(1024*1024*1024)),2) FROM dba_free_space) Free_Space_gb
FROM dual
);
is just
(SELECT ROUND(SUM(bytes/(1014*1024*1024)),2) Reserved_Space_gb FROM dba_data_files),
(SELECT ROUND(SUM(bytes/(1024*1024*1024)),2) Free_Space_gb FROM dba_free_space)
no need of this dual stuff.
AUTOEXTENSIBLE just means that the file may extend, at OS level, if space is needed; your query gives the allocated space of and used and free space in the database for the current size of the files.
[Updated on: Mon, 02 March 2020 02:43] Report message to a moderator
|
|
|
|
|
|