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: SQL*Plus and PL/SQL >> how to find name and size of largest datafile in 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: how to find name and size of largest datafile in database
 shantanu  Posted: Jan 15, 2008 10:13:07 AM

 Total Post: 42
 Joined: May, 2007






 Hello experts, This is my first post in dba pool. I would appreciate if anyone can let me know syntax for finding out name and size of largest datafile in a database. I am familiar with SQL> select name, sum(bytes/1024/1024) from v$datafile would give list of all files. But wanted to know syntax for just returning for the largest datafile

 Mohammed Taj
Posted: Jan 15, 2008 11:54:09 PM  

 Total Post: 746
 Joined: Jul, 2007






 
select file_name,sum(trunc(bytes/1024/1024)) "size in mb"
from dba_data_files
group by file_name
order by 2 desc;





 shantanu
Posted: Jan 16, 2008 03:00:22 AM  

 Total Post: 42
 Joined: May, 2007






 
It worked. Thanks TAJ!

 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 Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi327
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






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