How to achive Java DB like loggin in oracle?

Please help me, i'm new to oracle and don't know how to achive my goal.
In derby my log files presents me all the information i need for researching purposes.
The same can be achived via auditing in oracle i guess.
So my starting point is:
I activated an audit as follows:
AUDIT UPDATE,LOCK,SELECT on app.accouts by access;
Here is a log of my audit session:
I can't see the SQL_BIND information for example, can i activate it?
SQL> select action_name,extended_timestamp,returncode from dba_audit_trail order by extended_timestamp;
ACTION_NAME
EXTENDED_TIMESTAMP
RETURNCODE
SELECT
23.05.08 08:44:10,734000 -07:00
0
SELECT
23.05.08 08:58:27,453000 -07:00
0
ACTION_NAME
EXTENDED_TIMESTAMP
RETURNCODE
UPDATE
23.05.08 08:58:28,562000 -07:00
0
SELECT
23.05.08 08:58:28,968000 -07:00
ACTION_NAME
EXTENDED_TIMESTAMP
RETURNCODE
0
UPDATE
23.05.08 08:58:29,140000 -07:00
0
UPDATE
ACTION_NAME
EXTENDED_TIMESTAMP
RETURNCODE
23.05.08 08:58:29,234000 -07:00
0
6 Zeilen ausgewählt.
SQL> spool off
Here is the compareable derby log:
4397482349590219485{1}), Executing prepared statement: UPDATE ACCOUNTS SET MONEY = ? WHERE (ID = ?) :End prepared statement with 2 parameters begin parameter #1: 2500 :end parameter begin parameter #2: 1 :end parameter
2008-05-23 16:32:51.953 GMT Thread[DRDAConnThread_2,5,main] (XID = 3865), (SESSIONID = 0), (DATABASE = testDB), (DRDAID = NF000001.G4B9-4397482349590219485{1}), Committing
What i'm missing in my oracle audit is, what SQL statement is actually used and what parameters are binded to them.
Also i need to know if the SQL statement was successfull or failed and if the statement failed, why has it failed?
Please help me :-)
Kind regards
Basti

AUDIT is not going to capture the SQL Statement (I'm not sure if Fine-grained auditing will capture this), but it will capture the return code. Check out the RETURNCODE field on dba_audit_trail.
As for bind variables, the only way I know of is to turn on a Level 12 SQL trace as those values are stored in tha PGA area of oracle, not in the SGA.
--Bradd Piontek                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Java DB like logging via oracle auditing?

    Please help me, i'm new to oracle and don't know how to achive my goal.
    In derby my log files presents me all the information i need for researching purposes.
    The same can be achived via auditing in oracle i guess.
    So my starting point is:
    I activated an audit as follows:
    AUDIT UPDATE,LOCK,SELECT on app.accouts by access;
    Here is a log of my audit session:
    I can't see the SQL_BIND information for example, can i activate it?
    SQL> select action_name,extended_timestamp,returncode from dba_audit_trail order by extended_timestamp;
    ACTION_NAME
    EXTENDED_TIMESTAMP
    RETURNCODE
    SELECT
    23.05.08 08:44:10,734000 -07:00
    0
    SELECT
    23.05.08 08:58:27,453000 -07:00
    0
    ACTION_NAME
    EXTENDED_TIMESTAMP
    RETURNCODE
    UPDATE
    23.05.08 08:58:28,562000 -07:00
    0
    SELECT
    23.05.08 08:58:28,968000 -07:00
    ACTION_NAME
    EXTENDED_TIMESTAMP
    RETURNCODE
    0
    UPDATE
    23.05.08 08:58:29,140000 -07:00
    0
    UPDATE
    ACTION_NAME
    EXTENDED_TIMESTAMP
    RETURNCODE
    23.05.08 08:58:29,234000 -07:00
    0
    6 Zeilen ausgewählt.
    SQL> spool off
    Here is the compareable derby log:
    4397482349590219485{1}), Executing prepared statement: UPDATE ACCOUNTS SET MONEY = ? WHERE (ID = ?) :End prepared statement with 2 parameters begin parameter #1: 2500 :end parameter begin parameter #2: 1 :end parameter
    2008-05-23 16:32:51.953 GMT Thread[DRDAConnThread_2,5,main] (XID = 3865), (SESSIONID = 0), (DATABASE = testDB), (DRDAID = NF000001.G4B9-4397482349590219485{1}), Committing
    What i'm missing in my oracle audit is, what SQL statement is actually used and what parameters are binded to them.
    Also i need to know if the SQL statement was successfull or failed and if the statement failed, why has it failed?
    Please help me :-)
    Kind regards
    Basti

    For Oracle database auditing, you need to set the audit_trail parameter to either db, extended to write the audit trail to aud$ table in the database or xml, extended to write your audit trail to an OS file in XML format.
    the 'extended' tells Oracle to collect the sql_text and bind variables in the standard audit trail.
    If you use FGA (fine grained auditing), the sql text is automatically included in the audit trail.
    Thanks.

  • How to run java progarm like jbuilder in windows

    hi,
    I had writed a java program with JBuilder6. After i deploy it, I can only run it in the DOS window using command line in the windows OS, and when it is running , there is always a DOS window opened.
    JBuilder6 is a pure java program, but when it is running, thing is not the same, it has no DOS window with it.How to do like JBuilder6?
    Thanks.

    Use "javaw <class name>" to execute your compiled java code so that DOS window won't appear while executing.

  • How to use Java code signing certificate in oracle 11i

    Hello,
    I am try to configure java code signing certificate in 11.5.10.2 application. we got java sign certificate from verisgin. SA's imported the certificate and created alias XXX_XXX with password and passphrase.
    I am able to see the my certificate. keytool -list -v -keystore xxx_xxxx.jks -storepass Password.
    how do I use it. I am using Enhance Jar Signing for EBS DOC ID 1591073.1.
    could you please give me some advice on it?
    Thanks
    Prince

    Hussien,
    I find out apps keystore keypassword and storepassword, I imported the java code sign certificate. I generated Jar files through adadmin, but I am getting  warning error
    adogif() unable to generate Jar Filers under JAVA_TOP.
    executing /usr/jdk/jdk1.6.0_45/bin/java sun.security.tools.JarSigner keysotre **** -sigfile CUST Signer /apps/......
    Error JarSigner subcommand Exited With status 1.
    No standard output from jarsigner JarSigner error output: Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/tools/JarSigner Caused by: java.lang.ClassNotFoundException: sun.security.tools.JarSigner         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)         at java.security.AccessController.doPrivileged(Native Method)         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)         at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: sun.security.tools.JarSigner.  Program will exit. WARNING: The following path(s), defined in /apps2/property/product/tst/appl/cz/11.5.0/java/make/czjar.dep as elements of the output:   oracle/apps/cz/runtime/tag WARNING: Copying cztag.lst from the old fndlist.jar ...   About to Analyze flmkbn.jar : Fri Nov 22 2013 10:45:51
    Please let me know if you have any idea. Thanks Prince

  • How to load java clasess first time in oracle database?

    hi
    I want to load my java compiled class to oracle database.
    whenever I load it using loadjava ( command line utility) it gives me ora-904 error. column not found. while creating class as schema object in database.
    1. How to check that oracle database is JAVA enabled?
    2. If I run initjvm.sql script to enable java in Oracle,
    then also it is giving same problem?
    3. DBMS_JAVA package is also NOT in the database.
    What should i do for these cases?
    waiting for ur response.
    I am using oracle 8i 8.1.7 datbase.
    Regards
    Virendra chauhan

    The Member Feedback forum is for suggestions and feedback for OTN Developer Services. This forum is not monitored by Oracle support or product teams and so Oracle product and technology related questions will not be answered. We recommend that you post this thread to the Oracle Technology Network (OTN) > Products > Database > Database - General forum.

  • How can I build Windows Like Help In Oracle Developer ?

    Could anyone help me by giving the information that how can I build a windows like help system ?
    Thanks In Advance.
    Saiful Alam

    I remember that in Oracle Develope 6.0 demos there are lots of this kind of help,but I don't know how to do it.If u can solve this problem,pls post it.

  • How to create a "Explorer" like in java

    i'm just wonderin if there's a way on how to create "Windows Explorer" like in Java wherein you can view all your directories with yellow folder icon and also you can view all your files and drives....
    And when you double click the yellow folder icon it will then expand and will show all the subfolders and files ...
    How????
    Thanks!

    Yes, there is a way. Look up JTree in the API.-can you post some code.... i cant figure out on how to use JTree...
    i'm still confused on where will i get the entire directories of my drives...
    thanks

  • How to load CAD files like .prt, . stp  in JAVA

    How to load CAD files like .prt, . stp files which can be generated by UG and Pro/E etc in JAVA. I am appreciated that you will give any comments.

    Hi,
    as far as I know there is no Java 3D loader for CAD files available. You have to export your files into a format like "3ds ", "obj ", or "wrl". See thread 'JAVA 3D max files and VrmlLoader' on java.net: [http://forums.java.net/jive/thread.jspa?messageID=231564&#231564|http://forums.java.net/jive/thread.jspa?messageID=231564&#231564]
    August

  • How to achive this using servlet

    hi I am new to this technology... My requirement is , First I have to check whether that rebate_sku_num exists in the database or not.. If exits i need to update the row.. If now I have to insert the new row with values.. How to achive this..
    my screen contains 7 rows... in will increase.. for every submit.. i have to check with the database.. whether the rebate_sku_num exists or not.. help me out.. here is my code.. i am not sure how to format my code.. in future i will do it...
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import javax.servlet.SingleThreadModel;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import java.io.IOException;
    import java.sql.ResultSet;
    import java.io.*;
    import java.util.*;
    import java.util.Date;
    import java.text.*;
    public class AddRebate extends HttpServlet implements SingleThreadModel {
    public void init(ServletConfig servletconfig) throws ServletException {
    super.init(servletconfig);
    public void doPost(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)
    throws ServletException, IOException {
    HttpSession session;
    session = httpservletrequest.getSession(true);
    String user_name;
    String divisionCode;
    String rebate_sku_num[];
    String selectedMonth;
    String amount[];
    String message = "";
    String Query="";
    String RebateId="";
    boolean flag = true;
    // from here
    Calendar todaysdate = new GregorianCalendar();
    SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
    SimpleDateFormat sdf1 = new SimpleDateFormat("MM/dd/yyyy HH:MM:SS");
    System.out.println("today's date: " + sdf.format(todaysdate.getTime()));
    String entryDate = sdf.format(todaysdate.getTime());
    String entryDate1 = sdf1.format(todaysdate.getTime());
    System.out.println("entering date is " +entryDate) ;
    System.out.println("entering date is " +entryDate1) ;
    // to here
    user_name = (String) session.getAttribute("user_name");
    divisionCode = (String) session.getAttribute("division_code");
    selectedMonth = httpservletrequest.getParameter("selectedMonth");
    rebate_sku_num = httpservletrequest.getParameterValues("rebateId");
    amount = httpservletrequest.getParameterValues("amount");
    System.out.println("AddRebate : doPost() : selectedMonth = " + selectedMonth);
    System.out.println("AddRebate : doPost() : rebate_sku_num = " + rebate_sku_num);
    System.out.println("AddRebate : doPost() : amount = " + amount);
    // from here
    flag = true;
    for (int z = 0; z < rebate_sku_num.length && flag; z++) {
    try {
    flag=false;
    String s = "select REBATE_SKU_NUM from EASMSA_REBATE_SKU_DETAILS_TB where REBATE_SKU_NUM ='" + rebate_sku_num[z] + "'";
    System.out.println("AdjustmentServlet : doGet() : checking sku validity query = " + s);
    ResultSet resultset = DatabaseConnection.executeQuery(s);
    if (resultset != null) {
    while (resultset.next()) {
    RebateId = resultset.getString("REBATE_SKU_NUM");
    flag = true;
    if ((rebate_sku_num[z] != RebateId)) {
    System.out.println("get the values" +rebate_sku_num);
    System.out.println("get the values" + RebateId);
    Query = "INSERT INTO EASMSA_REBATE_SKU_DETAILS_TB " +
    "( REBATE_SKU_NUM, REBATE_DATE, REBATE_AMT, CREATED_BY," +
    "CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE ) VALUES (" +
    "'" + rebate_sku_num[z] + "', " +
    "TO_Date( '" + "30/" + selectedMonth + "', 'dd/MM/YYYY HH:MI:SS AM'), " +
    "'" + amount[z] + "' , '" + user_name + "'" +
    ", TO_Date( '" + entryDate + "', 'MM/dd/YYYY HH:MI:SS AM')" +
    ", '" + user_name + "'," +
    " TO_Date( '" + entryDate + "', 'MM/dd/YYYY HH:MI:SS AM'))";
    System.out.println("query is executed" +Query);
    }else if ((rebate_sku_num[z] == RebateId )){
    Query = "update EASMSA_REBATE_SKU_DETAILS_TB set REBATE_AMT=" + amount[z] + " where REBATE_SKU_NUM='" + rebate_sku_num[z] + "'";
    System.out.println("query is executed for updation" +Query);
    } else {
    System.out.println("AdjustmentServlet : doGet() : checking for sku validity : resultset null");
    // message = "SKU '" + sku[z] + "' of customer '" + customer[z] + "' and location '" + location[z] + "' is not valid.";
    message = "SKU '" + rebate_sku_num[z] + "' is not valid.";
    flag = false;
    } catch (Exception exception1) {
    System.out.println("AdjustmentServlet : doGet() : exception in checking validity of SKU");
    exception1.printStackTrace();
    // message = "SKU '" + sku[z] + "' of customer '" + customer[z] + "' and location '" + location[z] + "' is not valid.";
    message = "SKU '" + rebate_sku_num[z] + "' is not valid.";
    flag = false;
    try {
    if (DatabaseConnection.executeUpdate(Query) == 0) {
    System.out.println(" AddRebate : doPost() : rollback: error in executing update query= " + Query);
    DatabaseConnection.rollBack();
    message = "Some problem in updating transactions. Please try again later.";
    flag = false;
    // break;
    } else {
    System.out.println("AddRebate : doPost() : update sucessfull");
    message = "Rebate Transactions has been updated.";
    flag = true;
    } catch (Exception ex) {
    System.out.println("AddRebate : doPost() : exception in update query");
    message = "Some problem in updating transactions. Please try again later.";
    flag = false;
    ex.printStackTrace();
    session.setAttribute("message", message);
    httpservletresponse.sendRedirect("Welcome1.jsp?s=y");
    return;

    Oh and you can give me the dukes for helping you here:
    http://forum.java.sun.com/thread.jsp?forum=45&thread=475828&tstart=0&trange=15

  • How to achive current date in report

    Hi Expeorts,
    I have below Filter in one of report. how to achive this?
    Ship Date = Current Date
    What is the meaning of this? and how to do this?
    Thanks in advance
    David
    Edited by: david Rathod on Jan 10, 2012 7:50 AM

    Hi ,
    You can achieve the same using Customer exit variable .You can use the following code .
    FORM do_user_exit       USING    i_vnam        LIKE rszglobv-vnam
                                     i_vartyp      LIKE rszglobv-vartyp
                                     i_iobjnm      LIKE rszglobv-iobjnm
                                     i_s_cob_pro   LIKE rsd_s_cob_pro
                                     i_s_rkb1d     LIKE rsr_s_rkb1d
                                     i_periv       TYPE rro01_s_rkb1f-periv
                                     i_t_var_range TYPE rrs0_t_var_range
                                     i_step        TYPE i
                            CHANGING e_t_range     TYPE rsr_t_rangesid.
      if i_step = 1.
         clear l_s_range.
         l_s_range-low = sy-datum.
         l_s_range-sign = 'I'.
         l_s_range-opt  = 'EQ'.
         append l_s_range TO e_t_range.
      endif.
    ENDFORM.   
    Hope it helps .
    Thanks
    Kamal

  • How To Store pdf or doc file in Oracle Database using Java Jdbc?

    can any one help me out How To Store pdf or doc file in Oracle Database using Java Jdbc in JSP/Serlet? i tried like anything. using blob also i tried. but i am able 2 store images in DB not files. please if u know or else if u have some code like this plz send that to me, and help me out plz. i need that urgent.

    Hi.. i am not getting error, But i am not getting the original contents from my file. i am getting all ASCII vales, instead of my original data. here i am including my code.
    for Adding PDF in DB i used image.jsp
    Database table structure (table name. pictures )
    Name Null? Type
    ID NOT NULL NUMBER(11)
    IMAGE BLOB
    <%@ page language="java" import="java.util.*,java.sql.*,java.io.*" pageEncoding="ISO-8859-1"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%
    try{
         Class.forName("oracle.jdbc.driver.OracleDriver");
         Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.135:1521:orcl","scott","tiger");
         PreparedStatement ps,pstmt,psmnt;
         ps = con.prepareStatement("INSERT INTO pictures VALUES(?,?)");
    File file =
    new File("D:/info.pdf");
    FileInputStream fs = new FileInputStream(file);
    ps.setInt(1,4);
    ps.setBinaryStream(2,fs,fs.available());
    int i = ps.executeUpdate();
    if(i!=0){
    out.println("<h2>PDF inserted successfully");
    else{
    out.println("<h2>Problem in image insertion");
    catch(Exception e){
    out.println("<h2>Failed Due To "+e);
    %>
    O/P: PDF inserted successfully
    i tried to display that pdf using servlet. i am giving the code below.
    import java.io.IOException;
    import java.sql.*;
    import java.io.*;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class DispPDF extends HttpServlet {
         * The doGet method of the servlet. <br>
         * This method is called when a form has its tag value method equals to get.
         * @param request the request send by the client to the server
         * @param response the response send by the server to the client
         * @throws ServletException if an error occurred
         * @throws IOException if an error occurred
         public void service(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {
              //response.setContentType("text/html"); i commented. coz we cant use response two times.
              //PrintWriter out = response.getWriter();
              try{
                   InputStream sPdf;
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                        Connection con=DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.135:1521:orcl","scott","tiger");
                        PreparedStatement ps,pstmt,psmnt;
                   psmnt = con.prepareStatement("SELECT image FROM pictures WHERE id = ?");
                        psmnt.setString(1, "4"); // here integer number '4' is image id from the table.
                   ResultSet rs = psmnt.executeQuery();
                        if(rs.next()) {
                   byte[] bytearray = new byte[1048576];
                        //out.println(bytearray);
                        int size=0;
                        sPdf = rs.getBinaryStream(1);
                        response.reset();
                        response.setContentType("application/pdf");
                        while((size=sPdf.read(bytearray))!= -1 ){
                        //out.println(size);
                        response.getOutputStream().write(bytearray,0,size);
                   catch(Exception e){
                   System.out.println("Failed Due To "+e);
                        //out.println("<h2>Failed Due To "+e);
              //out.close();
    OP
    PDF-1.4 %âãÏÓ 2 0 obj <>stream xœ+är á26S°00SIá2PÐ5´1ôÝ BÒ¸4Ü2‹ŠKüsSŠSŠS4C²€ê P”kø$V㙂GÒU×713CkW )(Ü endstream endobj 4 0 obj <>>>/MediaBox[0 0 595 842]>> endobj 1 0 obj <> endobj 3 0 obj <> endobj 5 0 obj <> endobj 6 0 obj <> endobj xref 0 7 0000000000 65535 f 0000000325 00000 n 0000000015 00000 n 0000000413 00000 n 0000000168 00000 n 0000000464 00000 n 0000000509 00000 n trailer <<01b2fa8b70ac262bfa939cc786f8770c>]/Root 5 0 R/Size 7/Info 6 0 R>> startxref 641 %%EOF
    plz help me out.

  • How to use java integrate with ondemand

    Hi All,
    As i'm new to integration, can anyone help me to use java integrate with ondemand that inserts some records in ondemand and deletes some records from ondemand in secheduled interval basis.?
    Thanks in advance..!
    regards
    sowm

    Greetings,
    hi forum...
    how to use Java WebStart with EJB ? examples ?Well, for starters these are complementing, not 'cooperating', technologies. I presume, since EJB's do not - directly, at least - communicate with a web browser, that you intend for "Java WebStart" to somehow invoke an EJB?? Java WebStart is a technology for running client-side (Java) applications from the web browser - perceptively, the application resides on the server, but technically it, like an applet, is downloaded to the client and run there. Unlike an applet, however, it is not constrained by "sandbox" restrictions and does not have to be re-downloaded each time it is invoked - though the process allows for automagically updating the client-side with new versions of the application. ;) So, with this in mind, to "use Java WebStart with EJB" means little more than deploying an EJB client application with Java WebStart as the distribution channel.
    thanks
    minduRegards,
    Tony "Vee Schade" Cook

  • How to catch java.io.FileNotFoundException when user enters a.jsp which is not a vali

    How to catch java.io.FileNotFoundException when a user enters a bogus jsp page. For example. I have a page called login.jsp. If a user enters log.jsp, the entire path is show and i get java.io.FileNotFoundException. This should not happen. This only happened since I upgraded to 9iAS. I tried send_error=true in zone.properties like i did when i was just using oracle http that came with database and it doesnt work. How are all you guys catching this?? I cant find any documentation. They say send_error=true will work, but IT DOESNT.
    Thanks for your time

    Hi Adam,
    I am also facing the same problem of the java.io.FIleNotFOundException in the browser display when i am giving a wrong file path in the Url. you have mentioned that you have solved it when you were using Orcale 8i Http Server, can you please guide me for that( as we are also using Oracle 8i) I checked with putting send_error=true in zone.properties file but that is not working. What exctly you have done to get rid of that error message. I am using Windows Nt platform.
    Thanks and Regards.
    Arnab

  • How to build JAVA script in CMD

    How to build JAVA script in CMD command prompt?
    I think it's build.all but it's not working plz help

    To build a Java class file (ie compile it) you need to call the Java compiler javac. There is software around to make this easier:
    - ANT a make like tool but with XML files usually called build.xml
    - Maven a more convention driven approach for much complexer systems
    - IDEs like JDeveloper, Netbeans, Eclipse, you name it.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to use java api for function activity in embed oracle workflow?

    because i can't install standalone oracle workflow successfully.
    pls tell me how to use java api for function activity in embed oracle workflow?
    are there some patch or pulg-in package?
    ths a lot...........

    The Java Function Activity Agent is not certified for Oracle Workflow embedded in Oracle Applications. Installing standalone workflow should be a lot easier than what you have found, although it looks like you did hit a Pentium 4 issue with the Oracle Universal Installer. I suggest you contact Oracle Support or Oracle Consulting for assistance.
    because i can't install standalone oracle workflow successfully.
    pls tell me how to use java api for function activity in embed oracle workflow?
    are there some patch or pulg-in package?
    ths a lot...........

Maybe you are looking for