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.

Similar Messages

  • Unable to establish connection to oracle database using sql developer

    hi guys,
    i tried to connect to the oracle database using the sql developer, but it fails. it replies the following message:
    Status: Failure -Test failed: Io exception: The Network Adapter could not establish the connection
    what should i do? any help

    Please provide a little more information:
    1) SQLDeveloper version.
    2) Database Version.
    3) Database location (same machine or on the network).
    4) Connection method (basic,TNS).
    5) Connection type (Thin,Thick/OCI).
    Usually the first thing to check is if you have correctly entered the right information for your database connection, then if everything seems to be OK the database itself should be checked for potential problems.

  • How to get Operating System Space Info from Oracle database using SQL

    Our oracle databases are installed on Unix operating system. Currently our DBA wrote a view to get space info of table spaces and He is requesting me to add Operating system level(file system) drive space info to the same report.
    Can you please let me know the easiest way to get this information to sql table so that it can be used for reporting purposes?

    You should be able to create a shell script with the OS commands to generate the information for the mount points that you want to access in Oracle, then read it in as an external table using the preprocessor feature of external tables:
    http://download.oracle.com/otndocs/products/database/enterprise_edition/utilities/pdf/xtables_preproc11g_1009.pdf

  • Generate .dbf file from oracle database using JDBC

    Dear all,
    I need to generate a .dbf file from oracle table. Anyone know how to do this using Java Programming or JDBC? please help!
    thank you

    Hi,
    I assume you already have a JDBC driver for either FoxPro or DBase. If not, use the JDBC-ODBC bridge and the ODBC driver that comes with Window$.
    When you issue a "Create TABLE" command the driver will automatically create a .dbf file and then you can export data to it.
    Imran

  • Steps to generate AWR report from Oracle 11g OEM

    I have gone through online documentation for generating an AWR report from Oracle 11g OEM but the documentation is more focused on generating the AWR report manually. I would request if there is a link or documentation to go through for generating AWR report from Oracle 11g enterprise manager.
    I hope my question is clear.
    Please revert with the reply to my query.
    Regards

    HI ,
    Please check following link: Siva Oracle: How to generate AWR Report from OEM Grid
    Thank you

  • How to store and retrieve blob data type in/from oracle database using JSP

    how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
    thanks

    JSP? Why?
    start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html]

  • FETCH DATA FROM ORACLE DATABASE USING Web Dynpro

    I want to fetch data from ORACLE database using Web Dynpro.How can I do this?

    1) Are you sure that you get no results? It sounds like you are having name resolution issues, which would imply that you should be getting an ORA-00942 error indicating that the table doesn't exist (or that you don't have access to the table). If you are not seeing this error, I would tend to suspect an overzealous exception handler.
    2) What database account owns the table? What database account is your ASP.Net application using to connect? Assuming these two accounts are different, your application would either have to
    - Explicitly prefix the table name with the schema name
    - Have a public or private synonym that maps the table name to the fully qualified identifier schema_name.table_name
    - Issue the command ALTER SESSION SET CURRENT_SCHEMA = <<schema name>> in each session, in which case all queries in the session would use the specified schema name as the default if no schema name is prefixed.
    Justin

  • Installing Oracle Database and SQL Developer

    Hi, I was looking for some help/advice in regards to installing an Oracle Database and SQL Developer onto a Windows 7 32bit machine. I have been asked to create a database to store data that I create through reports in Excel so I am required to create a local database but not sure how to go about doing this. Also not sure if I install the Express Edition or Oracle Database 11g R2. If somebody could please advise on how I can get this started or even any links/tutorials that would guide me in how to get this installed with a localhost.
    Thanks in advanc.

    318f20b8-a3d0-4fb4-bb0f-73785250b7d4 wrote:
    Thanks guys, I have managed to install Oracle 11gR2 and I have setup a database using the dbca tool and I can connect to my new database. One thing that I have noticed is that when i look into my tables in sql developer i see loads of different tables i.e. def$_, logmnr_, etc and I am not sure why this is as I expected an empty tablespace.
    Thanks btw for all your help.
    One of the key principles of relational databases is that they use their own facilities to manage themselves.  That means the database management system uses the database to manage data about the database using exactly the same facilities (tablespaces, tables, user accounts, procedures, etc) that an application uses to keep data for the application. See "data dictionary"   So there is no such thing as a completely empty database.
    As said by others, you do NOT want to be creating your own tables under oracle's schemas (users) or in oracle's own tablespaces (esp. SYSTEM and SYSAUX).  Create your own user account/schema.  Create your own tablespace. Make that tablespace the default for that user.

  • How to start or shut down database using sql developer in windows

    Dear Sir/Madam,
    how we start or shut down database using sql developer in windows
    we are using oracle 11g release2, unix, java & oracle oracle weblogic administration
    Thanks & Regards
    Manish Kumar
    Datbase Team
    TCS Ltd.

    HI, Welcome to OTN form,
    SHUTDOWN is not a SQL statement but a SQL*Plus command . You cannot use SHUTDOWN in PL/SQL.
    Check following link:
    http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_twelve042.htm#i2699551
    More Information please check OTN discussion: https://forums.oracle.com/thread/2349159
    Thank you

  • Generating a report from RTF template using WSDL from ADF

    Hi,
    I am a newbie to ADF-BIP integration.
    I am using the wsdl http://<<ip>>:<<port>>/xmlpserver/services/PublicReportService?WSDL for generating a report from RTF Template in ADF.
    We are using Oracle Business Intelligence Publisher Release 11g (11.1.1) and JDeveloper 11g (11.1.1.5.0).
    I have a couple of merge variables in my RTF template and I am passing these variable using Report Request parameters.
    below is code I added for creating the report request.
    First I created publicReportService using webservice proxy.
        public static ReportRequest getReportRequestFromBIPWithTemplate(String reportFolderOnBIP,
                                                            String reportName,
                                                            String outputFileFormat,
                                                            String template,
                                                            HashMap params) {
          String reportAbsolutePath = reportFolderOnBIP + "/" + reportName + ".xdo";
          ReportRequest repRequest = new ReportRequest();
          System.out.println("report path:  " + reportAbsolutePath);
          repRequest.setReportAbsolutePath(reportAbsolutePath);
          repRequest.setAttributeTemplate(template);
          repRequest.setAttributeFormat(outputFileFormat);
          repRequest.setAttributeLocale("en-US");
          repRequest.setSizeOfDataChunkDownload(-1);
          System.out.println(params.size());
          ParamNameValue[] paramNameValue = new ParamNameValue[params.size()];
          ArrayOfParamNameValue arrayOfparamNameValue = new ArrayOfParamNameValue();
          Set set = params.entrySet();
          Iterator iter = set.iterator();
          int i = 0;
          while (iter.hasNext()) {
            Map.Entry me = (Map.Entry)iter.next();
            System.out.println(i + "--->>>" + me.getKey() + " : " + me.getValue());
            paramNameValue[i] = new ParamNameValue();
            paramNameValue.setMultiValuesAllowed(false);
    ArrayOfString values = new ArrayOfString();
    if (me.getValue() == null) {
    values.getItem().add("");
    } else {
    values.getItem().add((me.getValue()).toString());
    paramNameValue[i].setValues(values);
    paramNameValue[i].setName((me.getKey()).toString());
    arrayOfparamNameValue.getItem().add(paramNameValue[i]);
    i++;
    repRequest.setParameterNameValues(arrayOfparamNameValue);
    return repRequest;
    I generated report response bytes using below code
    {code:java}
    repRes = publicReportService.runReport(repReq,userID,password);
    reportStream = repRes.getReportBytes();I could see the generated PDF but the supplied variables are NOT reflected in place of merge variables.
    Ex: In template
    Welcome, <<merge variable, userName>>
    {code}
    Generated PDF should have
    {code:java}
    Welcome, Hello World
    {code}
    Instead of the above I am getting
    {code:java}
    Welcome,
    {code}
    I am looking for a suggestion, Please help me in this regard.
    Thanks,
    Satya
    Edited by: 921138 on May 30, 2012 11:11 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Please let me know if any one has update for this.
    Thanks in advance,
    Satya

  • Empty CLOB field value from Oracle database using JDBC Sender

    Hi All,
    I am selecting a CLOB field from Oracle database table using JDBC Sender adapter and getting error "NullPointerException"
    Seen SAP note 1283089 but its not applicable for my support pack PI 7.0 SP 12 and client dont want to upgrdate SP 17 right now.
    I tried rpad(1,0)Column_Name funciton in JDBC select query but it selcting blank value for every record even those having some value for this CLOB field so not useful
    Could anybody suggest possible way? client dont want to change anything at database side.
    Thanks,
    Dharamveer

    What is the Oracle driver version installed? You might need to install 10.x driver if not already using it.

  • Want to see on screen data from oracle database using php

    I am struggling on the problem of echoing data from Oracle database (9i) to the screen for viewing. For ex. the data has records from various cities. when a particular city is inputted as prompt, all the records for the that city from the table should appear through PHP. Can someone help me?

    Thank you very much for giving the link. I tried and it is working. Only, I am still struggling with trying to get many fields from the database on the screen for viewing. Ex. a prompt to ask which country and which month. If I give India and December it must give all the data pertaining to India for December. This AJAX was very useful, as it gave lot of tips, but my basic query to see the data thru PHP from my database is still unsolved. Any help??
    Jacob
    Thanks once again for the help.

  • Generating a Report from Oracle Forms

    If a want to generate a report in Oracle Reports
    by pressing a Button on my Oracle Forms for example for 5 text items
    on that form ...then how do i do it ???
    plz help

    well when i create a report module in the object navigator of oracle forms
    its opens Oracle Reports application and it gives error
    "REP-0118 Unable to create temporary file"
    and then the error "ORA-000904: "PB_RPT" : invalid identifier ......etc select query etc"
    here PB_RPT is a Push Button.
    Please Help

  • Reconnect opening an Oracle Table using SQL Developer 3.0 in Windows 7.

    Downloaded SQL Developer 3.1.07 and placed a copy on both Windows XP Pro. and Windows 7 Pro. No issues using SQL Developer under Windows XP, Oracle 10g client driver. However, under Windows 7 (32-bit or 64-bit PCs), Oracle 10g or 11g client driver, when I click a table name to display the 'Columns, Data, Constraints, ...' fields - I receive a Reconnect message: Your database connection has been reset. Any pending transactions or session state has been lost." I am able to view the Data, Contraints, Grants, ... fields, except for Columns field (no data). Also executing SQL statements to query any of the tables returns expected data. Right-click on database connection shows 'Connect' and 'Reconnect' greyed out, so appears connection exists. So why is the Reconnect message happening? And why can I not see my field definition under Table Columns?

    Thanks, I'll survive. Just my luck, the first item I try to anon. debug didn't work! :)
    thanks, hopefully this problem will be few and far between

  • Cannot connect to database using SQL Developer

    Ok. Here are the facts:
    1) I can connect to the database using PL/SQL Developer.
    2) I wanted to try SQL Developer and I am unable to connect to the same database with SQL Developer. I provide username and password and select "network alias" and click test and I get "Network adaptor could not be established"
    3) TNS names.ora file resides on a mapped drive which clearly is accessible by PL/SQL developer but not by SQL developer.
    What am i missing?
    Thanks a lot

    If you can select a network alias, then sqldeveloper has found your tnsnames and the problem lies elsewhere.
    Is the network drive specified by a UNC? SQLDeveloper doesn't work well with unc names.

Maybe you are looking for