Environment information:
* Oracle version: Oracle Database 10G Enterprise Edition Release 10.2.0.3.0 - PROD
* Operating system: Linux
Good morning.
Please like to know if it is possible through a query to check the growth of the database.
Query should show monthly or total monthly growth.
Thanks!
Check Bank Growth
-
- Rank: DBA Pleno
- Posts: 264
- Joined: Sun, 19 Aug 2007 8:18 pm
- Location: Ribeirão Preto - SP
Lucas de Souza
OCA Developer
Analista de sistemas
OCA Developer
Analista de sistemas
Well, there's a view that shows the size of the data files, you can use it to make analyzes, but then you would need to save these infosms into other tables to compare the growth ...
has this script também:
has this script também:
-- -----------------------------------------------------------------------------------
-- File Name : http://www.oracle-base.com/dba/monitoring/free_space.sql
-- Author : DR Timothy S Hall
-- Description : Displays space usage for each datafile.
-- Requirements : Access to the DBA views.
-- Call Syntax : @free_space
-- Last Modified: 15-JUL-2000
-- -----------------------------------------------------------------------------------
SET SERVEROUTPUT ON
SET PAGESIZE 1000
SET LINESIZE 255
SET FEEDBACK OFF
SELECT Substr(df.tablespace_name,1,20) "Tablespace Name",
Substr(df.file_name,1,40) "File Name",
Round(df.bytes/1024/1024,2) "Size (M)",
Round(e.used_bytes/1024/1024,2) "Used (M)",
Round(f.free_bytes/1024/1024,2) "Free (M)",
Rpad(' '|| Rpad ('X',Round(e.used_bytes*10/df.bytes,0), 'X'),11,'-') "% Used"
FROM DBA_DATA_FILES DF,
(SELECT file_id,
Sum(Decode(bytes,NULL,0,bytes)) used_bytes
FROM dba_extents
GROUP by file_id) E,
(SELECT Max(bytes) free_bytes,
file_id
FROM dba_free_space
GROUP BY file_id) f
WHERE e.file_id (+) = df.file_id
AND df.file_id = f.file_id (+)
ORDER BY df.tablespace_name,
df.file_name;
PROMPT
SET FEEDBACK ON
SET PAGESIZE 18
-
- Rank: Estagiário Júnior
- Posts: 2
- Joined: Thu, 03 Apr 2008 9:34 am
- Location: Taubaté
Lucas, thanks for the return.
Query helps, but I have to run monthly. It would be possible to place dates of type>
31/01/08 and check the size on this day
Query helps, but I have to run monthly. It would be possible to place dates of type>
31/01/08 and check the size on this day
-
- Rank: DBA Pleno
- Posts: 264
- Joined: Sun, 19 Aug 2007 8:18 pm
- Location: Ribeirão Preto - SP
Lucas de Souza
OCA Developer
Analista de sistemas
OCA Developer
Analista de sistemas
então, if you give a desc in this table, it will notice that it does not have the date field, then what you can do is the following:
creates a table with the fields that return from this select, Ai you add a date field ... Ai monthly, you can run a script that runs this select and insert the values ??in the new table, and in the Data field you use the sysdate ...
But then, he would do it from the moment that you started to run this script ...
If you need help set up the script, tamo ai ...
creates a table with the fields that return from this select, Ai you add a date field ... Ai monthly, you can run a script that runs this select and insert the values ??in the new table, and in the Data field you use the sysdate ...
But then, he would do it from the moment that you started to run this script ...
If you need help set up the script, tamo ai ...
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest