Killing a query through JDBC

Hi, Group.
This seems like the type of question that has been asked / answered a million times before but a quick Google and a search in this forum didn't return what I was hoping for.
I have a Java application that issues SQL statements against an Oracle database (10g). Is there anyway I can have the Java application tell the database to kill a specific query? I know how to do this in SQL*Plus and so I could figure out a long-winded way of wrapping that in Java but I'm wondering if there isn't a "simple" hook that I can call that does what I want?
Cheers, Max

Hi,
You can delete the query and query elements using RSZDELETE transaction.
Hope this helps...

Similar Messages

  • Concurrent Query through Informix JDBC

    Hi,
    I am using Informix Jdbc in my JSP ( Driver Downloaded from IBM Site). In case of concurrent calls to that Jsp , I am getting mixed result in the client site. It's written in the Informix JDBC Spec that "The Same statement or resultset instance cannot be accessed concurrently accross the threads". But what is the alternative way? Anybody found any solution....Any help appriciated.

    Hi k_dey,
    I don't use Informix JDBC driver, but looking through the Informix JDBC Driver Programmer's Guide UNIX and Windows Environments, V2.21, it appears that statement caching is enabled by setting the STMT_CACHE environment variable to 1 (one). Unfortunately, I couldn't find anything in the guide on how to disable statement caching, so I searched the archives of the "comp.databases.informix" newsgroup (for the word 'STMT_CACHE') and it seems that if you set it to 0 (zero), it disables statement caching.
    The guide says that you can set these environment variables through JDBC by either including NAME=VALUE pairs in the database connection URL, or supplying a "java.util.Properties" object as a parameter to the "getConnection()" method (in class "java.sql.DriverManager").
    According to the guide, this is the format for the URL:
    jdbc:informix-sqli://[{ip-address|host-name}:port-number][dbname]:
    INFORMIXSERVER=server-name;[user=user;password=password]
    [;name=value[;name=value]...]
    So I guess you just need to write:
    ;STMT_CACHE=0instead of
    ;name=valueAnd here is some slightly modified code, also taken from the guide:
    Properties pr = new Properties();
    pr.put("STMT_CACHE","0");
    conn = DriverManager.getConnection(newUrl, pr);The guide says that you must use only one of the above two methods, i.e. either set the environment variable in the URL, or use the "Properties" parameter.
    Hope this helps.
    Good Luck,
    Avi.

  • Relational queries through JDBC with the help of Kodo's metadata for O/R mapping

    Due to JDOQL's limitations (inability to express joins, when relationships
    are not modeled as object references), I find myself needing to drop down to
    expressing some queries in SQL through JDBC. However, I still want my Java
    code to remain independent of the O/R mapping. I would like to be able to
    formulate the SQL without hardcoding any knowledge of the relational table
    and column names, by using Kodo's metadata. After poking around the Kodo
    Javadocs, it appears as though the relevant calls are as follows:
    ClassMetaData cmd = ClassMetaData.getInstance(MyPCObject.class, pm);
    FieldMetaData fmd = cmd.getDeclaredField( "myField" );
    PersistenceManagerFactory pmf = pm.getPersistenceManagerFactory();
    JDBCConfiguration conf = (JDBCConfiguration)
    ((EEPersistenceManagerFactory)pmf).getConfiguration();
    ClassResolver resolver = pm.getClassResolver(MyPCObject.class);
    Connector connector = new PersistenceManagerConnector(
    (PersistenceManagerImpl) pm );
    DBDictionary dict = conf.getDictionary( connector );
    FieldMapping fm = ClassMapping.getFieldMapping(fmd, conf, resolver, dict);
    Column[] cols = fm.getDataColumns();
    Does that look about right?
    Here's what I'm trying to do:
    class Foo
    String name; // application identity
    String bar; // foreign key to Bar
    class Bar
    String name; // application identity
    int weight;
    Let's say I want to query for all Foo instances for which its bar.weight >
    100. Clearly this is trivial to do in JDOQL, if Foo.bar is an object
    reference to Bar. But there are frequently good reasons for modeling
    relationships as above, for example when Foo and Bar are DTOs exposed by the
    remote interface of an EJB. (Yeah, yeah, I'm lazy, using my
    PersistenceCapable classes as both the DAOs and the DTOs.) But I still want
    to do queries that navigate the relationship; it would be nice to do it in
    JDOQL directly. I will also want to do other weird-ass queries that would
    definitely only be expressible in SQL. Hence, I'll need Kodo's O/R mapping
    metadata.
    Is there anything terribly flawed with this logic?
    Ben

    I have a one point before I get to this:
    There is nothing wrong with using PC instances as both DAO and DTO
    objects. In fact, I strongly recommend this for most J2EE/JDO design.
    However, there should be no need to expose the foreign key values... use
    application identity to quickly reconstitute an object id (which can in
    turn find the persistent version), or like the j2ee tutorial, store the
    object id in some form (Object or String) and use that to re-find the
    matching persistent instance at the EJB tier.
    Otherwise, there is a much easier way of finding ClassMapping instances
    and in turn FieldMapping instances (see ClassMapping.getInstance () in
    the JavaDocs).
    Ben Eng wrote:
    Due to JDOQL's limitations (inability to express joins, when relationships
    are not modeled as object references), I find myself needing to drop down to
    expressing some queries in SQL through JDBC. However, I still want my Java
    code to remain independent of the O/R mapping. I would like to be able to
    formulate the SQL without hardcoding any knowledge of the relational table
    and column names, by using Kodo's metadata. After poking around the Kodo
    Javadocs, it appears as though the relevant calls are as follows:
    ClassMetaData cmd = ClassMetaData.getInstance(MyPCObject.class, pm);
    FieldMetaData fmd = cmd.getDeclaredField( "myField" );
    PersistenceManagerFactory pmf = pm.getPersistenceManagerFactory();
    JDBCConfiguration conf = (JDBCConfiguration)
    ((EEPersistenceManagerFactory)pmf).getConfiguration();
    ClassResolver resolver = pm.getClassResolver(MyPCObject.class);
    Connector connector = new PersistenceManagerConnector(
    (PersistenceManagerImpl) pm );
    DBDictionary dict = conf.getDictionary( connector );
    FieldMapping fm = ClassMapping.getFieldMapping(fmd, conf, resolver, dict);
    Column[] cols = fm.getDataColumns();
    Does that look about right?
    Here's what I'm trying to do:
    class Foo
    String name; // application identity
    String bar; // foreign key to Bar
    class Bar
    String name; // application identity
    int weight;
    Let's say I want to query for all Foo instances for which its bar.weight >
    100. Clearly this is trivial to do in JDOQL, if Foo.bar is an object
    reference to Bar. But there are frequently good reasons for modeling
    relationships as above, for example when Foo and Bar are DTOs exposed by the
    remote interface of an EJB. (Yeah, yeah, I'm lazy, using my
    PersistenceCapable classes as both the DAOs and the DTOs.) But I still want
    to do queries that navigate the relationship; it would be nice to do it in
    JDOQL directly. I will also want to do other weird-ass queries that would
    definitely only be expressible in SQL. Hence, I'll need Kodo's O/R mapping
    metadata.
    Is there anything terribly flawed with this logic?
    Ben
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Uploading data through jdbc thin client appl to database is taking time.

    Hi
    When application team try to upload data (excel file) through JDBC app to the database is taking too much time. When I checked through TOAD below query in background is taking too much time.
    SELECT NULL AS table_cat, t.owner AS table_schem,
    t.table_name AS table_name, t.column_name AS column_name,
    DECODE (t.data_type,
    'CHAR', 1,
    'VARCHAR2', 12,
    'NUMBER', 3,
    'LONG', -1,
    'DATE', 91,
    'RAW', -3,
    'LONG RAW', -4,
    'BLOB', 2004,
    'CLOB', 2005,
    'BFILE', -13,
    'FLOAT', 6,
    'TIMESTAMP(6)', 93,
    'TIMESTAMP(6) WITH TIME ZONE', -101,
    'TIMESTAMP(6) WITH LOCAL TIME ZONE', -102,
    'INTERVAL YEAR(2) TO MONTH', -103,
    'INTERVAL DAY(2) TO SECOND(6)', -104,
    'BINARY_FLOAT', 100,
    'BINARY_DOUBLE', 101,
    1111
    ) AS data_type,
    t.data_type AS type_name,
    DECODE (t.data_precision,
    NULL, t.data_length,
    t.data_precision
    ) AS column_size,
    0 AS buffer_length, t.data_scale AS decimal_digits,
    10 AS num_prec_radix, DECODE (t.nullable, 'N', 0, 1) AS nullable,
    NULL AS remarks, t.data_default AS column_def, 0 AS sql_data_type,
    0 AS sql_datetime_sub, t.data_length AS char_octet_length,
    t.column_id AS ordinal_position,
    DECODE (t.nullable, 'N', 'NO', 'YES') AS is_nullable
    FROM all_tab_columns t
    WHERE t.owner LIKE :1 ESCAPE '/'
    AND t.table_name LIKE :2 ESCAPE '/'
    AND t.column_name LIKE :3 ESCAPE '/'
    ORDER BY table_schem, table_name, ordinal_position
    All other activity on app and database is fine.
    Kindly need a suggestion soon regarding this.
    Thanks
    SHIYAS

    which is easier to read & understand?
    SELECT NULL                                        AS table_cat,
           t.owner                                     AS table_schem,
           t.table_name                                AS table_name,
           t.column_name                               AS column_name,
           Decode (t.data_type, 'CHAR', 1,
                                'VARCHAR2', 12,
                                'NUMBER', 3,
                                'LONG', -1,
                                'DATE', 91,
                                'RAW', -3,
                                'LONG RAW', -4,
                                'BLOB', 2004,
                                'CLOB', 2005,
                                'BFILE', -13,
                                'FLOAT', 6,
                                'TIMESTAMP(6)', 93,
                                'TIMESTAMP(6) WITH TIME ZONE', -101,
                                'TIMESTAMP(6) WITH LOCAL TIME ZONE', -102,
                                'INTERVAL YEAR(2) TO MONTH', -103,
                                'INTERVAL DAY(2) TO SECOND(6)', -104,
                                'BINARY_FLOAT', 100,
                                'BINARY_DOUBLE', 101,
                                1111)                  AS data_type,
           t.data_type                                 AS type_name,
           Decode (t.data_precision, NULL, t.data_length,
                                     t.data_precision) AS column_size,
           0                                           AS buffer_length,
           t.data_scale                                AS decimal_digits,
           10                                          AS num_prec_radix,
           Decode (t.nullable, 'N', 0,
                               1)                      AS nullable,
           NULL                                        AS remarks,
           t.data_default                              AS column_def,
           0                                           AS sql_data_type,
           0                                           AS sql_datetime_sub,
           t.data_length                               AS char_octet_length,
           t.column_id                                 AS ordinal_position,
           Decode (t.nullable, 'N', 'NO',
                               'YES')                  AS is_nullable
    FROM   all_tab_columns t
    WHERE  t.owner LIKE :1 ESCAPE '/'
           AND t.table_name LIKE :2 ESCAPE '/'
           AND t.column_name LIKE :3 ESCAPE '/'
    ORDER  BY table_schem,
              table_name,
              ordinal_position

  • How to kill a query?

    I moved from TOAD to SQL Developer and am not an experienced programmer.
    When a query gets away from me that I want to kill, I hit the red X button. SQL Developer will hang. Sometimes I will actually have to stop and restart the Oracle service to kill the query.
    How do I kill a query immediately?

    This is probably due to the nature of your query rather than an sqldev bug, so the database won't let you cancel and sqldev just hangs there until it completes anyway.
    You shouldn't have any trouble canceling a normal select. If you do, get back with DB/sqldev version and a reproducible script.
    Also, it would be great if you can compare the same statement with TOAD. If it can be canceled there, it should be possible in sqldev too.
    Last, you can always kill the whole session through sqldev's Monitor Sessions tool (in a second instance since the first one is blocked by your statement), the Enterprise Manager or the OS' KILL command.
    Regards,
    K.

  • 'set scan off' or 'set define off' now working through JDBC on Oracle 10g

    Hi,
    I am using oracle 10g. I am trying to execute 'set scan off' statement through JDBC (java code) using below statement
    //get connection Connection c = this.init();  //create statement object Statement st = c.createStatement();  //execute statement st.execute("set scan off");
    but it is throwing below exception.
    'java.sql.SQLException: ORA-00922: missing or invalid option'
    I also tried 'set define off' but got same exception. But if I run these statement directly on database without using JDBC there is no exception.
    Please let me know what is the issue.

    Rajesh Panchal wrote:
    Hi,
    I am using oracle 10g. I am trying to execute 'set scan off' statement through JDBC (java code) using below statement
    //get connection
    Connection c = this.init(); 
    //create statement object
    Statement st = c.createStatement(); 
    //execute statement
    st.execute("set scan off");                              but it is throwing below exception.
    'java.sql.SQLException: ORA-00922: missing or invalid option'
    I also tried 'set define off' but got same exception. But if I run these statement directly on database without using JDBC there is no exception.
    Please let me know what is the issue.These are not SQL statements but specific Oracle commands. You would invoke them from PL/SQL through the command interpreter or by using Sqlplus on the commandline; if you try to execute this in a PL/SQL query window you'll get the same error.
    So no, you are not going to invoke them from JDBC.

  • Error  while executing query through rsrt

    hello experts,
    I am facing following error while executing one HR query through rsrt.
    "System error in program SAPLRRI2 and form REP_ASSIGN_INITIAL_OPT-01- (see long text) "
    while executing query through rsrt it automatically goes to debug mode, coming out of debug mode i get the screan showing above error message.
    What would be an issue?
    Regards,
    Nirav
    Edited by: Nirav Shah on Apr 21, 2008 8:19 AM

    Hi ramesh,
    I havent kept any execlusion selection. Though i saw long text, it is like this:
    "Diagnosis
    This internal error is an intended termination resulting from a program state that is not permitted.
    Procedure
    Analyze the situation and inform SAP.
    If the termination occurred when you executed a query or Web template, or during interaction in the planning modeler, and if you can reproduce this termination, record a trace (transaction RSTT).
    For more information about recording a trace, see the documentation for the trace tool environment as well as SAP Note 899572.
      Notification Number BRAIN 299 "
    Regards,
    Nirav

  • Date & time in sql through jdbc URGENT!!!

    hi,
    How do I enter date & time in this format "16 MAR 2002 12:54:23 pm" in the database of oracle through jdbc-sql?
    Please help me out.
    Its urgent.
    Regards
    Deepa Datar

    If you are familiar with Oracle, you can use PL/SQL to do the work for you. I didn't test this, but it's probably pretty close.
    String sql = "INSERT INTO TBLA
    VALUES(TO_DATE('16 MAR 2002 12:54:23 P.M.','DD MON YYYY HH24:MI:SS P.M.'))";
    I'm assuming that you know how to insert data, you are only wondering about the specifics of dates?
    This can also be done using a prepared statement. You would code the insert statement something like this:
    String sql = "INSERT INTO TBLA
    VALUES(TO_DATE(?,'DD MON YYYY HH24:MI:SS P.M.'))";
    I would suggest that if you can convert the time military (24 hour) time, it is easier to handle. The data format model for this is HH24. Otherwise you will need two prepared statements, one for A.M. and one for P.M.
    Good luck.

  • Update query in JDBC adapter

    Hi guys help me with this
    1) What is the use of update query in jdbc adapter?
    2) Why do we use the flag field in jdbc table ?

    Hi,
    1) What is the use of update query in jdbc adapter?
    The purpose of the Update Query in JDBC is to change the status of the processed records in the table.
    That is when JDBC query is executed  it select the records from the table in the Database and it sends to the Receiver.
    After that it executes the Update query to change the status of the processed records in the Table.
    2) Why do we use the flag field in jdbc table ?
    Flag field in the table is used to identify which record is processed by Jdbc adapter. Initial stage it will have the status as 0 , if it is successfully processed then it will updated to 1.
    Based on this we can identify processed records which is done by update query.
    Regards
    Sridhar Goli

  • How to save Chinese&Japanise Character through JDBC or Hibernate in ORACLE

    Dear all,
    How to save chinese and japanise character in oracle 9i database through JDBC or Hibernate.
    Please let us know if you have any source code.
    Thanks in advance.
    Thanks,
    Sundararaman.V.S.

    http://forums.oracle.com/forums/ann.jspa?annID=599
    C.

  • 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)?

  • SPARQL query through Jena adaptor not work when string literals used

    Hi,
    When I executed the following SPARQL query through Oracle Jena adaptor:
    SELECT ?personHasFirstName WHERE
    {?personHasFirstName foaf:firstName ?name . }
    I got the expected results.
    However it won't return anything when I narrowed the query to match a particular name like below:
    SELECT ?personHasFirstName WHERE
    {?personHasFirstName foaf:firstName \"Julie\" . }
    I also tried the Filter approach:
    SELECT ?personHasFirstName WHERE {?personHasFirstName foaf:firstName ?name . FILTER (?name =\"Julie\") }
    It still doesn't return any results.
    I saw from the release notes about the bug dealing with "\". My guess is that the above behavior is caused by that bug. What is the suggested way to walk-around this? Thanks,
    Weihua

    Could you please try this? It works as expected on my machine.
    GraphOracleSem graph = new GraphOracleSem( oracle, modelName);
    ModelOracleSem model = new ModelOracleSem(graph);
    Node sub = Node.createURI("http://test.com/employee123");
    Node pre = Node.createURI("http://xmlns.com/foaf/0.1/firstName");
    Node obj = Node.createLiteral("Julie");
    graph.add(Triple.create(sub, pre, obj));
    String queryString =
    " PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
    "SELECT ?person WHERE { ?person foaf:firstName \"Julie\" . } ";
    QueryExecution qexec = QueryExecutionFactory.create(
    QueryFactory.create(queryString), model);
    try {
    ResultSet results = qexec.execSelect();
    while (results.hasNext()) {
    QuerySolution soln = results.nextSolution();
    psOut.println("runQuery: soln " + soln);
    finally {
    if (qexec != null)
    qexec.close();
    output snippet:
    runQuery: soln ( ?person = <http://test.com/employee123> )

  • Getting SQL*Net more data from client waits when running a query through web based interface

    Hi, you all,
    We are having this weird behavior when running query through web based interface, we get a lot of "SQL*Net more data from client" waits, the OEM indicates that the current wait event is SQL*Net more data from client
    It's just a very simple query wich invokes a db link.
    When I execute the same query on any PL/SQL tool like toad or sql developer it works fine, but that query inside an application executed through a web based interface, it hangs for ever.
    Where can I start looking for the problem.
    We are working on a 3 Node RAC 11gr2, both databases are on the same RAC.
    Thanks.

    Hi ,
    we managed to reproduce the case in test environment, below are the steps:
    1)have 2 databases on different machines, will call the first one local, the other one remote.
    2)in the local database create:
    a - DBLink to remote database.
    b - read data from remote database(we simply used select count(*) from dummy_table )
    c - insert data into a table on the local database
    d - terminate the connection between the 2 databases (disconnect either machine from the network)
    e - commit on local database.
    what we noticed was the following:
    1)when the local database is disconnected from the network(the machine is not connected to any network at the moment): almost immediately throws an error, and issuing the following:
    select * from dba_2pc_pending;we found some data .
    2) when the remote database was disconnected(the local database is still connected to the network):
    after 7-8 seconds an error is thrown, and issuing the following:
    select * from dba_2pc_pending;did not return any data.
    since this is pretty similar to our case ,we concluded that it's a network issue.
    is this the correct behavior ?
    as a temporary solution till the network issue is fixed ,we did the following:
    1) changed the call of the remote procedure to calling a local procedure that calls the remote procedure.
    2) added pragma autonomous_transaction to the local procedure.
    3) at the end of the local procedure rollback the autonomous transaction.
    it seems that since the global transaction does not use the DBLink database does not issue a 2PC commit.
    this works in my cases since the DBLink is only issed to read data.

  • Inserting files in to Oracle 8i database through JDBC - Only 4k data file

    Hi,
    I need to insert a files(images or excel files, doc files etc..) in to oracle 8i database through JDBC program. But i am not able to store more than 4k data files in to files. can any body give me solutions regarding this.
    My code is like this...
    String fileName ="Sample.jpg";
                                  String dataSource = "jdbc/oracle";
                   File file=null;
                   FileInputStream fis = null;
                   Context initCtx=null;
                   DataSource ds = null;
                   Connection con = null;
                   try
                        initCtx = new InitialContext();
                        ds = (DataSource)initCtx.lookup(dataSource);
                        con = ds.getConnection();
                      try
                         file = new File(fileName);
                         fis = new FileInputStream(file);
                        catch(FileNotFoundException fe)
                             out.println("File Not Found");
                                            PreparedStatement pstmt = con.prepareStatement("insert into bfiles values(?,?)");
                        pstmt.setString(1, fileName);
                        pstmt.setBinaryStream(2, fis, (int)file.length());
                        pstmt.executeUpdate();
                        out.println("Inserted");
                        fis.close();
                        pstmt.close();
                        con.close();
                        out.println("closed");
                   catch(Exception e)
                        out.println(e);
               }     in Oracle bi i have created a table like this :
    CREATE TABLE BFILES
      FILENAME     VARCHAR2(100)                    DEFAULT NULL,
      FILECONTENT  BLOB                             DEFAULT EMPTY_BLOB()
    )Please help me ourt to solve this problem.
    i got struck in this problem.
    its urgent
    thanks in advance
    djshivu

    Hi Shanu.
    Thanks for your help...
    By Using THIN driver also we can insert any files more than 4k and and retrive same. Fallowing codes worked fine for me using thin Driver .
    Following are the 2 programs to write and read.
    we can insert and retrieve any format of files ( jpg, gif, doc, xsl, exe, etc...)
    =======================================================
    // Program to insert files in to table
    import oracle.jdbc.driver.*;
    import oracle.sql.*;
    import java.sql.*;
    import java.io.*;
    import java.awt.image.*;
    import java.awt.*;
    * @author  Shivakumar D.J
    * @version
    public class WriteBlob{
    public static void main(String[] args){
    String filename = "018-Annexure-A.xls";
    Connection conn = null;
    try{
        Class.forName("oracle.jdbc.driver.OracleDriver");
        conn=DriverManager.getConnection("jdbc:oracle:thin:@test:1521:orcl","modelytics","modelytics");
        conn.setAutoCommit(false);
        Statement st = conn.createStatement();
        int b= st.executeUpdate("insert into bfiles values('"+filename+"', empty_blob())");
        ResultSet rs= st.executeQuery("select * from bfiles for update");
        rs.next();
        BLOB blob=((oracle.jdbc.driver.OracleResultSet)rs).getBLOB(2);
        FileInputStream instream = new FileInputStream(filename);
        OutputStream outstream = blob.getBinaryOutputStream();
        int chunk = blob.getChunkSize();
        byte[] buff = new byte[chunk];
        int le;
        while( (le=instream.read(buff)) !=-1)
            outstream.write(buff,0,le);
        instream.close();
        outstream.close();
        conn.commit();
        conn.close();
        conn = null;
        System.out.println("Inserted.....");
       catch(Exception e){
            System.out.println("exception"+e.getMessage());
            e.printStackTrace();
       }//catch
    }=======================
    // Program to retrieve files from database
    [import java.sql.*;
    import java.io.*;
    import java.awt.*;
    public class ReadImage
    public static void main(String a[])
        String fileName ="018-Annexure-A.xls";
        try
              Driver driver = new oracle.jdbc.driver.OracleDriver();
              DriverManager.registerDriver(driver);
              Connection con = DriverManager.getConnection("jdbc:oracle:thin:@test:1521:orcl", "modelytics", "modelytics");
            File file = new File("C:/Documents and Settings/USERID/Desktop/dump.xls");
              FileOutputStream targetFile=  new FileOutputStream(file); // define the output stream
              PreparedStatement pstmt = con.prepareStatement("select filecontent from bfiles where filename= ?");
              pstmt.setString(1, fileName);
               ResultSet rs = pstmt.executeQuery();
               rs.next();
               InputStream is = rs.getBinaryStream(1);
              byte[] buff = new byte[1024];
               int i = 0;
               while ((i = is.read(buff)) != -1) {
                    targetFile.write(buff, 0, i);
                   System.out.println("Completed...");
            is.close();
            targetFile.close();
            pstmt.close();
           con.close();
        catch(Exception e)
              System.out.println(e);
    }====================
    Table Structure is like this
    CREATE TABLE BFILES
      FILENAME     VARCHAR2(100)                    DEFAULT NULL,
      FILECONTENT  BLOB                             DEFAULT EMPTY_BLOB()
    )========================================================
    i hope above codes will helpful for our future programmers
    thanks shanu...
    regards
    djshivu...(javashivu)

  • Transport of infoset Query through Report RSAQR3TR

    Dear Hcm Gurus
    I have created query through sq01 and change functional area sq02 as per requirement in this query
    i have created additional fields in infoset in which i also assigned abap field code on newly created  data fields
    i also assigned new data fields to relavent field group as well
    but when i export and import as per mentioned procedures , additional data field are not imported in target client
    i have follow steps as mentioned
    Step 1
    Run RSAQR3TR in 'old' system. Select EXPORT and specify the objects to be transported. (System includes these in an automatically created transport request)
    Step 2.
    Release this transport and request it be transported to 'new' system. (This results in the entries being populated in transport table AQTDB in 'new' system).
    Step 3.
    Run RSAQR3TR in 'new' system. Select IMPORT and tick the Overwrite checkbox. Specify the transport number in the field labelled 'dataset with imports'.
    Kindly guide me urgently that how additional fields are transported in target client
    Regards
    Barket Ali Zafar
    SAP HCM Consultant
    Siemens Pakistan
    +92-0300-5521524

    yes
    but my question is ? that additional data field defineds in functional area /infoset are not importing ?
    Kindly guide me urgently

Maybe you are looking for

  • Go to Offline status after sending print in HP

    Hi everybody.I have two HP Laserjet 4100. Both of them after sending print from windows go to offline status and an error message appear (Yellow Error BOX in notification area).Printer screen show Ready message. The light on the printer is green and

  • Errors in Standby Alert Log

    Dear All, We have 10gR2 RAC with Physical Data Guard environment using ASM and both have same disk group names. Lets say the primary database name is prim and stand by database name is stdby. We are getting the following errors in alert log file of s

  • Folder size comparison in Mac and external HDD.

    Hello there, I have a Macbook pro, I'm trying to backup files and folders from my Mac to an external Hard disk (FAT32). When I check the folder in my Mac, it is 25MB and 75 items. When I copy the folder to an external hard disk and check the size, it

  • Problem Regarding TableCellRenderer

    I am facing problem with JTable's row/cell focus appearence. tableAlert is a table : private MultiSpanCellTable tableAlert = new MultiSpanCellTable(new AttributiveCellTableModel(columnHeaders, 0), false) Here MultiSpanCellTable is JTable Type tableAl

  • Nokia messing problem with e51 firmware v300

    hi i recently upgraded the firmware to v300 via nokia software update what happens is every software is working fine and so fast that you cant even imagine i had found a bug i need to know the person who are using nokia messaging i need to know the n