Saturday, September 1, 2007

HOW TO CHECK GROWTH OF THE DATABASE......?

Step : 1 Calculate total Size of tablespace
select sum(bytes)/1024/1024 "TOTAL SIZE (MB)" from dba_Data_files
Step : 2 Calculate Free Space in Tablespace
select sum(bytes)/1024/1024 "FREE SPACE (MB)" from dba_free_space
Step : 3 Calculate total size , free space and used space in tablespace
select t2.total "TOTAL SIZE",t1.free "FREE SPACE",(t1.free/t2.total)*100 "FREE (%)" ,(1-t1.free/t2.total)*100 "USED (%)"
from (select sum(bytes)/1024/1024 free from dba_free_space) t1 , (select sum(bytes)/1024/1024 total from dba_Data_files) t2
Step : 4 Create table which is store all free/use space related information of tablespace
create table db_growth
as select *
from (
select sysdate,t2.total "TOTAL_SIZE",t1.free "FREE_SPACE",(t1.free/t2.total)*100 "FREE% "
from
(select sum(bytes)/1024/1024 free
from dba_free_space) t1 ,
(select sum(bytes)/1024/1024 total
from dba_Data_files) t2
)
Step : 5 Insert free space information in DB_GROWTH table (if you want to populate data Manually)
insert into db_growth
select *
from (
select sysdate,t2.total "TOTAL_SIZE",t1.free "FREE_SPACE",(t1.free/t2.total)*100 "FREE%"
from
(select sum(bytes)/1024/1024 free
from dba_free_space) t1 ,
(select sum(bytes)/1024/1024 total
from dba_Data_files) t2
)
Step : 6 Create View on DB_GROWTH based table ( This Steps is Required if you want to populate data automatically)
create view v_db_growth
as select *
from
(
select sysdate,t2.total "TOTAL_SIZE",t1.free "FREE_SPACE",(t1.free/t2.total)*100 "FREE%"
from
(select sum(bytes)/1024/1024 free
from dba_free_space) t1 ,
(select sum(bytes)/1024/1024 total
from dba_Data_files) t2
)

Step : 7 Insert data into DB_GROWTH table from V_DD_GROWTH view
insert into db_growth select *
from v_db_growth
Step : 8 Check everything goes fine.
select * from db_growth;
Check Result
Step : 9 Execute following SQL for more time stamp information
alter session set nls_date_format ='dd-mon-yyyy hh24:mi:ss' ;
Session altered.
Step : 10 Create a DBMS jobs which execute after 24 hours
declare
jobno number;
begin
dbms_job.submit(
jobno, 'begin insert into db_growth select * from v_db_growth;commit;end;', sysdate, 'SYSDATE+ 24', TRUE);
commit;
end;

PL/SQL procedure successfully completed.
Step: 11 View your dbms jobs and it's other information
select * from user_jobs;
TIPS: If you want to execute dbms jobs manually execute following command other wise jobs is executing automatically
exec dbms_job.run(ENTER_JOB_NUMBER)
PL/SQL procedure successfully completed.
Step: 13 Finally all data populated in db_growth table
select * from db_growth

19 comments:

Hashmi said...

Hi,
Whats the difference b/w step 4 and step 5?

Anonymous said...

Hi i just want to know the concept.

rgds
lara

Anonymous said...

Great website, looks very clean and organized. Keep up the good work! antibacterial Read a useful article about tramadol tramadol

Anonymous said...

Hello this is kinda of off topic but I was wanting to know
if blogs use WYSIWYG editors or if you have
to manually code with HTML. I'm starting a blog soon but have no coding know-how so I wanted to get advice from someone with experience. Any help would be enormously appreciated!

Here is my page - LeParfait

Anonymous said...

Thanks for sharing your info. I truly appreciate your efforts and I am waiting for your further write
ups thank you once again.

Also visit my weblog: Test Force Xtreme Reviews

Anonymous said...

Saved as a favorite, I like your blog!

Look at my blog; Pure Garcinia Cambogia

Anonymous said...

Hey I know this is off topic but I was wondering if you knew
of any widgets I could add to my blog that automatically tweet my newest twitter updates.
I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

Look at my webpage: Saphire Ecigs

Anonymous said...

Thankfulness to my father who shared with me regarding this website, this weblog is
in fact amazing.

Here is my webpage; Cambogia Extract

Anonymous said...

I do not know whether it's just me or if everybody else experiencing problems with your website. It looks like some of the written text within your content are running off the screen. Can somebody else please comment and let me know if this is happening to them as well? This might be a issue with my browser because I've had this happen previously.

Kudos

Here is my web page; Le derme luxe

Anonymous said...

Hi there, I log on to your new stuff daily. Your humoristic style is awesome, keep doing what
you're doing!

My web blog; Pay day loan lender

Anonymous said...

Your way of describing everything in this piece of writing is actually pleasant, every one can easily be aware of it, Thanks a lot.


Feel free to surf to my webpage: Garcinia Cambogia Diet

Anonymous said...

Excellent article. Keep writing such kind of info on your page.

Im really impressed by it.
Hey there, You have done a great job. I'll definitely digg it and individually suggest to my friends. I am confident they'll be benefited from this web site.


Look at my weblog: Skin care

Anonymous said...

Keep on working, great job!

Stop by my homepage ... party pills cheap

Anonymous said...

Hello mmy fɑmnily member! I want too ѕay that thi aarticle
is аmazing, ցreat written and come with approximately all significant infos.
I'd lke to look more posts liike this .

Here iѕs my web blog: how much is my used car worth

Xia Zhang said...

http://www.shopbestgoods.com/
http://www.bestcustomsonline.com/
http://www.nike-jordanshoes.com/
http://www.polo-tshirts.com/
http://www.burberry-factory.com/
http://www.kate-spades.com/
http://www.barbour-factory.com/
http://www.coachlosangeles.com/
http://www.official-coachoutlet.com/
http://www.louisvuittonas.com/
http://www.burberryoutlet2014.com/
http://www.official-mkoutlet.com/
http://www.official-pradaoutlet.com/
http://www.beatsbydreoutlet.net/
http://www.michaelkorsonlineusa.com/
http://www.northsclearance.com/
http://www.ralph-laurensale.com/
http://www.gucci-shoesuk2014.com/
http://www.michael-korsusa.com/
http://www.polo-outlets.com/
http://www.hermes-outletonline.com/
http://www.ralphslauren.co.uk/
http://www.marcjacobsonsale.com/
http://www.mcmworldwides.com/
http://www.warmbootssale.com/
http://www.salongchamppairs.com/
http://www.canada-gooser.com/
http://www.michaelkors.so/
http://www.oakley-sunglassoutlet.com/
http://www.north-faceoutlets.net/
http://www.moncler-clearance.com/
http://www.woolrich-clearance.com/
http://www.barbour-jacketsoutlet.com/
http://www.moncler-jacketsoutletonline.com/
http://www.monsterbeatsbydres.net/
http://www.lv-guccishoesfactory.com/
http://www.cheapdiscountoutlet.com/
http://www.coachsfactoryoutlet.com/
http://www.coach-blackfriday2014.com/
http://www.coach-storeoutletonline.com/
http://www.coach-factorysoutletonline.com/
http://www.coachccoachoutlet.com/
http://www.coach-factories.net/
http://www.coach-pursesoutletonline.com/
http://www.coach-outletsusa.com/
http://www.zxcoachoutlet.com/
http://www.mischristmas.com/
http://www.misblackfriday.com/
http://www.newoutletonlinemall.com/
http://www.ralphlaurenepolo.com/
http://michaelkorsoutlet.mischristmas.com/
http://mcmbackpack.mischristmas.com/
http://monsterbeats.mischristmas.com/
http://northfaceoutlet.mischristmas.com/
http://mk.misblackfriday.com/
http://coachoutlet.misblackfriday.com/
http://coachfactory.misblackfriday.com/
http://uggaustralia.misblackfriday.com/
http://coachpurses.misblackfriday.com/
http://coachusa.misblackfriday.com/
http://coach.misblackfriday.com/
http://michaelkorss.misblackfriday.com/
http://michaelkors.misblackfriday.com/
http://airmax.misblackfriday.com/
http://michael-kors.misblackfriday.com/
https://twitter.com/CoachOutlet2014
https://www.facebook.com/coachoutletstoreonline
https://www.facebook.com/ralphlaurenoutletonline

Anonymous said...

e cigarette, e cigarette health, e cigarette forum, electronic cigarettes, e cigarette reviews, vapor cigarette

Anonymous said...

Oriflame CZ https://www.facebook.com/beauty365cz
Oriflame http://www.orif24.cz/
Oriflame kosmetika http://www.oricosmetics.cz/
Oriflame CZ http://cz.oriflame.com/business-opportunity/become-consultant?potentialSponsor=442530
Oriflame CZ http://www.ori24.cz/
Oriflame http://www.krasa365.cz/
Oriflame facebook https://www.facebook.com/beauty365cz
Oriflame kosmetika http://www.vonavaprace.cz/
Oriflame CZ http://www.kosmetikaslevy.cz/
Oriflame facebook https://www.facebook.com/oriflamebeautyteam
Oriflame http://www.orislevy.cz/
Oriflame kosmetika http://www.ori-cosmetics.cz/
Oriflame facebook https://www.facebook.com/OriSlevy

dong dong23 said...

juicy couture
toms shoes
replica watches for sale
air jordan 13
oakley sunglasses
kevin durant shoes
louis vuitton handbags
true religion outlet
longchamp bags
insanity workout
timberland outlet
louis vuitton outlet
cheap oakley sunglasses
christian louboutin flats
longchamp handbags
adidas originals
coach factory outlet
nike air huarache
ray ban sunglasses
adidas yeezy
rolex watches
christian louboutin shoes
nike air force
jordans
oakley sunglasses
abercrombie & fitch
cheap oakley sunglasses
coach factory outlet
true religion outlet
toms shoes
kobe bryant shoes
rolex watches
christian louboutin sale
oakley sunglasses
nike roshe flyknit
coach outlet
jordan 8s
toms shoes
true religion jeans
louis vuitton outlet
20166.4wengdongdong

Sridevi Koduru said...

Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, Oracle Manufacturing, OAF, ADF, SQL, PL/SQL, D2K at sridevikoduru@oracleappstechnical.com | +91 - 9581017828.