How to get database growth month wise

Hi All,
Can any one help me getting the growth of production database month wise for the current year.
I mean I need a script which will display the growth of my database month wise for the year 2010.
Regards,

hi,
try something along the lines of this
--Run the following create table to create segment info.
create table stats$segment_info as
select
  sysdate snap_time,owner, segment_name,segment_type , tablespace_name,sum(bytes) bytes from dba_segments group by owner,segment_type, segment_name,tablespace_name /
-- Run the following once a calendar month via dba_jobs.
insert into stats$segment_info
select
sysdate snap_time,owner, segment_name,segment_type , tablespace_name,sum(bytes) bytes from dba_segments group by owner,segment_type, segment_name,tablespace_name / commit;
-- run the following report to get tablesapace growth
column this_mon new_value this_mon
column last_mon new_value last_mon
column prev_mon new_value prev_mon
select to_char(sysdate,'MON YYYY') This_mon
     , To_char(add_months(sysdate,-1),'MON YYYY') Last_mon
     , to_char(add_months(sysdate,-2),'MON YYYY') prev_mon from dual;
column mins format 99999
column size_mb heading '&&this_mon' format 99999 column size_mb2 heading '&&prev_mon' format 99999 column size_mb1 heading '&&last_mon' format 99999
column growth heading 'Growth(%)|   in   |last month' format 9999.99
select tablespace_name,
--       to_char(snap_time,'MON YYYY') Month
       max(decode(trunc(snap_time,'MON'),trunc(add_months(sysdate,-2),'MON'),size_m,0))  size_mb2
      ,max(decode(trunc(snap_time,'MON'),trunc(add_months(sysdate,-1),'MON'),size_m,0))  size_mb1
      ,max(decode(trunc(snap_time,'MON'),trunc(sysdate,'MON'),size_m,0))  size_mb
       ,100*(max(decode(trunc(snap_time,'MON'),trunc(sysdate,'MON'),size_m,0))
     -    max(decode(trunc(snap_time,'MON'),trunc(add_months(sysdate,-1),'MON'),size_m,0)))
                 /max(decode(trunc(snap_time,'MON'),trunc(add_months(sysdate,-1),'MON'),size_m,1)) growth from (select  tablespace_name, snap_time
     ,sum(bytes)/1024/1024 size_M
from stats$segment_info
  where snap_time > trunc(add_months(sysdate,-2),'MON')-2
group by tablespace_name,snap_time) a
group by tablespace_name
order by tablespace_name
/as far as I am aware this is database independent.
regards
Alan

Similar Messages

  • How to get the count monthly wise

    Hi All
    I have lot of order dispatched in a year 2010, how to get the moth wise total.
    For example jan 1000 orders ,feb 2500 orders.
    Thanks & Regards
    Srikkanth.M

    Pleiadian wrote:
    Maybe even
    b.schedule_ship_date between to_date('2010','YYYY') and to_date('2011','YYYY');)But this could return schedule ship dates that are 01-Jan-2011 00:00:00. I don't think this is wanted since it was not specified in the original requirement. I'm not even sure if to_date('2010','YYYY') returns 01. Feb.2010 in a few days (when we will have february).
    Just checking the docs....
    found it: http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements003.htm#SQLRF51062
    from the docs:
    If you specify a date value without a time component, then the default time is midnight (00:00:00 or 12:00:00 for 24-hour and 12-hour clock time, respectively). If you specify a date value without a date, then the default date is the first day of the current month.Just to be on the safe side always give the complete format mask!
    b.schedule_ship_date >= to_date('01012010','DDMMYYYY')
    and b.schedule_ship_date < to_date('01012011','DDMMYYYY')Edited by: Sven W. on Jan 17, 2011 5:14 PM

  • How to determine database growth for new B1 instalation

    Hello B1 people,
    I'm working on the capacity planning of my new business one project and must know how to determine database growth. Does anyone did something like that before?
    Wich tables should I consider?
    Thanks in advance.

    Hello Gabriel,
    I think it is difficult to make any predictions about database growth because this depends on the volume of your business transactions, the number of users, the continuity of your master data...
    For example a small number of users can create a lot of transactions (accounting, logistics) with big documents like sales orders with more than 100 items, or a lot of users who primarily look up things but only create small transaction won't create too much data and thus influence database growth in totally different ways.
    You should collect information about the volume of daily business to make any forecasts.
    If you start with an empty database, the first big growth will be when you upload your master data, but if only few business transactions follow, you shouldn't use that first increase for your calculation.
    Is this your very first B1 installation, or do you already have B1 systems running? If you use the EWA service on a running B1 installation on a regular basis, then you will get a good impression of database growth and transaction volume but you should only use this as a basis for your calculation if the business of the new installation is similar to already running company's.
    Hope that helps,
    Sandra

  • How to get  past four month user history?

    Hi ,
    can any one help me.How to get past three month details like login and logoff from oracle database
    Edited by: 849135 on Mar 31, 2011 11:29 PM

    Hi;
    Check our previous discussion thread, if audit mechanisim is not avaliable on your db its ahrd to get all information. But you can get some info from thread which i mention here:
    Whether a DB user account has logged in the Oracle database
    Re: Whether a DB user account has logged in the Oracle database
    Regard
    Helios

  • How to get the current month number

    Hi everyone,
    Does anybody know how to get the current month number in Oracle Discoverer Worksheet calculation?
    I try to use EUL_DATE_TRUNC(CURRENT_DATE, 'MM'), but instead I got 01-AUG-00.
    If I change the data display format to MM, it will give me "08" but if I use TO_NUMBER function to convert it to number I get error "invalid number"
    Is there anyway to get the current month value in number? Thanks

    Scott,
    Thank you so much! It works perfectly! :)
    Hope you have a great day ahead!
    Cheers,
    Angeline

  • How to Get the current month at timezone UTC-10

    Hi All,
       can you please let me know How to Get the current month at timezone UTC-10.
    Function module ? which date and time needs to pass.

    Hi,
    Try with following code.
    DATA zdate TYPE  D.
    DATA ztime TYPE  T.
                      CALL FUNCTION 'ISU_DATE_TIME_CONVERT_TIMEZONE'
                        EXPORTING
                          x_date_utc          = sy-datum
                          x_time_utc          = sy-uzeit
                          x_timezone          = 'UTC-10'
                       IMPORTING
                         Y_DATE_LCL          = zdate
                         Y_TIME_LCL          = ztime
                       EXCEPTIONS
                         GENERAL_FAULT       = 1
                         OTHERS              = 2.
                      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                      ENDIF.
    WRITE : zdate, / ztime.
    Thank you,
    Sekhar.

  • How to get the current month value for a customer exit variable?

    How to get the current month value for a customer exit variable? 
    And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
    Thanks!

    Hi Kevin,
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    Regards,
    Vijay.

  • How to get database connection in applet

    Hi,
    I am trying to prepare database connection in applet. After preparing connection with database it'll read same values from table.
    At the time of development it works fine. I have used esclipse IDE for coding and testing.
    But when I try to call that applet from browser. It is giving ClassNotFound exception.
    Does anybody know How to get database connection in applet ?
    Please help me if anybody know solution for this.
    Thanks,
    Rajesh

    As per my knowledge is conserned
    1 u can get the database connection in a jsp page and u send the result set as param to the applet and u can use retrieved values as if they were of the same applet if u r interested i can send the db connetion coding for jsp my id [email protected]

  • How to get the currrent month and year from a new date object

    If I create a new Date object as "d",
    java.util.Date d = new java.util.Date();how can I format the date to get the current Month as 'Jan' and the current year as '2008'. So if I have something like d.getMonth() gets the current month as 'Oct' and d.getYear() gets '2008'
    Thanks,
    Zub

    [Read the flamin' manual you must. Hmm.|http://en.wikipedia.org/wiki/RTFM]
    ~~ Yoda.
    Well no actually, he didn't say that, but he should have.
    Cheers. Keith.
    PS: Don't say that to a 7 foot pissedOff wookie when he's got his head stuck in a smoking hyperdrive, and you're being chased by a S-class battle cruiser... Ask Yoda how he got to be so short.
    PPS: It is the SimpleDateFormat you seek ;-)
    Edited by: corlettk on 14/10/2008 22:37 ~~ Also far to slow... but funny.

  • How to get the first month of the year inputed by user manually

    Hi Expert,
    Just like the subject, I 'd like to get the first month of the year inputed by user manually, but don't know how to set the variable, please help.
    For example, user execute a query and input the value of variable Year = 2010, and what I want to get is 201001 into another variable, so that I can use this variable to setup another selection.
    Thank you.
    Andy

    Hi Andy,
    1) U will create a user input varaible for year and say it is ZYEAR.
    2)  U will create another variable  for calmonth  which has processing type : customer exit ..single value ...mandatory ....say ZCMONTH.
    This needs to be populated using the year( user inputted )  and calmonth '001'
    This code will fetch the user input value into ZYEAR and append '001' to the user input value and the value
    will be passed to the ZCMONTH varaible...
    Sample Code is....
    When 'ZCMONTH'.
    IF I_STEP = 2.
         READ TABLE I_T_VAR_RANGE WITH KEY VNAM = 'ZYEAR'.
         IF SY_SUBRC = 0.
                    L_S_RANGE-LOW  =  I_T_VAR_RANGE-LOW.
                   L_S_RANGE-LOW+4(3) = '001'.
                  L_S_RANGE-SIGN = 'I'.
                 L_S_RANGE-OPT  = 'EQ'.
                      APPEND L_S_RANGE TO E_T_RANGE.
        ENDIF.
    ENDIF.
    Regards
    vamsi

  • How to check Database Growth for a DB on ASM?

    Hi there
    I have been using the following script to check the database growth (for DBs on Filesystem):
    SELECT b.tsname tablespace_name ,
      MAX(b.used_size_mb) cur_used_size_mb ,
      ROUND(AVG(inc_used_size_mb),2)avg_increas_mb
    FROM
      (SELECT a.days,
        a.tsname ,
        used_size_mb ,
        used_size_mb - LAG (used_size_mb,1) OVER ( PARTITION BY a.tsname ORDER BY a.tsname,a.days) inc_used_size_mb
      FROM
        (SELECT TO_CHAR(sp.begin_interval_time,'MM-DD-YYYY') days ,
          ts.tsname ,
          MAX(ROUND((tsu.tablespace_usedsize* dt.block_size )/(1024*1024),2)) used_size_mb
        FROM dba_hist_tbspc_space_usage tsu ,
          dba_hist_tablespace_stat ts ,
          dba_hist_snapshot sp,
          dba_tablespaces dt
        WHERE tsu.tablespace_id    = ts.ts#
        AND tsu.snap_id            = sp.snap_id
        AND ts.tsname              = dt.tablespace_name
        AND sp.begin_interval_time > sysdate-7
        GROUP BY TO_CHAR(sp.begin_interval_time,'MM-DD-YYYY'),
          ts.tsname
        ORDER BY ts.tsname,
          days
        ) a
      ) b
    GROUP BY b.tsname
    ORDER BY b.tsname;And I think it always gave me good results until I ran this script on a DB (10.2.0.5) on ASM.
    Is it because databases on ASM are maintaied differently OR is it that most proabbly there has been no activity on this database in the last 7 days? I even ran this query for last 90/180-days and it still returned me following results:
    TABLESPACE_NAME                CUR_USED_SIZE_MB AVG_INCREAS_MB
    SYSAUX                                   574.38            .36
    SYSTEM                                   514.69              0
    DATA                                    1593.25              0
    IDX                                         .06              0
    UNDOTBS1                                  69.06          -3.84
    USERS                                     96.13              0Thanks in advance!

    I have no reason to believe tablespaces under ASM are maintained differently, so the most likely explanation is change in DB activity.
    What is your AWR retention? The default is 7 days, so if yours is set at the default then running the query for 90/180 days would not give you more information.
    If you want to get useful output from your scripts, you might need to adjust the AWR retention and your SYSAUX tablespace respectively.
    If the DB is monitored by Oracle Enterprise Manager(OEM), you can do tablespace forecasting based on the metrics collected by OEM. I did a presentation about this (NYOUG,VirtaThon) a while back:
    http://iiotzov.files.wordpress.com/2011/08/iotzov_oem_repository.pdf
    http://iiotzov.files.wordpress.com/2012/05/oem-repository-a-second-look.doc
    Iordan Iotzov

  • How to Get days of Month in SSRS

    How can I get days of Month in SSRS report...?

    Hi RedZinc,
    You can do it by writing a SQL query to generate days of month. For doing recursive to generate days,
    Use CTE with recursive logic:
    Declare @StartDate as DATE, @EndDate as DATE;
    SET @StartDate = CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(GETDATE())-1),GETDATE()),101)
    SET @EndDate = CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,Getdate()))),DATEADD(mm,1,Getdate())),101)
     ;WITH cte AS (
                   SELECT @StartDate AS myDate
                   UNION ALL
                   SELECT DATEADD(Day,1,myDate)
                   FROM cte
                   WHERE DATEADD(Day,1,myDate) <=  @EndDate
      Select * from CTEtested the above sql code and it is working. CTE will be easy to implement recursive stuff.
    Maruthi... http://www.msbimaru.blogspot.com/

  • How to get the current month for a variable based on info object 0FISCPER3

    Hie Gurus
    I am working on the financial reports i am failing to derive the Current month from the variable based on infobject 0FISCPER3 PERIOD .
    I would also like to get the same month from the prevoius year. Any ideas?

    If I understood correctly, you need in your repot
    Current Month Plan This year || YTD Plan This Year || Current Month Plan Last Year || YTD Plan Last Year
    Your variable 0I_FISCPER3 must be on the object 0FISCPER3 which is nothing but just the Fiscal Period. This variable is a user entry mandatory Interval variable.
    if you are entering a range in the input screen for this variable, you will get cumulative values. If you just need to get the value for a month in first column your report, you will have to create another variable of type Customer Exit which will read the "To value" entered for the variable 0I_FISCPER3 and columns for Current Month should be restricted on this variable.
    if you are entering a single value in the selection screen of this variable, current month column should be restricted on this variable with "Equal To" operation and YTD colmns should be restricted to "Less Than Equal to" operator with this variable.
    0FISCPER3 just have posting period and not year, so you will have to use varialbes for 0FISCYEAR separately.
    Please let us know if it helps or if you are using some other variable based on 0FISCPER3 or 0FISCPER.
    Regards,
    Gaurav

  • How to get first of month?

    Hey,
    I have got variable date - f.ex. 2009-09-09
    I use sth like this to get 1st of month:
    to_date(to_char(to_date('2009-09-09', 'YYYY-MM-DD'), 'YYYY-MM') || '-01', 'YYYY-MM-DD')
    Can I get date like this faster?

    Hi,
    use TRUNC(your_variable_date, 'mm').
    Example using a DATE:
    MHO%xe> select trunc(sysdate, 'mm') from dual;
    TRUNC(SYSDATE,'MM')
    01-10-2009 00:00:00Using a STRING:
    MHO%xe> select trunc(to_date('2009-09-09', 'YYYY-MM-DD'), 'mm')
      2  from dual;
    TRUNC(TO_DATE('2009
    01-09-2009 00:00:00

  • How we get database data tohtml;select  in struts

    Hi,
    i need to populate the data from database to struts dropdown list(html:select). here i got error. tell the way to get database data to dropdown list.

    Guruji...you need to do something like this....!!!
    //In action or your controller class
    ArrayList billingGroupBeanList = getBillingGroupBeanList();
                   if (billingGroupBeanList.size() > 0) {
                        session.setAttribute("billingItemGroup", billingGroupBeanList);
         private ArrayList<LabelValueBean> getBillingGroupBeanList() {
              log.debug("Entering getBillingGroupBeanList...");
              BillingItemGroup billingItemGroup = null;
              ArrayList<LabelValueBean> billingItemGroupsBean = null;
              ArrayList billingItemGroupList = null;
              Iterator billingItemGroupsItr = null;
             try {          
                   billingItemGroupsBean = new ArrayList<LabelValueBean>();
                   billingItemGroupList =  billingItemManagerFacade.getBillingItemGroupList(); //getting the value from database
                   billingItemGroupsItr = billingItemGroupList.iterator();
                   while(billingItemGroupsItr.hasNext()) {
                        billingItemGroup = (BillingItemGroup)billingItemGroupsItr.next();
                        billingItemGroupsBean.add(new LabelValueBean(billingItemGroup.getGroupDesc(),
                                  new Integer(billingItemGroup.getBillingItemGroupId()).toString()));
              } catch (Exception ex) {
                log.error("\nError occured in action:getBillingGroupBeanList() method: "+ commonUtils.getStackTraceAsString(ex));
              log.debug("Exiting getBillingGroupBeanList...");
              return billingItemGroupsBean;
    And in your jsp
    <td width="25%" class="oddcellleft">
                                  <html:select property="billingItemGroupId">
                                       <html:options collection="billingItemGroup" property="value" labelProperty="label" />
                                  </html:select>
                             </td>where your form should have a getter/setter for billingItemGroupId....!!!!
    Let me know if you have any more doubt...!!!

Maybe you are looking for

  • Installing Mavericks cause Kernel Panic and after installing too

    Hi, I worked with Mountain Lion and all was good, but I thought that would be nice to update to Mavericks. And I'm not good in Mac OS, so I didn't prepare backup before, because believed that it have to work. But during installation I got kernel pani

  • ClickBiosII will not run - SCEWIN_64 has stopped working

    I've been up and running for about two weeks on a new motherboard that I recently installed (info below).  Everything was working fine and I had the ClickBiosII running and was working fine.  I just installed the MSI LiveUpdate 5 and it reported that

  • Completely Deleting Photos - How To!!??

    I have been reading and I know this has been covered a bit here, but I am unable to get the results expected. I need to delete over 5000 photos from my iPhoto library and get them off my hard drive. I have searched here for instructions and have trie

  • Microsoft Exchange / Analysing backpressure issue

    Hi, We are migrating Exchange 2010 to Exchange 2013. The mailflow still goes through the old Exchange 2010 and via internal relay to the new Exchange 2013 servers. Yesterday i saw that almost every email that i can see in this queue gets delay with "

  • Can I connect my iBook via Airport/Ethernet to share internet?

    I have a G5 iSight connected via Airport to the internet. I want to connect my G3 iBook via Ethernet to the G5 and connect to the web. When I opened Sharing on the G5 and started sharing my connection, it warned me that doing so might cause problems.