Report of low database usage by hour?

How can I find the times when the usage is low on database server? as in the number of running processes running per hour...what data dictionary can I pull from? Any help is appreciated, thanks!

1. Install Statspack on your database (see <ORACLE_HOME>/rdbms/admin/spdoc.txt)
2. configure periodic snapshots
3. run reports and use Load Profile and Top 5 Timed Events
If you have the license to use Diagnostic Pack you can use AWR the same way.
Note that V$ACTIVE_SESSION_HISTORY usage requires also Diagnostic Pack licensing.
Edited by: P. Forstmann on 25 août 2010 20:24

Similar Messages

  • Report to count room usage each hour

    Hi all,
    I'm trying to get a report that looks at customer appointments in order to give me a percentage occupancy for each room.
    In one table I have the start and end times of every customer appointment and the room that is used. The report is grouped by the hour.
    The report works fine until I get an appointment that runs into the next hour (start time 09:45 end time 10:15 say)
    Because I'm grouping on the start time the report will show a room was used in the hour starting at 9:00 but not show in the hour starting at 10:00.
    Is there any way this can be achieved?

    Crystal won't take a single record and put it into multiple groups. You can use a subreport to be the actual display, as that will be a new list of data for each group. The downside to this is that it will greatly reduce the speed of the report

  • Generating hourly report from oracle database using sql developer .Help

    I am working on SQL Developer 1.5.1, i need to prepare hourly record of the activity on the database, for that i have a sql query that gives me the report as per selected columns on hourly basis.I need to prepare 24 reports a day.
    Each time i have to go to the query , change the date as per hours like form 22:06:2011 10:00:00 to 22:06:2011 11:00:00 and get the report and export it in excel.
    I want to automate the script so that whenever i run the script , it just asks me the date and runs the script 24 times and fetch me the hourly report of whole day.
    the query syntax is something like this
    Select
    from
    where
    And.......................
    And...................
    And......................
    And req date between to-date( 22:06:2011 10:00:00) And to-date(22:06:2011 11:00:00)
    Order by 7,1,2,3,4,5
    Is there any possibility that i can automate the script to automatically change the hour itself and generate a report in excel 24 times?please share if you have any idea on this.
    Looking forward for a response.

    This gives you data for the whole day and the first column tells you which hour data it is,
    SELECT 'HOUR' || TO_CHAR ( req_date, 'HH24') AS hour_num,
           col1,
           col2,
           col3
      FROM table_name
    WHERE TRUNC (req_date) = TO_DATE ( '22/06/2011', 'DD/MM/YYYY')G.

  • BI publisher report : why "Database Usage Tracking Summary"  repport is empty ?

    Hi everyone,
    I'me using BI publisher intergated to Grid Control12c (R3), trying to get "Database Usage Tracking Summary" report folowing Oracle documentation (http://docs.oracle.com/cd/E24628_01/doc.121/e24473/usage_reports.htm#EMADM13568)
    And I have 2 problems :
    1) FTPburst delivery is not working, sftp is configured but still have the folowing error
    Echec de la distribution.
    [INSTANCE_ID=gs00slli052.occ.lan.1424277393149] [OUTPUT_ID=1973]
    Echec de distribution du document
    [INSTANCE_ID=gs00slli052.occ.lan.1424277393149] [DELIVERY_ID=1974]Error deliver document to FTP::Exception happened when calling deliver API::Error deliver document to FTP::FILE=[::Exception happened when calling deliver API::oracle.xdo.delivery.ssh2.SshException: Error in writing data Broken pipeoracle.xdo.service.delivery.DeliveryException: oracle.xdo.delivery.ssh2.SshException: Error in writing data Broken pipe
    at oracle.xdo.service.delivery.impl.DeliveryServiceI
    2) Since FTPburst delivery is not working, i decide to try mail delivery. The delivery itself is working but the report is empty (see Sortie1.xls in attachements)
    So i don't know why is it empty.
    Can someone   guide me  ?

    Hi,
    Thank You for your quick reply. The table permission was alright.
    Its very strange that, we configure usage tracking in obiee 11.1.1.6.0 using enterprise manager and that how all document says. And then it should automatically update the "NQSCONFIG.INI". But it was not updated there. So we need to change all configuration settings in both "Enterprise Manager" and also in the "NQSCONFIG.INI". Then it works fine!!
    Thanks,
    BK.

  • Report asks for database login in deployed version using crystal runtime for vs2008

    I am developing an application with VS2008 .Net with an Interface to use external Crystal  reports.
    I created a Report using Crystal Reports 2011 "doku.rpt".
    I am using a CrystalReportViewer "crpv" on a form.
    I am using a ReportDocument object (Variable "ReportDocumentM"), to which I load the file "doku.rpt"  and assign the logon Settings of main and subreports (which are the same for all tables).
    Using crpv.ReportSource = ReportDocumentM I assign the reportDocument to the ReportViewer.
    On my develop System everything works fine, the Report is shown in the Viewer.
    I created a Setup for my application and isnatalled it on another System. I also installed the CrystalRuntime for VS2008.
    When I try to Show the Report, a dailog "Database Login" appears and aks for the Connection.
    where the SERVER, USERID and (sometimes the PWD) Input fields are filled with  the correct values, but always the DATABASE field is empty.
    SERVER and DATABASE fields are READONLY.
    Hours and hours I tried differnt things, I also filled the logon info of the ReportViewer himself, nothing helped.
    The code:

    Sorry, I found the solution in another discussion:
    "Crystal ask for DB Connections on new installation"
    Correct Answer by Marc Trudel  on Jan 9, 2014 6:57 PM ' Solved Reports are all saved with SQLNCLI which is Sql Native client 9 (2005) New computers only have SQLNCLI10 which is Sql Native Client 10 (2008) Customer will either install SQL CLient 10 on all old computer and upgrade the reports or install SQL Client 9 on new computers which will avoid upgrading hundred of reports
    In my case the original Report was created on a System with both SQLNativeClient 9 and SQLNativeClient 10 on it. Because I originally used a SQL2000 database as datasource, the SQLNativeClient9 was used. It wasn't a Problem on the System when I dynamically connected to a SQL2008R" database, probably because the NativeClient9 was still there and could be used. On the other Computer only the NativeClient10 was existing and this caused the Problems.
    But I think that this is a bug in Crystal: I think ist normal, that from time to time there are changes in DataBase Connections and Clients, so the reports should be able to work also with new Clients. At least there  should be a message to inform about the Problem.

  • Report on conference room usage?

    Exchange 2007 SP3
    I've been asked to create a report on conference room usage at our company.  They want to know which rooms are booked and for how long, as well as overall availability of conference rooms.  The idea is that they want to shut down an area of the
    building but they're concerned that it will leave the company with an inadequate number of conference rooms.
    Maybe someone knows of a powershell script or third party app that can do that?
    Unfortunately we don't own MOM, so that option is out.  :(
    Thanks in advance.

    HI blink
    if you share your caledar through mail, you can see the free/busy of rooms and can see how long they are going to use the particular room. we can export that room utilization report into excel also.
    Hi Gavin,
    am also working on the same task, is it possible to pull the report of room utilization as mentioned below?
    This is what the report should show the items below.  However, we should be able to use the same process to report for any room.
    Room usage for a week for each specific room (usage is relative to how many hours the room is available for the day)
    Room usage for a month for each specific room (usage is relative to how many hours the room is available for the week)
    Number of bookings per user
    Number of bookings canceled
    Number of bookings rescheduled

  • [HELP ]unexpected low memory usage

    Hi all,
    Could someone help me out with unexpected low memory usage I am facing when I start the DB instance.
    I am running Oracle 8.1.7.3.2 on Windows 2000 Adv Srv with
    2GB of RAM and 3GB of swap area.
    I only have 1 instance with memory related init parameters setted as below.
    shared_pool_size = 293510451
    large_pool_size = 104857600
    java_pool_size = 20971520
    db_block_buffers = 107289
    sort_area_size = 1048576
    avg of about 150~250session so I was expecting the oracle
    to allocate about 1.5GB of RAM when the instance startsup
    Now, when I startup the instance, EXPECTING the oracle to
    allocate about 1.5GB of RAM for himself, and check the
    memory allocation status from the "task manager", it
    shows that 1.4GB of physical memory is AVAILABLE. In another words, the whole system is only using 600MB of
    physical memory.
    Could anyone tell why this is happening and the solution to solve this problem?
    BTW, even if I give loads to oracle using the Mercury LoadRunner, the memory allocation status does not change much while oracle is barely processing each transactions.
    Thanks, in advance

    I work mostly with UNIX but found the following from Metalink document# 46001.1 Oracle Database and the Windows NT memory architecture, Technical Bulletin. I think this answers your question:
    On starting up an Oracle instance all global memory pages are reserved and committed (Total Shared Global Area, Buffer Cache and Redo Buffers). Only a small number of these memory pages are touched on startup and are thus not in Oracle's working set, as more pages are touched they will be brought into memory. Oracle must contend equally with other processes and will have its working set trimmed if other processes are faulting at a greater rate.
    It is unlikely that this trimming will be desirable, especially when the database has a varying workload (high and low usage periods). Two registry parameters exist to allow the administrator to manipulate the working set bounds of the Oracle process, these are :
    - ORA_WORKINGSETMIN or ORA_%SID%_WORKINGSETMIN
    : Minimum working set for the ORACLE.EXE process (units = MB)
    - ORA_WORKINGSETMAX or ORA_%SID%_WORKINGSETMAX
    : Maximum working set for the ORACLE.EXE process (units = MB)
    These parameters apply to all releases from 7.3.x and should be added to the Long postings are being truncated to ~1 kB at this time.

  • How can I have a collective AWR report for RAC database in 10gR2 and 11gR1?

    Plz correct me here
    awrrpt.sql takes the snapshot at the instance level and incase we have 5 instances we have to take 5 awr reports for a particular period.correct???
    If above is true ,any wayout to collect a single collective AWR report for RAC database which includes information on all the instances in Oracle 10g R2 or 11gR1 ?
    Thanks in advance
    Gagan

    I have never come across a way for this. though I can n't say it is not there.
    But I guess it may not be feasible too becuase as we know the current AWR report contains data which is specific for one instance.
    Various hit ratios, top events, instance effeciency reports.... what not ..
    It would be really nice to see something is a new format where it lists values from each instance in a single report.. I guess such a thing Does not exiist as of now.

  • How to generate a single report  using multiple Databases

    Hi All
    Is it possible to create a single report using multiple databases
    I am working on Database A to generate reports usually,, but now i have a second database for which the data is coming from flat files now i have to use few tables from
    Database B to generate a single report,,,,, can any one help with the process

    Hi,
    i didn't see this properly in your post:
    but now i have a second database for which the data is coming from flat files if you have ETL then make flat files as source then create target tables in db:B itself.. .Now, import them in the rpd..
    If not, import both those tables into rpd with different connections..
    Create physical joins by selecting those tables and perform joins operations over db's in physical layer..

  • How to Connect crystal report with multiple databases?

    I Think my question is really clear
    I ask this because i think i already used every way logic in my head
    ConnectionInfo
    IConnectionInfo
    PropertyBag
    DataDefModel
    Etc
    i found Ludek's post about "Ras Connection Info Code" i think this will solve my case but still no luck 
    Dear Ludek i try your suggestion from here  Until the "Ras Connection Info Code" give an Error
    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.
    ************** Exception Text **************
    System.IndexOutOfRangeException: Index was outside the bounds of the array.
       at CodeBuilder_RasConnectionInfo.frmRasConnectionInfo.VBConnectionCode(ReportDocument boReportDocument) in C:\Reza\Development\CodeBuilder-RasConnectionInfo\Form1.vb:line 183
       at CodeBuilder_RasConnectionInfo.frmRasConnectionInfo.btnLoadReport_Click(Object sender, EventArgs e) in C:\Reza\Development\CodeBuilder-RasConnectionInfo\Form1.vb:line 16
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    CodeBuilder-RasConnectionInfo
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Reza/Development/CodeBuilder-RasConnectionInfo/bin/Debug/CodeBuilder-RasConnectionInfo.exe
    Microsoft.VisualBasic
        Assembly Version: 8.0.0.0
        Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    System.Runtime.Remoting
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
    CrystalDecisions.CrystalReports.Engine
        Assembly Version: 13.0.2000.0
        Win32 Version: 13.0.0.99
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/13.0.2000.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll
    CrystalDecisions.Shared
        Assembly Version: 13.0.2000.0
        Win32 Version: 13.0.0.99
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Shared/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Shared.dll
    CrystalDecisions.ReportAppServer.CommLayer
        Assembly Version: 13.0.2000.0
        Win32 Version: 13.0.0.99
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommLayer/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommLayer.dll
    CrystalDecisions.ReportAppServer.ClientDoc
        Assembly Version: 13.0.2000.0
        Win32 Version: 13.0.0.99
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ClientDoc/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ClientDoc.dll
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    CrystalDecisions.ReportAppServer.Controllers
        Assembly Version: 13.0.2000.0
        Win32 Version: 13.0.0.99
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.Controllers/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.Controllers.dll
    CrystalDecisions.ReportAppServer.DataDefModel
        Assembly Version: 13.0.2000.0
        Win32 Version: 13.0.0.99
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataDefModel.dll
    CrystalDecisions.ReportAppServer.DataSetConversion
        Assembly Version: 13.0.2000.0
        Win32 Version: 13.0.0.99
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataSetConversion/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataSetConversion.dll
    CrystalDecisions.ReportAppServer.CubeDefModel
        Assembly Version: 13.0.2000.0
        Win32 Version: 13.0.0.99
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CubeDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CubeDefModel.dll
    CrystalDecisions.ReportAppServer.ReportDefModel
        Assembly Version: 13.0.2000.0
        Win32 Version: 13.0.0.99
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ReportDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ReportDefModel.dll
    log4net
        Assembly Version: 1.2.10.0
        Win32 Version: 1.2.10.0
        CodeBase: file:///C:/Windows/assembly/GAC_32/log4net/1.2.10.0__692fbea5521e1304/log4net.dll
    System.Web
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
    CustomMarshalers
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
        CodeBase: file:///C:/Windows/assembly/GAC_32/CustomMarshalers/2.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    For example:
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    i don't know what happen
    is there any way to solve my case??
    actually i only need 3 databases connected in my report
    in each databases i insert about 3 - 8 command
    i'm using VS2010 Ultimate
    CR Version=13.0.2000.0 (ASP.Net)
    SQL Server Standard Edition 10.50.2500.0
    and
    SQL Server Standard Edition 10.50.1600.1 to test move the datasources
    can someone give me an enlightment about my case
    every suggestion would be great
    Thanks
    Zeal

    Just as an FYI. there is a utility that will actually write the code out for you. See KBA 1553921 - Is there a utility that would help in writing database logon code?
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Reporting Services 2012 - "Database is up to date, but some sites are not completely upgraded"

    Running SharePoint 2010 SP1 (Feb-Mar 2012 CU)
    Is there any official word from Microsoft regarding the issue with SQL Server Reporting Services 2012 for SharePoint where 2 of the reporting service application databases show "Database is up to date, but some sites are not completely upgraded".
    ReportingServiceDB  -  Database is up to date, but some sites are not completely upgraded
    ReportingServiceDB_Alerting  -  Database is up to date, but some sites are not completely upgraded
    I'm building the new Reporting Services into a new DEV environment and I'd like to know what the official word is from Microsoft.  Is Reporting Services 2012 ready for production?
    Thanks!

    Hi mikea730,
    Thanks for your psot.
    Based on my research, I found a similar thread about this issue at Microsoft Contect site. For more information, please see:
    http://connect.microsoft.com/SQLServer/feedback/details/721067/database-is-up-to-date-but-some-sites-are-not-completely-upgraded
    It might be a known issue of SQL Server 2012. I would suggest opening a case with Microsoft Customer Support Services (CSS) (http://support.microsoft.com), so that a dedicated Support Professional can assist you
    in a more efficient manner.
    Regards,
    Bin Long
    Bin Long
    TechNet Community Support

  • Can we store forms and reports in 10g database in any format

    Can we store forms and reports in 10g database in any format

    Hi,
    Why do you want to store the forms and reports in database? Do you mean something like SCM repository for versioning?
    I don't find any use in storing the forms and reports in database.
    -Arun

  • Report is executing more than one hour

    Hi All,
    I have an issue with my report,its taking more than one hour for execution.
    This report is called through an package,in package there are cursors which retrive data and sends to mail.The problem is with this select statement in cursor,its taking a lot of time to retrive the data.
    In my cursor select statement i am using the following tables
    HZ_PARTY_SITES HPS,
    HZ_CUST_ACCOUNTS CUST,
    HZ_CUST_ACCT_SITES_ALL HCASA,
    HZ_CUST_SITE_USES_ALL HCSUA,
    HZ_LOCATIONS HL,
    OE_ORDER_HEADERS_ALL OOH,
    OE_TRANSACTION_TYPES_TL OT,
    OE_AUDIT_ATTR_DESC_V AADV
    when i use OE_AUDIT_ATTR_DESC_V ,its taking a lot of time to retrive.So any one can help me out in this issue,how to add this view to other tables
    Regards,
    RR

    RR,
    Before you add any indexes to the listed tables, check with Oracle support to ensure you will be violating your Oracle Enterprise Business Suite agreement. Oracle has specific rules on modifying EMS tables. Additionally, any EBS patch or update that gets applied will likely drop any custom changes to these tables. It might be better for you to open a Service Request with Oracle Support and have them tell you how to improve the performance of your query since all of your tables are EBS tables.
    Craig...
    Message was edited by:
    CraigB
    RR, you may also want to check with your DBA(s) to see when the Statistics were last gathered on these tables.

  • I wish to generate reports from the database an out put it but i need to enter a date from and to ina  html input box

    i wish to generate reports from the database an out put it
    but i need to enter a date from and to ina html input box
    in the input box a data of range will be input from a start
    to latest
    latest being the default as today's date.
    any help tips snipplets, concepts , turot=rails.
    thanks

    easycfm.com has tutorials for people who are brand new.
    If you don't know much about sql, I have heard good things
    about the book, Teach Yourself SQL in 10 Minutes by Ben
    Forta.

  • Deleting old data won't reduce Windows Azure SQL Database usage

    My Windows Azure SQL Database usage keeps increasing. Deleting old data didn't help much. I was wondering how to figure out the distribution of the usage. All tables in my DB should not occupy more than 5GB and now it is most 12GB. Please help!
    http://yanflex.com

    Hello,
    The database fee is amortized over the month and charged daily. The daily fee depends on the peak size that each database reached that day and the maximum number of databases you use. So, if the peak size of database is 12 GB  and then you delete data
    to reduce the size, it still charge based on 12GB this day.
    You can use the following statement to get the database size:
    SELECT SUM(reserved_page_count)*8.0/1024 as DBsizeinMB
    FROM sys.dm_db_partition_stats;
    Reference:Accounts and Billing in Windows Azure SQL Database
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here.
    Fanny Liu
    TechNet Community Support

Maybe you are looking for