CAN i CALL OLAP DML THROUGH JDBC IN JAVA PROGRAM

I HAVE ORACLE V 9.2.0.1.0 AND AFTER CREATING A CUBE FROM ENTERPRISE CONSOLE I HAVE TO GO WITH EITHER SQL PACKAGES OR OLAP DML PROGRAMS ,SO PLS GIVE ME PROPER WAY AND LINK OF SOURCES TO WORK WITH OLAP DML IN JAVA PROGRAMS
CAN I USE AS PREPARED STATEMENT OR CREATE STATEMENT IN JAVA
TO CALL OLAP DML? BECAUSE NORMALLY WE MUST USE OLAP WORKSHEET TO EXECUTE OLAP COMMANDS
Message was edited by:
user594151

The access OLAP objects via Java you have two options. You can code directly against the OLAP API and I think someone has already provided you with the link to the supporting documentation. The OLAP API docs provide worked examples on access OLAP metadata and retrieving OLAP data. However, this is extremely low level coding. An alternative is to use the Business Intelligence Beans. Oracle Business Intelligence Beans enables developers to productively build business intelligence applications that take advantage of the rich OLAP functionality in the Oracle database. OracleBI Beans includes presentation beans - graph and crosstab, data beans - query and calculation builders and persistence services, which may be deployed in both HTML client and Java client applications. OracleBI Beans is seamlessly integrated into Oracle JDeveloper to provide the most productive development environment for building custom BI applications. For more information goto the the BI Beans home page
http://www.oracle.com/technology/products/bib/index.html
Specifically on executing OLAP DML see the following example:
Developing a Dashboard Application with Oracle BI Beans:
http://www.oracle.com/technology/products/bib/1012/viewlets/MS%20Developing%20Executive%20Insight.html
Adding controls to execute OLAP DML      This viewlet demonstrates how to quickly and easily add the controls to execute OLAP DML models that can be executed to update the What If presentation.
http://www.oracle.com/technology/products/bib/1012/viewlets/Pages/What_If_Analysis_Part_4_viewlet_swf.html
Hope this helps
Keith Laker
Oracle EMEA Consulting
BI Blog: http://oraclebi.blogspot.com/
DM Blog: http://oracledmt.blogspot.com/
BI on Oracle: http://www.oracle.com/bi/
BI on OTN: http://www.oracle.com/technology/products/bi/
BI Samples: http://www.oracle.com/technology/products/bi/samples/

Similar Messages

  • How to Call Stored Proc. through JDBC from SQL Server

    I have to call Stored Procedure by JDBC in java. This is the prog i m using:
    import java.sql.*;
    import java.io.*;
    class callSP
    public static void main(String a[]) throws Exception
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection c=DriverManager.getConnection("jdbc:odbc:first","sa","");
    //CallableStatement cs=c.prepareCall("{? =call GET_CLUSTER(?)}");
    CallableStatement cs=c.prepareCall("{call GET_CLUSTER(?)}");
    cs.registerOutParameter(1,Types.CHAR);
    //cs.setString(1, "Teamwork");
    cs.execute();
    //cs.executeUpdate();
    String output=cs.getString(1);
    System.out.println(output);
    catch (SQLException e)
    System.out.println(e);
    This is the Stored Procedure:
    CREATE PROCEDURE GET_CLUSTER
    @Ip_THESAURUS_KEY_WORD CHAR(40)
    AS
    DECLARE @Lc_THESAURUS_CODE INT,
    @Lc_CLUSTER_CODE INT
    BEGIN
    --GET THE THESARUS CODE FOR THE KEYWORD
    SELECT @Lc_THESAURUS_CODE = THESAURUS_CODE
    FROM THESAURUS_LIST
    WHERE THESAURUS_KEY_WORD = @Ip_THESAURUS_KEY_WORD
    --GETTING THE CLUSTER ID
    SELECT @Lc_CLUSTER_CODE = CLUSTER_CODE
    FROM THESAURUS_ENRICH_CLUSTER
    WHERE THESAURUS_CODE = @Lc_THESAURUS_CODE
    --GET THE CLUSTER KEYWORDS
    SELECT THESAURUS_KEY_WORD
    FROM THESAURUS_LIST T,THESAURUS_ENRICH_CLUSTER C
    WHERE T.THESAURUS_CODE=C.THESAURUS_CODE
    AND C.CLUSTER_CODE=@Lc_CLUSTER_CODE AND NOT THESAURUS_KEY_WORD=@Ip_THESAURUS_KEY_WORD
    END
    GO
    Check it out what is problem. Data is not getting, it is giving exception.

    Please be specific regarding the problem that you are facing, that's the key to getting help in the forum. If there's exception in your program, such as NullPointerException or SQLException, please state it in your post.

  • Cannot call ANY stored functions from my Java program

    My problem is that I cannot call ANY stored procedure from my Java
    program. Here is the code for one of my stored procedures which runs
    very well in PL/SQL:
    PL/SQL code:
    CREATE OR REPLACE PACKAGE types AS
    TYPE cursorType IS REF CURSOR;
    END;
    CREATE OR REPLACE FUNCTION list_recs (id IN NUMBER)
    RETURN types.cursorType IS tracks_cursor types.cursorType;
    BEGIN
    OPEN tracks_cursor FOR
    SELECT * FROM accounts1
    WHERE id = row_number;
    RETURN tracks_cursor;
    END;
    variable c refcursor
    exec :c := list_recs(11)
    SQL> print c
    COLUMN1 A1 ROW_NUMBER
    rec_11 jacob 11
    rec_12 jacob 11
    rec_13 jacob 11
    rec_14 jacob 11
    rec_15 jacob 11
    Here is my Java code:
    import java.sql.*;
    import java.io.*;
    import oracle.jdbc.driver.*;
    class list_recs
    public static void main(String args[]) throws SQLException,
    IOException
    String query;
    CallableStatement cstmt = null;
    ResultSet cursor;
    // input parameters for the stored function
    String user_name = "jacob";
    // user name and password
    String user = "jnikom";
    String pass = "jnikom";
    DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
    try { Class.forName ("oracle.jdbc.driver.OracleDriver"); }
    catch (ClassNotFoundException e)
    { System.out.println("Could not load driver"); }
    Connection conn =
    DriverManager.getConnection (
    "jdbc:oracle:thin:@10.52.0.25:1521:bosdev",user,pass);
    try
    String sql = "{ ? = call list_recs(?) }";
    cstmt = conn.prepareCall(sql);
    // Use OracleTypes.CURSOR as the OUT parameter type
    cstmt.registerOutParameter(1, OracleTypes.CURSOR);
    String id = "11";
    cstmt.setInt(2, Integer.parseInt(id));
    // Execute the function and get the return object from the call
    cstmt.executeQuery();
    ResultSet rset = (ResultSet) cstmt.getObject(1);
    while (rset.next())
    System.out.print(rset.getString(1) + " ");
    System.out.print(rset.getString(2) + " ");
    System.out.println(rset.getString(3) + " ");
    catch (SQLException e)
    System.out.println("Could not call stored function");
    e.printStackTrace();
    return;
    finally
    cstmt.close();
    conn.close();
    System.out.println("Stored function was called");
    Here is how I run it, using Win2K and Oracle9 on Solaris:
    C:\Jacob\Work\Java\Test\Vaultus\Oracle9i\FunctionReturnsResultset>java
    list_recs
    Could not call stored function
    java.sql.SQLException: ORA-00600: internal error code, arguments:
    [ttcgcshnd-1], [0], [], [], [], [], [], []
    at
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
    at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:889)
    at
    oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:490)
    at
    oracle.jdbc.driver.OracleStatement.getCursorValue(OracleStatement.java:2661)
    at
    oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:4189)
    at
    oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:4123)
    at
    oracle.jdbc.driver.OracleCallableStatement.getObject(OracleCallableStatement.java:541)
    at list_recs.main(list_recs.java:42)
    C:\Jacob\Work\Java\Test\Vaultus\Oracle9i\FunctionReturnsResultset>
    Any help is greatly appreciated,
    Jacob Nikom

    Thank you for your suggestion.
    I tried it, but got the same result. I think the difference in the syntax is due to the Oracle versus SQL92 standard
    conformance. Your statament is the Oracle version and mine is the SQL92. I think both statements are acceptable
    by the Oracle.
    Regards,
    Jacob Nikom

  • How can we calculate no. of instances in a java program ?

    Hi,
    I want to know that
    How can we calculate no. of instances in a java program ?
    Actually I just want to calculate number of live instances in a program at any time...
    Thanx in Advance
    Vijay

    Been asked a few times in this forum.
    Try having a search.
    One way, in brief, is to instrument your classes so that constructors update a per-type counter, and enqueue a PhantomReference for the instance.
    When you pop from an associated ReferenceQueue, decrement the counter for the no longer reachable type.
    Once you have this, you can query instance counts per type, or globably etc.
    We maintain a model which can be remotely queried - and display results over time using JGraph. Gives a fairly non-intrusive way to spot and narrow down the cause of memory leaks in a large application.

  • How to call j2me emulator instance from a java program?

    hi,
    how to call j2me emulator instance from a java program?
    i tried public void startApp(){
    try{
    platformRequest("tel:+5550000");
    }catch(Exception e){
    e.printStackTrace();
    from a j2me midlet itself,
    but it gave illegal access exception.
    do i need any hardware phone connected to my pc?
    please help.

    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    import java.util.*;
    public class OpenExplorer{
    public static void main(String args[]){
         new OpenExplorer();
    public OpenExplorer(){
         try{
         String command = "explorer C:";
         // or String command = "cmd /c explorer C:";
         Runtime runtime = Runtime.getRuntime();
         Process process = runtime.exec(command);
         int exitVal = process.waitFor();
         System.out.println("Exit Value: " + exitVal);
         } catch(Exception e){
         e.printStackTrace();
    }

  • Calling Stored Procedures through JDBC

    Hello!
    I would like to implement a call to a stored procedure through JDBC. This call I suppose to embed in JavaBean to import Bean as model.
      A) Shoud this call be implemented inside ordinaly JavaBean or inside EJB?
      B) How can I determine DataSource? Is it possible through JNDI?
      C) Is there any tutorials or examples?
      D) Could anybody give some code texts on this theme?

    we use quite a similar architecture here (2 ORACLE DBs, a DB link from one instance to the other). However, we use the db links in functions (not in stored procedures). but a simple select using the db link also works with JDBC. do you use the very same db instances / schemas / users+passwords on all your different test environments? so far, we havent' noticed any problems with ORACLE queries (stored procedures, functions, etc.) that work in sqlplus/worksheet but not with JDBC. do you use the latest ORACLE JDBC drivers (9.2.0.3)?

  • How to connect to Pgsql on server through jdbc with java on local machine

    I am developing an application in which I have to connect to my database that is in Pgsql and Pgsql is installed on Linux server. I am going to access that from my java program and the java is here on my local computer(in Linux). All the intranet connections are there. How can I get accees to that database? I have heard of java SSL tunnel. Is this the only solution or there is something else that I can use more easily. Also if I use java installed on th same server as Pgsql then what I will have to do to call the java methods using AMI. Will the java at server be able to make connection to Pgsql more easily? Please tell me about it if you know.
    Thanks

    The closer java and pgsql, the easier it is of course to connect. So the easiest way is to have everything on the same machine. If you are in the same network you will need an IP based network, which is pretty much standard these days. In this case you need to modify the pg_hba.conf file to allow connections from other machines. In both cases you have to start the postmaster with the -i option to enable enable TCP/IP connections.
    Having java and pgsql connected through the internet is a different story, I do not have any experience with that. But you can use ssh to build a tunnel and connect to a local ip address / port from java which is then forwared securely via the internet to the server.
    In all cases you will need the postgres jdbc driver in your classpath. You can find information about postgres and jdbc on the postgres web site.
    good luck

  • Can we call sap screens from our own abap program?

    Hi... Friends...,
        I want to develop one program...
    In that program my selection screen contains transcation code and screen number as input parameters.
    so now if i give  inputs as...
    > VA41
    > 4001
    for given T'code and screen number...
    I hav to get that screen directly!
    other wise it has to give error message like...
    > NO SCREEN EXISTS FOR VA41 WITH GIVEN SCREEN NUMBER
    Is it possible???
    If possible... guide me the logic...!
    Thanks,
    Naveen.I
    Edited by: Naveen Inuganti on Jul 14, 2008 11:15 AM

    No no.. thats ok...
    we can call screen and we can update...
    But in VA01 or in VA41 .. we are having more than 10 screens... can i call them with my selection screen inputs...?
    let me tel you one situation.
    I am having billing plan in VA41 screen's 4002nd screen so now i know the screen number and t'code here.
    So if i want to know the field documnetation or technical details of billing plan field... i hav to go through va41 transaction...
    can i do that from my program with one step?
    And..., 
    one more thing here we know that there will be some mandatory inputs for screens to get the screen which we are calling!
    So this reuirement may not possible for that kind of screen!
    Even....  I want your suggetions!
    Thanks,
    Naveen.I

  • How can i call a VB6 project from my java application using JNI

    hi
    can anyone tell me the procedure of calling a VB6 project from any java application using JNI
    if anyone does know then tell me the detail procedure of doing that. I know that i have to create a dll of that VB6 project then to call it from the java application.
    if anyone know that procedure of creating dll file of an existing VB6 project please reply
    please if anyone know then let me know

    Ahh, kind of a duplicate thread:
    http://forums.java.sun.com/thread.jspa?threadID=631642
    @OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can i call a jasper report from a java Application

    Hi,
    i am chiranjit , currently i working in a web based ERP project, in this project as a report building tool we are using JasperReport wih eclipse plugin . in eclipse report's are generating very well but i am unable to call that report from a java application because i have no idea about the How to call a Jasper Report from a Java Application . so please send me the necessary class names, jar files names and programe code as early as possible.
    Chiranjit

    Ahh, kind of a duplicate thread:
    http://forums.java.sun.com/thread.jspa?threadID=631642
    @OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Accessing DB2 data through DBLINK in Java program recieves ORA-02063 error

    Hello,
    Is it posible to access a mainframe DB2 table through a Java JDBC connection utilizing a DBLink / Synonym. Using Toad or SQLDeveloper, I can select the DB2 data just fine. Also, PL/SQL programs can access the data without issues. When I try to select data from the DB2 Table in a Java program, I get ORA-01002: fetch out of sequence -- ORA-02063 preceding line from DB2D errors.
    The code I am using to test is:
    (Note: TBL_LOC_ADR is the Synonym that points to the Mainfram DB2 table)
    public static void main(String[] args) {
              Connection con = null;
              Statement stmt = null;
              String query = "SELECT * FROM tbl_loc_adr";
              ResultSet rs;
              try {
                   System.out.println("Getting connection");
                   con = BatchDBConnection.getDBConnection();
                   TestConnection tc = new TestConnection();
                   System.out.println("Creating ps");
                   stmt = con.createStatement();
                   System.out.println("Calling qds");
                   rs = stmt.executeQuery(query);
                   System.out.println(" Returned data " );
              } catch (Exception e) {
                   System.out.println("Error " + e.getMessage());
                   e.printStackTrace();
    The error occurs on the rs = stmt.executeQuery(query); line.
    Thanks for any input into this error. It's been driving me nuts all day.
    Chris

    Chris,
    What's your oracle version? You might be hitting a bug as identified in this metalkink doc id, see if this helps out. Resolution posted in the metalink by applying patches or confirm that you have applied all the required patches.
    Doc ID: 456815.1 ORA-01002 ORA-2063 When Profiling DB2/400 Table Accessed by View via Transparent Gateway for DRDA
    Regards

  • Unable to connect to ECC system through stand alone JAVA program using JCO.

    Hi All,
    I want to connect to ECC system through standalone JAVA program using jco.while executing my java program it is saying that connection refused.
    I am getting the error as shown below.
    com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: CMALLC : rc=20 > Co
    nnect from SAP gateway to RFC server failed
    Connect_PM  GWHOST=192.168.10.99, GWSERV=sapgw01, SYSNR=01
    LOCATION    SAP-Gateway on host igm501 / sapgw01
    ERROR       partner '192.168.10.99:sapgw01' not reached
    TIME        Mon Sep  1 15:00:37 2008
    RELEASE     700
    COMPONENT   NI (network interface)
    VERSION     38
    RC          -10
    MODULE      nixxi.cpp
    LINE        2821
    DETAIL      NiPConnect2
    SYSTEM CALL connect
    ERRNO       239
    ERRNO TEXT  Connection refused
    COUNTER     2
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)
            at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:11
    25)
            at com.sap.mw.jco.JCO$Client.connect(JCO.java:3138)
            at JConnector_frmDesk.<init>(JConnector_frmDesk.java:91)
            at JConnector_frmDesk.main(JConnector_frmDesk.java:141)
    I have already configured SAPDP01,SAPGW01 in my services file in windows\system32\drivers\etc\services.
    What else i need to do to connect to ECC system through my JAVA program.Please help me in this regard.
    Regards,
    Ramana.

    Hi !
    Check this to verify that you are correctly using JCO:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
    Try to give in ashost="/H/saprouter/H/sap".
    Regards,
    Matias.

  • How to call a portal component in a java program

    Hi guys,
    We need to add some more operation after user log into portal, thus we need to call a portal component after statement proxy.logon(null) from java program SAPMLogonLogic.java,
    Any ideas how can we call the component directly?
    Thanks

    Hi,
    We can access iview,page,role(pcd objects) thru APIs
    refer [this link|http://help.sap.com/saphelp_nw04/helpdata/en/5f/cf9d4207e1c86ae10000000a155106/frameset.htm].
    may be u can use these APIs to do the task.
    do revert.

  • How can I execute a batch file from my java program

    Hi,
    Can someone help me or direct me to a link,
    How can I execute a DOS batch file from my java program?
    Thanks

    You will need to grab a handle to the process's
    outputstream so u can see its output.The OP didn't mention any output from any batch file;
    nor any input for that
    matter,so lets not complicate matters here for now
    ok?Actually I think this is essential to see whether it works or not. It's either that or do some manual check to see whether it ran, which is not exactly elegant, and in some cases this may not be easier than simply writing the output stream code, or in fact it may be impossible to check manually.
    I'm sure it wasn't intentional that your post appeared to be bristling with attitude.

  • How to call windows help files .hlp from Java program

    Hai all everybody
    How to call windows Help file that is xxx.hlp files from java programs
    any help great!!!!
    regards
    veeru

    How about
    Runtime.getRuntime().exec("start xxx.hlp");

Maybe you are looking for

  • View object Rows

    Hi, I am extending an OAF page. In which I am trying to get access to all the rows of a view object. This view object is used in an advance table. The advance table shows me 15 rows. 10 rows at a time(Advance table functionality). Now when I write th

  • Redirecting System.out stream to a TextArea

    I hope this isn't a stupid question--I'm blanking pretty hard. I want to use System.setOut() to direct standard output to a TextArea within a Frame. Is there a way to setup a TextArea to receive text from an output stream, or is an intermediary of so

  • What do i need to do to upgrade my zen touch 40

    i upgraded my firmware for my touch and have had tons of problems ever since. i am willing to start again by downloading the new firmware again if need be. one of the major problems i have encountered is that i would like to use mediasource but canno

  • Safari keeps crashing repeatedly

    It won't stay open long enough for me to go to preferences and clear cache or anything.... all this from attempting to use an Ello invite! here's the error message: Process:         WebProcess [557] Path:            /System/Library/PrivateFrameworks/

  • Using Airport Express as internet connection for one Mac and one PC

    Will probably be judged a complete dork for this question. I have successfully set up my Imac G5 to run an internet connection through an Airport express. My partner runs a PC (Windows XP) and I want to connect this too. Have installed a USB wireless