Running Queries in JCAPS

How can we connect to a DB and fire DB queries in JCAPS
Please help me

Hi,
According to my knowledge for this type of requirement, u have to write
code as you write for jdbc programs.
That is get database connection, createstatement,executeQuery.
Steps
1)Create user defined OTD for ur inoput query with one field as string.
2) Create OTD using any database wizard[like JDBC or ORACLE].
While creating OTD just select preparedstatements options, at least
u have to select one option from three. Don't give any input for
preapred statement just click next and finally click finish.
3) Create JCD and select database OTD.
4) Write JDBC code like
Connection con = OTD.getConnection().
Statement st = con.createStatement()
int result = st.executeUpdate("query").
There might be other better procedures for your requirement, but i
have posted whatever i know. Hope it will help you in some way.
Regards
Venkatesh.S

Similar Messages

  • How to get the list of long running queries

    hi,
         my requirement is to get the list of long running queries in bi and also what are the steps to reduce running time of quires.
    thanks.

    Hi Venkat,
    The statistics information will give you time the query takes while opening it
    For Eg,with BEx Analyzer,you have an option in Global Settings->Display Statistics.
    If you open a query from backend in Analyzer,and then click "Display Statistics",it will show the amount of time it takes to load it.
    Other than this there might be some tcodes available to read this value.
    Rgds,
    Murali

  • Re: Probelems running queries in SQL Developer

    I used to be able to run queries in SQL developer without any problems but now I get the followin message whenever I try to run a query
    "Could not initialize class oracle.sql.CHAR"
    p.s. I also get this: "oracle.i18n.text.converter.CharacterConverterOGS.getInstance(I)Loracle/i18n/text/converter/CharacterConverter;"
    Edited by: user564155 on Jul 26, 2010 1:49 PM

    Might be corrupt settings; backup/delete the SQL Developer/systemXXX directory in the hidden Application Data under your Windows profile to reset your installation to defaults.
    Else, if you run from \sqldeveloper\bin\sqldeveloper.exe, what output do you get in the opened console when starting up and querying? This could help diagnosing the problem.
    Hope that helps,
    K.

  • Running queries coming from different systems

    Hello All
    I have a scenario,
    We are using BI version 7.0,
    The requirement is to  run queries in BEX analyzer coming from 2 different SaPBW systems.
    For example :
    We have two  BW systems A and B,
    In the First tab  we have query running based on the BW system A and in the second tab query running on Bw system B.
    When we try to run the second query in the second tab the first query vanishes,
    Can anybody help me, is it possible to run the 2 different queries from different systems???
    Regards,
    Ravi

    Hi Ravi,
    Even using RRI you will not be able to combine reports from different systems in single workbook. RRI is generally used for Summery to detail level reporting. In such scenarios from first report you click on particular characteristic and other details related to this characteristics are shown in different report coming from any other source.
    If you want this kind of report to run then either you will have to build a Virtual provider in one of the BI system making source as another system and then create a query and use it in same workbook.
    In this way your report might take some time to execute but you don't need to load all your data from one system to other.
    Regards,
    Durgesh.

  • Running Queries

    Hello All,
    I am faced with a peculiar situation.
    I am on BOXI3.1 SP2 with Windows Server 200R2 as OS and its  a clustered and distributed environment.
    I have a large number of reports which have multiple queries (which is quite natural).
    So when you open a report to refresh data interactively we generally click on "Run Queries" to refresh the entire report.
    But some of my over zealous users click on the dropdown and refresh only some of the queries and then start complaing that the report is not refreshing properly.
    So we decided to do something that they only see run queries not the individual ones. How can i resolve the situation.
    Earlier i thought I may change something on the XML and the dropdwon won't be visible but then I realised if i do that it will be applicable for all users. So we want it only for a certain group of users.
    Can anybody help ?
    Regards
    Sid

    Hi Sid,
    I don't think there is a way for you to do this in the out of the box product.  I think the easiest thing to do would be to put a big text box on the top of each report that states that the report requires ALL queries to be refreshed in order for it to show the correct data.
    This is really a user education piece and is not something that the security model accounts for.  In order for you to change this behavior based on groups, a right would have to be associated to that behavior and it doesn't appear that one exists at this point.
    Honestly, I think the easiest way to fix this is to have it stated on the report.  The next best way would be to have your users view instances of the document that has refreshed all the queries.  This limits the hits on your database and avoids this confusion.  You could remove the refresh rights for these groups and setup recurring schedules that they can view and work with, but cannot actually refresh the data on.
    I know this probably won't fit your scenario exactly, but just wanted to throw that out there.
    Jb

  • Script for gather and store the log running queries details in a table?

    Hi All,
    Please suggest the best query that gather and store the long running queries details in a table.
    Thanks,
    rup

    The below links would help you...
    Ben Snaidero
    performance-dashboard

  • How can i cancel long running queries (red x doesnt work)

    hi there
    i am trying to work with some long running queries - it would be very nice to be able to cancel them (like toads cancel button)
    I have tried the red X in the circle but it doesnt seem to work - it appears to have cancelled it (the cylon-eye style comfort bar stops ocillating) but if i try to use the connection again, or disconnect or open another connection it says:
    "connection currently busy. Try again?"
    i have tried this in the latest release vanilla & the latest release plus patch 2
    thanks
    Martin

    Good news that this will be improved. Can't resist to post this Link: [plsql forum thread about start/stop.. | http://forums.oracle.com/forums/thread.jspa?forumID=75&threadID=927697]
    I have experienced the same and also noted that it feels better to execute stored procedures in sqldeveloper
    - by editing
    - compiling (might hang if already busy)
    - run from the same dialog just to get the the cylon's eye for emergency stops (which waits .... ) meanwhile jump to apex to fiddle with small table triggering exception to stop the procedure.
    If stored procedure is executed from the list via 'right mouse click'-style then you see in the log-region "connecting to databse ... ." but no method to stop nor cancel or cylon's eye is well hidden.
    When such "busy" is running I also noted that the database-connection right mouse click has greyed/inactivated the selections "connect/disconnect" so the next logical step for stopping via "disconnect" is out of the question.
    I think this also boils down also to question whether the user has rights to see gv$session and be able to drop/stop busy/jamming sessions. E.g. public synonyms listing has small icons with mystic red :)
    /paavo
    Java(TM) Platform     1.6.0_14
    Oracle IDE     1.5.4.59.40

  • Cancelling of Long Running Queries feature for GRID data block

    Hi,
    Maybe someone knows solution-
    we have custom form with Spreadtable (JTF_GRID object) block (similar as, for example, EBS form WMSCTLBD).
    Is here any possibility to enable ‘Cancel Long Running Queries’ feature for it?
    I have reviewed built-in JTF_GRID library (with hope to implement it by adding some custom timer) but I cannot find any API which could be used for cancelling already submitted queries.
    I have created a SR but analyst suggested to ask for it in forums :)
    Our Oracle Forms Version is 6.0.8.28.0
    Thanks in advance.
    BR,
    Kristaps

    Try CTRL-ALT-DELETE
    :-)

  • Resolving long running queries

    Hi,
    Can we directly implement the recommendations provided by Oracle EM's SQL Tuning advisor *(10g)* as it's for long running queries or we have to do any extra steps?
    I hope we have to compare the SQL Execution plan for the existing query and the recommended query, is this enough or any more? Please post
    Thanks
    Hari.

    Hi,
    i think
    Can we directly implement the recommendations provided by Oracle EM's SQL Tuning advisor *(10g)* as it's for long running queries or we have to do any extra steps?
    NO you cann't. I.e you can accept the profile recommended by Advanced optimizer but it wont affect/change already long runing query.
    I hope we have to compare the SQL Execution plan for the existing query and the recommended query, is this enough or any more? Please post
    Generally SQL profile contain advance information needed by optimizer to produce efficient explain plan. If you look inside SQL profile, you will find that it ultimately contains some set of SQL HINTS.
    So answer to your first question NO because when SQL first hard parse/soft parse it already have generate/used plan for its query, so you cannt change existing running query. The new accepted SQL profile will be used in Next run.
    Answers to your second question - Once you run the SQL tuning advisor you would generally see other recommends too, for example statistics are stale, create new set of indexes etc etc. So you should first focus on these recommendations first. I know its bit cubersome to implement all these recommendations but practically when you implement these reco (apart from accepting sql profile) and again run SQL Tuning advisor then could see previous recommendations went away(as you already implemented them), but if SQL Tuning advisor again recommends you to accept profile then i think it would be OK. Because you already explored other tunning techniques recommended by optimizer. Also SQL profile too can become stale and for which you should maintain them.

  • Running queries in Citrix

    We are having an issue when we try and run queries in citix that were created via our local install.  Basically it is looking for BEXAPI.tlb to be in program files on citrix and it isn't located there but in another area.    We don't want to give rights to the program files folder so is there a way in BW to change the path this points to?

    We were able to go into one query and remove the reference and it works for all now

  • Identify Long Running Queries

    Hi,
    I need to identify the long running queries from a asp.net web application where connection pooling is enabled
    and need to stop them without killing session.
    Please guide me
    Thanks & Regards
    Nimish Garg

    SELECT  SYS_CONTEXT('USERENV','SERVER_HOST')           ENV,
            SYS_CONTEXT('USERENV','DB_NAME')               DATABASE_NAME,
            ROUND(A.ELAPSED_TIME / A.EXECUTIONS / 1000000) SQL_AVERAGE_ELAPSED_TIME,
            A.SQL_ID                                       SQL_ID,
            A.SQL_FULLTEXT                                 SQL_TEXT,
            A.EXECUTIONS                                   SQL_EXECUTIONS,
            NVL(S.PROGRAM,A.MODULE)                        SESSION_PROGRAM_NAME,
            NVL(S.USERNAME,A.PARSING_SCHEMA_NAME)          SESSION_USER_NAME,
            S.OSUSER                                       SESSION_OS_USER_NAME
      FROM  V$SQLAREA A,
            V$SESSION S
      WHERE A.SQL_ID = S.SQL_ID(+)
        AND A.EXECUTIONS > 0
        AND ROUND(A.ELAPSED_TIME / A.EXECUTIONS / 1000000) > threshold-in-seconds
    /SY.

  • Pause long running queries...

    Is there a way to pause for a moment long running queries? or.. to give them lower prioriry during runtime? (even if they're already started)

    No.

  • Terminating long running queries

    For our web reporting application we're using SQR with Oracle 9 as a back end tool. The front end, using a java servlet, invokes SQR program, which in turn connects to the data base with a common (not user specific) user name and generates an output.
    The problem is that when a query runs for too long, the front end will time out or a user may close the window and start over. But when the client session is aborted, the server session is still running consuming resources, which makes the next query performance even worse.
    Question 1: Is there any way that upon connection to the database I can get a session ID, so I can use it to kill the server session before the client session is aborted.
    Question 2: Is there any other way of managing these long running queries and their orphan server sessions.

    You may:
    select sid, serial#, machine, program, username
    from v$session;

  • Profiler execution plan ONLY for long running queries

    The duration only applies to specific profiler events however I'd like to capture the execution plan ONLY for queries over 10 minutes.
    Is there a way to do this using Xevents?
    Anyone knows?
    Thanks!
    Paula

    I've wanted that too but could not find a way to get it from profiler.
    But it may be possible with xevents (or without xevents!) to watch for long-running queries and then get the plan from the cache,where it will probably stick for some time, using DMVs.
    Josh

  • Advice  on long running queries

    Hi all
    I am a junior dba and facing problem of log runninig queries. Can anyone help and let me know how to resolve the long running queries. I mean what should be the approach to findout out the problem.
    Please guide me.
    thanx
    Ajay

    >
    OK, so what about your buddy Jonathan Lewis who
    includes THREE hyperlinks in his sig line?
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    Author: Cost Based Oracle: Fundamentals
    http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html
    The Co-operative Oracle Users' FAQ
    http://www.jlcomp.demon.co.uk/faq/ind_faq.html
    Tsk, tsk, the naughty little man is telling lies again.
    There's a search feature on the Oracle forum - it let's you search by user and ask for key words. I've searched against my identify looking for "ind_faq", and then for "cbo_book". It doesn't return any posts with that sig.
    And here's another thought: your comment about me being a buddy of Sybrand (who you were trying to claim did not exist just a few hours ago) reminded me that I have had reasons to criticise him in the recent past - for example Re: to_char and performance - and he managed to take it without descending into a hissy fit.
    And finally - a little logical error on your part. The fact that I know that Sybrand Bakker exists does not mean that he is a buddy of mine or that I am a buddy of his. After all, I know that you exist.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

Maybe you are looking for

  • Is it possible to create a subscription page with different options for blog, newsletter, product announcements, training events, etc?

    I would like to create a subscription page for my Muse site with different subscription choices, but I am not sure if it is possible or, if it is how I should construct it. Any ideas?

  • How to Validate XML against XSD through PL/SQL?

    Hi friends, I m new to this forum. This is my first query. In our project, we are trying to generate output XML using PL/SQL procedure. I have done that successfully. Now my problem is I have to validate this against our XSD. How will I do that? Can

  • Xp_cmdshell giving error

    HI All, I was trying to get the list of all the files in the folder,am getting an error saying " '\\file01\EDW\Perf\' is not recognized as an internal or external command, Please help declare @files table (ID int IDENTITY, FileName varchar(200)) inse

  • When validate getting fired in Clear_block(No_Validate)

    When validate getting fired in Clear_block(No_Validate) In my button where code for clear block is present there is navigation to some of the blocks where when-validate triggers are present. As suggested in one of the solutions posted in metalink I c

  • Instanceof operator treatment

    Hi I am new bie in java, Following is my code. public class Test {     public static void main(String[] args) {         Test test = new Test();         System.out.println(test instanceof T);         System.out.println(test instanceof I); interface I