Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Database Administration >> Growth of Database

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: Growth of Database
 sm_ahmeds  Posted: Apr 23, 2007 10:07:31 AM

 Total Post: 53
 Joined: Apr, 2007






 Hi iam Shaik...i want to know how to monitor the growth of database from a particular time period or what was its size 2 days back compared to cureent database size. And also is there any view to find the exact size of a database.

Thanks.

 SatyaN
Posted: Apr 23, 2007 12:57:41 PM  

 Total Post: 28
 Joined: Nov, 2006






 
may be you can monitor the dba_free_space for each tablespace every day.

 Ratnaker
Posted: Apr 24, 2007 05:50:25 AM  

 Total Post: 138
 Joined: Apr, 2007






 
---------------------------script-----------------------------------------
column "Tablespace" format a13
column "Used MB" format 99,999,999
column "Free MB" format 99,999,999
colimn "Total MB" format 99,999,999

select
fs.tablespace_name "Tablespace",
(df.totalspace - fs.freespace) "Used MB",
fs.freespace "Free MB",
df.totalspace "Total MB",
round(100 * (fs.freespace / df.totalspace)) "Pct. Free"
from
(select
tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from
dba_data_files
group by
tablespace_name
) df,
(select
tablespace_name,
round(sum(bytes) / 1048576) FreeSpace
from
dba_free_space
group by
tablespace_name
) fs
where
df.tablespace_name = fs.tablespace_name;
-----------------------------end script------------------------------

 sm_ahmeds
Posted: Apr 24, 2007 10:19:25 AM  

 Total Post: 53
 Joined: Apr, 2007






 
Thanks.....However its not showing the exact size of the Datafile and how much is free. Any ways thanks Query is really useful

 dipali
Posted: Apr 29, 2007 01:34:12 PM  

 Total Post: 31
 Joined: Dec, 2006






 
hi,

Use v$datafile with dba_free_space using the where clause having
" where v$datafile.file# = dba_free_space.fileid"
to get the exact space usage figures for each datafile..

Regards..
Dipali

 sm_ahmeds
Posted: Apr 29, 2007 01:58:05 PM  

 Total Post: 53
 Joined: Apr, 2007






 
Thanks Dipali


 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar816
  Mohammed Taj746
  Jayanta Sur479
  positive fanatic418
  Vigyan Kaushik386
  Gitesh Trivedi322
  Gopu Gopi250
  Ramesh Jois245
  neeraj sharma243
  Bishal Khetan207






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software