Database trigger in java and design

Hi Experts,
I have develop a system which query table after every three second and get new records and do processing, i expect lot of people suggest to use database trigger option, but i have following constraint.
I am using Oracle 10g which is available on remote site and i have only access of 1521 port. This database is used by other departments also and we are give one user and i can only use JDBC for all my work.
Please suggest any good alternatives or i stick with database polling?
Regards,
imran

emmi@java wrote:
Hi malcolmmc,
Thanks for your reply but i have only 1521 port available and as i know JMS use different port for communications.If you talk to your systems people it may not be a restriction. Depends what you're allowed to put on the server. Typically the JMS client stuff on the database would connect to a central message broker, which might be at your end. The server may have wider access to ports on your machine than the other way arround.
>
Second if i have to do DB polling, is it good to run while loop with Thread.sleep?
Or java.util.Timer().
Do close your Statement objects while waiting though, don't tie up resources in the server.

Similar Messages

  • The Oracle Database Programming using Java and Web services book is out

    This book http://www.amazon.com/gp/product/1555583296 shows how to build pragmatic applications using the combination of PL/SQL, Java in the database, JDBC, SQLJ, JPublisher, and Web services. It is intented for database developers, DBA, data architects, Java developers and Web services assemblers.
    My blog http://db360.blogspot.com/ and the free/sample chapter http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf will give you a feel of the content.
    Enjoy, Kuassi

    Hi Kuassi,
    Thanks for letting us know that your book is available. I have been following one of your articles about "Virtualize Your Oracle Database with Web Services". More specifically "The Database as Web Services Consumer". I think that this is an area that has in the past been under estimated as to the potential benefits.
    I am currently trying to develop a solution that consumes several interfaces with a couple of them being published web services, so an ideal solution. I have then spent the last three weeks having to read up about the architecture of Java in the database, Jpublisher and make sense of how it all works together.
    I have got very close to getting one of the web services to work but failed due to using 10gR2 where all the java & libraries has moved to version 1.5. The solution is to load the jdk1.4.2 and configure jpublisher to use this. So far so good except this is not available on some platforms, Windows - 64 bit (not itanium).
    The configuration is proving very challenging but will hopefully reap rewards.
    (Thought I would give you some background to my experience).
    Anyway my question to you is having looked at Jdeveloper it appears to do almost anything except consume services into the database, also with Java now being at version 1.5 outside the database for 10gR2 and supporting 1.4 inside, do you see some alignment of these in future database releases?
    Finally off to buy your book now as no doubt there is a huge amount more to learn.
    Kind Regards
    David O'Donnell

  • Book: Oracle Database Programming using Java and Web services

    This book http://www.amazon.com/gp/product/1555583296 shows how to build pragmatic applications using the combination of PL/SQL, Java in the database, JDBC, SQLJ, JPublisher, and Web services. It is intented for database developers, DBA, data architects, Java developers and Web services assemblers.
    My blog http://db360.blogspot.com/ and the free/sample chapter http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf will give you a feel of the content.
    Enjoy, Kuassi

    Hi Kuassi,
    Thanks for letting us know that your book is available. I have been following one of your articles about "Virtualize Your Oracle Database with Web Services". More specifically "The Database as Web Services Consumer". I think that this is an area that has in the past been under estimated as to the potential benefits.
    I am currently trying to develop a solution that consumes several interfaces with a couple of them being published web services, so an ideal solution. I have then spent the last three weeks having to read up about the architecture of Java in the database, Jpublisher and make sense of how it all works together.
    I have got very close to getting one of the web services to work but failed due to using 10gR2 where all the java & libraries has moved to version 1.5. The solution is to load the jdk1.4.2 and configure jpublisher to use this. So far so good except this is not available on some platforms, Windows - 64 bit (not itanium).
    The configuration is proving very challenging but will hopefully reap rewards.
    (Thought I would give you some background to my experience).
    Anyway my question to you is having looked at Jdeveloper it appears to do almost anything except consume services into the database, also with Java now being at version 1.5 outside the database for 10gR2 and supporting 1.4 inside, do you see some alignment of these in future database releases?
    Finally off to buy your book now as no doubt there is a huge amount more to learn.
    Kind Regards
    David O'Donnell

  • Java and oracle in linux

    hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
    thnx in advance..

    884540 wrote:
    hello frnds...i have installed oracle 10g in ubuntu 11.04....now i want to make database connection between java and oracle...so how can i do it??i know the java code..but the main problem is database driver..how can i give the classpath for specific jdbc dirver...pls tell me the steps to set classpath for jdbc driver...
    thnx in advance..You can mention the classpath using the javac and java options:
    javac -cp .;<path> <ClassName>.java
    and
    java -cp .;<path> <ClassName>
    Or refer the below link to avoid mentioning classpath everytime you run/ compile the program
    http://www.linuxquestions.org/questions/linux-software-2/j2sdk-install-174483/#post898715

  • Java and xml option necessary?

    Hi,
    first when i build the repository database, i choose java and xml option, is this necessary or i waste my time.
    When i read Building a Help Desk Connector, i'm not sure, do i need the Diagnostic Pack.
    Best regards
    Thomas
    (Narri, Narro)

    This is the defacto site for xpath stuff for java
    http://xml.apache.org/xalan-j/

  • Report in PDF format and email it to some clients, using  Database Trigger

    Hi
    Is it possible to run a report in PDF format ad email it to some clients after a specific event through Database Trigger. For example whenever a client makes an entry into order entry table (through entry form), a trigger should execute on Orders table, this trigger should execute or generate a PDF formatted report and finally mail it to Sales team?
    I have
    ORAS 10g(10.1.2.0.2)
    utl_mail configured.

    In Reportsconfig.properties file the http port is 7778,
    now the output is like this...
    SQL> /
    * WELCOME TO EVENT-BASED-REPORTING API *
    * API-Version : 9i *
    * (C) Oracle Corporation, 2000 - 2002 *
    * Debugging turned ON **************************
    *** Length of Paramlist : 1
    OK : Parameter added : GATEWAY=http://myserver.com:7778/reports/rwservlet
    *** Length of Paramlist : 2
    OK : Parameter added : SERVER=rep_myserver_oracleas2
    *** Length of Paramlist : 3
    OK : Parameter added : REPORT=D:\Reports\emp.rdf
    *** Length of Paramlist : 4
    OK : Parameter added : USERID=abc/xyz@mydb
    *** Length of Paramlist : 5
    OK : Parameter added : DESTYPE=mail
    *** Length of Paramlist : 6
    OK : Parameter added : DESFORMAT=PDF
    *** Length of Paramlist : 7
    OK : Parameter added : [email protected]
    Starting run_report: building url
    *** Building URL (RUN_REPORT)
    OK : URL built :
    http://myserver.com:7778/reports/rwservlet?SERVER=rep_myserver_oracleas2&REPO
    RT=D%3A%CReports%5Cemp.rdf&USERID=abc%2Fxyz%40mydb&DESTYPE=mail&D
    ESFORMAT=PDF&DESNAME=khan.emran84%40gmail.com&statusformat=xml
    *** Submitting HTTP Request
    *** using URL
    :http://myserver.com:7778/reports/rwservlet?SERVER=rep_myserver_oracleas2&REP
    ORT=D%3A%5CReports%5Cemp.rdf&USERID=abc%2Fxyz%40mydb&DESTYPE=mail&
    DESFORMAT=PDF&DESNAME=khan.emran84%40gmail.com&statusformat=xml
    OK : Request submitted - Return stream : <?xml version = '1.0' encoding =
    'ISO-8859-1' standalone = 'yes'?>
    <serverQueues>
    <error code="50159"
    component="REP" message="Executed successfully but there were some errors when
    distribute the output"/>
    <
    OK : Request submitted - Length of stream : 229
    *** XML-Parsed - Following Structure discovered :
    *** Checking elements!
    serverQueues ()
    *** Checking attributes!
    error
    *** Checking attributes!
    __code = 50159
    __component = REP
    __message = Executed successfully but there were some errors when distribute the
    output
    *** Finished Parsing XML
    Getting value for element: job
    Getting value for element: error
    *** Requesting value for Attribute error.component [REP]
    Getting value for element: error
    *** Requesting value for Attribute error.code [50159]
    Getting value for element: error
    *** Requesting value for Attribute error.message [Executed successfully but    
    there were some errors when distribute the output]
    REP-50159:Executed successfully but there were some errors when distribute the
    output
    declare
    ERROR at line 1:
    ORA-20999:
    ORA-06512: at "NRSP.SRW", line 264
    ORA-06512: at "NRSP.SRW", line 799
    ORA-06512: at line 15

  • [Java and all else] How do you document DB design?

    Hello,
    Although most of the technical choices are explicit in SQL (UniqueKey & ForeignKey constraints, indexes,...), the semantics of the data columns and their constraints seem better served as plain human-readable comments ("ID column: identifies the plane copy; 6 figures are enough as we don't expect to sell more than 1 million planes in a foreseeable future...").
    In my current system, (EJB-based, but the DB schema is not created by the JPA-compliant ORM, but via SQL scripts), I see the following ways to write and maintain this documentation:
    - SQL comments in the schema creation and patch scripts
    - Javadoc comments in the Java source of the Entity classes.
    - UML notes in UML diagrams(1)
    - external "Architecture and design" document.
    All 4 of them are used, sometimes inconsistently, for various parts of the design choices; I mean, the docs do not contradict themselves (not yet, but it's a mere question of time), but some tables are commented in SQL scripts, others are in design docs, and the details for some columns are in entity javadocs. Although each developer may find it handier to "write" the doc via his preferred medium, it becomes increasingly difficult to "maintain" theoverall documentation.
    Our current situation is that most of the project team members are Java developers, so it would probably be better accepted and served if we standardized that we document DB tables and columns in Java source, but I am worried that:
    - someone else pouring over our DB (ex: DBA helping us to optimize things, or other team developping a data-mining tool to leverage the historical data in DB) may not be as comfortable with Java
    - this may not cover all design choices of the DB schema:
    - - - - first, although that is the case currently, in the future there might not be a 100% 1-1 mapping between e.g. each entity class and a DB table. Maybe some columns will not need to be mapped anymore,...
    - - - - second, I fear some DB constructs are not amenable to Java counterparts; no accurate idea there, I'm not an SQL nor JPA expert, but I presume Indexes, table partitioning, tablespaces, for example (yes, the DBMS is Oracle :o) are not taken into account in JPA mapping.
    And if we document those choices at the SQL level (my preferred idea so far), this will gradually make the javadocs in the entities obsolete, or removed altogether, and that will make future maintenance of the Java source risky.
    How do you document your DB design in general?
    Do you have specific advices for my case?
    Thanks in advance,
    J.
    (1) Just for the record, here are a few posts that refer to modelling the DB in UML:
    [A post on this forum highlighting that UML 1.4 standardizes a notation for RDB modelling|http://forums.sun.com/thread.jspa?messageID=1383724#1383724]
    [A DB modelling tutorial|http://www.tomjewett.com/dbdesign/dbdesign.php] (not sure whether it leverages the standard mentioned above :o)
    P.S.: "Java and all else" as in, damn, I'd love to use the familiar JDC forums and people to discuss not only Java-related issues, but also [all other things that surround Java|http://forums.sun.com/thread.jspa?threadID=5422264&tstart=0] (other technologies, processes, people) and enable to make workable systems out of Java code.

    jduprez wrote:
    Thank you again.
    A couple more questions:
    2. Table, and proc dictionary maintained as one or more text files. Those files and schema are all in source control.Do you mean, a proprietary text format (a la tabledesign.txt), or +.sql+ source files? Again, you seem to suggest the scehma info is present in two locations.I didn't say two locations unless you meant files. Then yes.Yes I meant two files. I trust the team to get the doc file lagging a few revisions behind the SQL file, and to correct that I would have to include one more step in the review process (e.g. "review CM actions to check that the doc file is updated consistently with the SQL source").
    The tool I wrote would throw errors if the comment file didn't match the schema. And if comments were not provided. That of course doesn't stop someone from documenting a table with "a table".
    You can of course keep the addtional info as special comments in the SQL, but when I did this, and even in retrospect, it seems better and perhaps easier to keep them seperate. I have done special comments in SQL before and it seems a bit of a kluge but you do have the single source. But in that case I was the only one maintaining it too.What do you mean by "special"?For code generation I have a schema file with the following (pseudo sql.)
        create mytable
           mytable_id int,
           column_foo varchar(10);
           column_fum varchar(20)
            -- Query: for_a_query (column_foo, column_fum)
        )The generator consumes the schema and generates the standard CRUD which would include a query based on the primary key.
    The above comment is used to provide an additional query where the proc is named 'for_a_query' (munged with table name) and takes two parameters (column_foo, column_fum) whose type/name matches those of the table.
    If we don't try to generate a browseable HTML out of the schema (although the idea is appealing, I don't have the resource to make such a tool), do you see anything kludgy in maintaining SQL comments interpersed within DDL code?
    Of course that is doable.

  • Programming the Oracle Database with Java and Web Services: sample chapter

    This will be the first book devoted to Java in the Oracle Database: read the sample chapter @ http://www.oracle.com/technology/books/pdfs/mensah_ch1.pdf
    This book also covers the latest Oracle JDBC, Oracle SQLJ, JPublisher and Database Web Services A brief description @
    http://www.elsevier.com/wps/find/bookdescription.cws_home/706089/description#description
    Thanks, Kuassi

    Hi Kuassi,
    Thanks for letting us know that your book is available. I have been following one of your articles about "Virtualize Your Oracle Database with Web Services". More specifically "The Database as Web Services Consumer". I think that this is an area that has in the past been under estimated as to the potential benefits.
    I am currently trying to develop a solution that consumes several interfaces with a couple of them being published web services, so an ideal solution. I have then spent the last three weeks having to read up about the architecture of Java in the database, Jpublisher and make sense of how it all works together.
    I have got very close to getting one of the web services to work but failed due to using 10gR2 where all the java & libraries has moved to version 1.5. The solution is to load the jdk1.4.2 and configure jpublisher to use this. So far so good except this is not available on some platforms, Windows - 64 bit (not itanium).
    The configuration is proving very challenging but will hopefully reap rewards.
    (Thought I would give you some background to my experience).
    Anyway my question to you is having looked at Jdeveloper it appears to do almost anything except consume services into the database, also with Java now being at version 1.5 outside the database for 10gR2 and supporting 1.4 inside, do you see some alignment of these in future database releases?
    Finally off to buy your book now as no doubt there is a huge amount more to learn.
    Kind Regards
    David O'Donnell

  • Can i add a servlet in oracle database for webservices without java and how?

    HI
    can i add a servlet in oracle database for webservices without java and how?
    Please help
    Thanks

    Dear Frank,
    I have done as follows
    created a form with a button, and in my button pressed event I wrote
    WEB.SHOW_DOCUMENT('javascript:openMyURL("http://192.168.1.34/HELP/ADMF0005.html");', '_Self');
    and in my formsweb.cfg I have the following
    HTMLbeforeForm=<script> function OpenMyURL(page){window.open(page,"myURL","width=700,width=400,top=0,left=0,toolbar=no,menubar=no"); } </script>
    When I click on the button it is coming with toolbar , etc as well as no page found is coming with the following in the address bar.
    javascript:openMyURL("http://192.168.1.34/HELP/ADMF0005.html");
    My html view source comes as below for the form
    <HEAD><TITLE>Oracle9iAS Forms Services</TITLE></HEAD>
    <BODY >
    <script> function OpenMyURL(page){window.open(page,"myURL","width=700,width=400,top=0,left=0,toolbar=no,menubar=no"); } </script>
    <!-- Forms applet definition (start) -->
    <OBJECT classid="clsid:CAFECAFE-0013-0001-0009-ABCDEFABCDEF"
    codebase="/forms90/jinitiator/jinit.exe#Version=1,3,1,9"
    WIDTH="1000"
    HEIGHT="660"
    HSPACE="0"
    VSPACE="0">
    <PARAM NAME="TYPE" VALUE="application/x-jinit-applet;version=1.3.1.9">
    <PARAM NAME="CODEBASE" VALUE="/forms90/java">
    <PARAM NAME="CODE" VALUE="oracle.forms.engine.Main" >
    I am using Forms [32 Bit] Version 9.0.2.7.0

  • How to get SSO logged user information in a database trigger

    my database is 9i
    my application server is 9i too
    I need to track which SSO user is inserting data into a table , so how can i get the information of that user in a database trigger on that table
    thanks

    Hi,
    The only way I could figure out how to get it was to import the com.sap.security.api.
    1. From Window>Preferences>Java-->Classpath Variables, set up a variable called WEBAS_HOME pointing to:
    <drive>/usr/sap/<SID>/jc00/j2ee/cluster/server0/
    2. Right click on properties of your Dynpro Project->Properties->Java Build Path->Libraries and click "Add Variable." 
    3. Select WEBAS_HOME and click "Extend"
    4. Select /bin/ext/com.sap.api.sda/com.sap.security.api.jar and click OK.
    If you don't have access to a portal directory, you will have to get this jar file and copy it to your workspace to add to your build path instead of the above steps.
    Then in your code:
    import com.sap.security.api.IUser;
    import com.sap.security.api.IUserAccount;
      public void GetLogonID( )
         String LogonID;
         try {
              /*     create an user object from the current user */
              IWDClientUser wdUser = WDClientUser.getCurrentUser();
              IUser user = wdUser.getSAPUser();
              if (user != null) {
                   IUserAccount acct = user.getUserAccounts()[0];
                   if (acct != null) {
                        LogonID = acct.getLogonUid();
                   } else
                        LogonID = "acct null";
              } else {
                   LogonID = "user null";
              wdContext.currentContextElement().setDisplayName(user.getFirstName() + " " + user.getLastName());
              wdContext.currentContextElement().setLogonID(LogonID.toUpperCase());
         } catch (Exception e) {
              e.printStackTrace();
    Hope this helps...  I had to search several places before I found all the necessary stuff.  Maybe I can get my first points!
    Thanks,
    Andrew

  • Error while starting OIM admin and design console

    Hi all,
    I have OIM 9.10.2 deployed on Jboss 4.2.3GA with oracle 10g as database.Installation was successfull and after that we tried some simple use cases on that.
    This time after starting Jboss it gave an error "Network Adapter cannot be connected".
    It came because RMI port was in use and because of the change in IP Address,we changed both of them.
    changed RMI port in jboss-service.xml
    changed IP address to Host name in xlconfig.xml,jboss.profile.xml and xell-ds.xml files
    But now when we run server and try to access the consoles we get the following errors -
    Admin console error - OIM admin page opens stating the error "System error was encountered"
    Design console error - Oracle Identity Manager Design console could not allow you log in
    Diagnostic dashboard error - Invalid username or password ( i m sure of the id and pwd )
    Jboss logs -
    2010-10-22 16:30:10,986 WARN [XELLERATE.DATABASE] Trying to get the connection count : 3
    2010-10-22 16:30:10,986 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
    org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLRecoverableException: Io exception: The Network Adapter could not establish the connection)
    2010-10-22 16:30:10,986 WARN [XELLERATE.DATABASE] Trying to get the connection count : 4
    2010-10-22 16:30:10,986 ERROR [XELLERATE.DATABASE] Class/Method: DirectDB/getConnection encounter some problems: Error while retrieving database connection.Please check for the follwoing
    Database srever is running.
    Datasource configuration settings are correct.
    2010-10-22 16:30:10,986 ERROR [XELLERATE.DATABASE] Class/Method: tcServerProperties/initServerProperties encounter some problems: {1}
    java.lang.NullPointerException
         at com.thortech.xl.dataaccess.util.tcServerProperties.<init>(Unknown Source)
    16:30:10,986 ERROR [XIMDD] Class/Method: UserVerificationServlet/loginUser encounter some problems: RuntimeException; nested exception is:
    java.lang.NullPointerException
    Thor.API.Exceptions.tcAPIException: RuntimeException; nested exception is:
    java.lang.NullPointerException
    at Thor.API.tcUtilityFactory.getPropertyValue(Unknown Source)
    at Thor.API.tcUtilityFactory.<init>(Unknown Source)
    at com.thortech.xl.systemverification.webapp.UserVerificationServlet.log
    inUser(Unknown Source)
    Please suggest what might be the change that affected our OIM instance and how can we solve this problem.
    Thanks,
    Deepika

    Hi Sunny,
    I checked both the files you mentioned both of them are correct.Changed the RMI port in jboss-service.xml to its original value.Still I am facing the same error :(
    2010-10-27 10:40:56,821 WARN [XELLERATE.DATABASE] Trying to get the connection count : 1
    2010-10-27 10:40:56,837 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
    org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLRecoverableException: Io exception: The Network Adapter could not establish the connection)
         at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:155)
         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:619)
         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:264)
         at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:613)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347)
         at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
    2010-10-27 10:40:56,837 ERROR [XELLERATE.DATABASE] Class/Method: DirectDB/getConnection encounter some problems: Error while retrieving database connection.Please check for the follwoing
    Database srever is running.
    Datasource configuration settings are correct.
    2010-10-27 10:40:56,852 ERROR [XELLERATE.WEBAPP] Class/Method: tcWebAppSettingsAction/execute encounter some problems: RuntimeException; nested exception is:
         java.lang.NullPointerException
    Thor.API.Exceptions.tcAPIException: RuntimeException; nested exception is:
         java.lang.NullPointerException
         at Thor.API.tcUtilityFactory.getPropertyValue(Unknown Source)
    -Deepika

  • Primary Key - Generated by database TRIGGER

    Hi,
    I have a form with a block that is attached to a table. So far, nothing fancy :-)
    The Primary is generated with an ORACLE SEQUENCE. That is done at the TABLE level with a DATABASE trigger.
    So in the form, the primary field is not populated.
    Works fine. But if the user wants to UPDATE the forms content, right after they did an INITIAL commit, THEY CAN'T !!!!!!!!!!!
    How can I code this in the form?
    Is there a way to syncronize (populate) the primary key in the form with it's table content?
    If so, how do I query the table if I don't have the primary key value ?
    Thanks for ANY advise,
    Marc.

    Another solution is to use both a database trigger and a PRE-INSERT trigger in Forms.
    The database trigger should be something like
    CREATE TRIGGER INS_TABLENAME BEFORE INSERT ON TABLENAME
    FOR EACH ROW WHEN (new.ID IS NULL)
    BEGIN
    SELECT TABLENAME_SEQ.nextval INTO :new.ID FROM DUAL;
    END;
    and the PRE-INSERT trigger should be something like:
    SELECT TABLENAME_SEQ.nextval INTO :blockname.ID FROM DUAL;
    This way one solves the problem of DML RETURNING VALUE not working in Forms with Oracle version > 8 (does it work on version 8 as it is said to be? - i have not tested it anyway) and the use of other applications (SQL*Plus, JAVA, etc) without writing any code.

  • PROBLEM WITH A DATABASE TRIGGER

    WHEN A USER ENTERS A STATUS CODE BETWEEN 70 AND 86 ON THE PAB_SUSP TABLE, THE COMPLETION DATE FIELD ON THE PAB_SUSP TABLE GETS UPDATED WITH THE SYSTEM DATE WHICH IS FINE. THE
    COMPLETION DATE FIELD ON THE EREC_SUSP TABLE FOR THE SAME CORRESPONDING RECORD SHOULD ALSO GET UPDATED WITH THE SAME SYSTEM DATE. SOMETIMES THE COMPLETION DATE FIELD ON THE EREC_SUSP TABLE GETS UPDATED CORRECTLY WITH THE SAME SYSTEM DATE. OTHER TIMES IT DOES NOT. WHAT IS THE PROBLEM?
    I AM ENCLOSING THE CODE IN THE DATABASE TRIGGER. NOTE ALSO THAT THE SUSP_DT FIELD ALSO GETS UPDATED.
    DECLARE
    cursor get_user is SELECT user_id, FROM oracle_user
    WHERE username = USER;
    user_number NUMBER(10,0);
    num_recs NUMBER(10,0);
    num_rec_recs2 NUMBER(10,0);
    seq number(10,0);
    ssn VARCHAR2(9);
    nm VARCHAR2(27);
    dob DATE;
    pg VARCHAR2(2);
    rank VARCHAR2(2);
    act_cd VARCHAR2(3);
    clk NUMBER(10,0);
    recv_dt DATE;
    susp_dt DATE;
    cmpl_dt DATE;
    ocll VARCHAR2(7);
    tagd VARCHAR2(7);
    chg_ind VARCHAR@(1);
    BEGIN
    open get_user;
    fetch get_user into user_number;
    close get_user;
    IF (:new.lcl_pab_susp_stat_cd <> :old.lcl_pab_susp_stat_cd AND
    :new.lcl_pab_susp_stat_cd >= '70' AND
    :new.lcl_pab_susp_stat_cd <= '86') THEN
    cmpl_dt := sysdate;
    END IF;
    IF :new.lcl_susp_dt <> :old.lcl_susp_dt THEN
    chg_ind := 'Y';
    susp_dt := :new.lcl_susp_dt;
    else
    susp_dt := :old.lcl_susp_dt;
    END IF;
    seq := :new.pab_susp_seq;
    ssn := :new.ind_ssn;
    nm := :new.ind_nm;
    dob := :new.ind_dob;
    pg := :new.ind_pg_cd;
    rank := :new.mil_rank_cd;
    act_cd := :new.lcl_act_cd;
    clk := :new.lcl_act_clk_no;
    recv_dt := :new.lcl_recv_dt;
    ocll := :new.ocll_id;
    tagd := :new.tagd_id;
    SELECT COUNT(*) INTO num_recs2
    FROM EREC_SUSP
    WHERE SUSP_SEQ = :old.susp_seq;
    IF num_recs2 > 0 THEN
    UPDATE erec_susp
    SET pab_susp_seq = seq,
    ind_ssn = ssn,
    ind_nm = nm,
    ind_dob = dob,
    ind_pg_cd = pg,
    mil_rank_cd = rank,
    erec_ofc_act_cd = act_cd,
    erec_of_clk_no = clk,
    lcl_cmpl_dt = cmpl_dt,
    lcl_recv_dt = recv_dt,
    lcl_susp_dt = susp_dt,
    ocll_id = ocll,
    tagd_id = tagd,
    lcl_chg_ind = chg_ind,
    rec_tx_dt = SYSDATE,
    rec_tx_user_no = user_number
    where susp_seq = new.susp_seq;
    END IF;
    END;

    S. Wolicki, Oracle wrote:
    No, you cannot!!! NLS_CHARACTERSET is not a session parameter in Oracle.
    Assuming IBM MessageBroker connects through OCI, setting the NLS_LANG variable in its environment to .EE8ISO8859P2 could help. You should also review MessageBroker's documentation, especially any configuration parameters for Oracle, to see if the character set is not configurable there. There is nothing to be done on the Oracle side.
    By the way, can you name any particular characters that do not show up correctly and tell me what you see in place of them?
    -- SergiuszHi Sergiusz,
    I replace back and forth the accented characters, but for large queries, it takes a very long time:
    REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
    REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(c,'ő','&#x0151'),
    'Ő','&#x0150'),'ű','&#x0171'),'Ű','&#x0170'),'é','&#x00E9'),'É','&#x00C9'),'á','&#x00E1;'),'Á','&#x00C1'),
    'ú','&#x00FA'),'Ú','&#x00DA'),'ö','&#x00F6'),'Ö','&#x00D6'),'ü','&#x00FC'),
    'Ü','&#x00DC'),'ó','&#x00F3'),'Ó','&#x00C3'),'í','&#x00ED'),'Í','&#x00CD');
    (The semicolons let down for display.)I thought that I would change the nls_lang on the client side in a Java node but it is not sure that will work.
    Thank you for your answer.
    Sada
    Edited by: 1002028 on 2013.04.24. 13:48
    Edited by: 1002028 on 2013.04.24. 13:49

  • The performance of management system with Java and MySQL

    Hi all,
    I want to develop one management application with Java and MySQL. However I am not sure which is a good way to design the system. The system has to deal with customers' data in the database.
    Should I create objects for every customers when application starts so that I do not need to access to the database often? Or
    Should I access to the database everytime the user want to deal with customer's data?
    Welcome for any suggestion.
    Thank you
    Pat

    Hi
    i i think u should go through MVC model or use connection pooling

  • Configuring OIM Server and Design Console

    Hi Guys,
    I trying to configuring OIM Server and Design Console via the OUI Configuration Wizard am getting the following error being reported. Can anyone advise.
    Oracle [ID 1234357.1]
    Unable to contact MBeanServer for oracle.as.soainfra.config:
    Location=soa_server1,WorkflowIdentityConfig.ConfigurationType=jazn.com,WorkflowIdentityConfig=human-workflow,type=WorkflowIdentityConfig.ConfigurationType.ProviderType.PropertyType,Application=soa-infra,name=jpsContextName,WorkflowIdentityConfig.ConfigurationType.ProviderType=JpsProvider
    Step Configure OIM Server failed
    The steps taken are as followed:
    a. Install Database -- Completed
    b. Run RCU and create Schema for PS1 - Completed no reported error's
    c. Install Weblogic Server 10.3.6 - Completed
    d. Install SOA Server 11.1.1.7.0 and Install SOA patches:
        p16471502_111170_Generic_1of2.zip
        p16471502_111170_Generic_2of2.zip
    e. Install IDM Server 11.1.1.7.0 - Completed
    f. Create Domains - Completed
    g. Configure Security Store Python Script _ unable to run as does not exist.
    h. Start both Admin server and SOA server - Started ok no reported errors.
    Any help would be of help.
    Regards,
    K

    Hi Kevin,
    Thanks for getting back to me please see status from opatch.
    Output from opatch (IDM):
    C:\Windows\system32>set PATH=c:\Java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0\bin;%PATH%
    C:\Windows\system32>set ORACLE_HOME=c:\app\oracle\Middleware\product\fmw\Oracle_IDM1
    C:\Windows\system32>set PATH=c:\app\oracle\Middleware\product\fmw\Oracle_IDM1\OPatch
    C:\Windows\system32>opatch lsinventory
    Oracle Interim Patch Installer version 11.1.0.9.9
    Copyright (c) 2012, Oracle Corporation.  All rights reserved.
    Oracle Home       : c:\app\oracle\Middleware\product\fmw\Oracle_IDM1
    Central Inventory : C:\Program Files\Oracle\Inventory
       from           : n/a
    OPatch version    : 11.1.0.9.9
    OUI version       : 11.1.0.9.0
    Log file location : c:\app\oracle\Middleware\product\fmw\Oracle_IDM1\cfgtoollogs\opatch\opatch2013-07-18_14-29-36PM_1.log
    OPatch detects the Middleware Home as "C:\app\oracle\Middleware\product\fmw"
    Lsinventory Output file location : c:\app\oracle\Middleware\product\fmw\Oracle_IDM1\cfgtoollogs\opatch\lsinv\lsinventory2013-07-18
    _14-29-36PM.txt
    Installed Top-level Products (1):
    Oracle IDM Suite                                                     11.1.1.7.0
    There are 1 products installed in this Oracle Home.
    There are no Interim patches installed in this Oracle Home.
    OPatch succeeded.
    C:\Windows\system32>
    Output from opatch (SOA):
    C:\Windows\system32>set PATH=c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\OPatch
    C:\Windows\system32>set ORACLE_HOME=c:\app\oracle\Middleware\product\fmw\Oracle_SOA1
    C:\Windows\system32>opatch lsinventory
    CLASSPATH=;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\app\oracle\MIDDLE~
    1\product\fmw\ORACLE~1\soa\modules\commons-cli-1.1.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\oracle.soa.fab
    ric_11.1.1\fabric-runtime.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\soa-infra-tool
    s.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\oracle.soa.workflow_11.1.1\bpm-services.jar;c:\app\oracle\Middl
    eware\product\fmw\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\testfwk-xbeans.jar;c:\app\oracle\Middleware\product\fmw\Oracle_
    SOA1\soa\modules\oracle.soa.fabric_11.1.1\oracle-soa-client-api.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\o
    racle.bpm.admin.lifecycle.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\oracle.classloader_11.1.1.jar;C:\app\oracle\MIDD
    LE~1\product\fmw\ORACLE~1\modules\org.apache.commons.logging_1.0.4.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\org.apa
    che.commons.beanutils_1.6.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\oracle.ucp_11.1.0.jar;c:\app\oracle\Middleware\p
    roduct\fmw\Oracle_SOA1\soa\modules\oracle.rules_11.1.1\rulesdk2.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\o
    racle.rules_11.1.1\rl.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\oracle.adf.model_11.1.1\adfm.jar;C:\app\oracle\MIDDL
    E~1\product\fmw\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\oracle.xdk_1
    1.1.0\xmlparserv2.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\communications\modules\usermessaging-command_11.1.1.jar
    CLASSPATH=;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\app\oracle\MIDDLE~
    1\product\fmw\ORACLE~1\soa\modules\commons-cli-1.1.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\oracle.soa.fab
    ric_11.1.1\fabric-runtime.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\soa-infra-tool
    s.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\oracle.soa.workflow_11.1.1\bpm-services.jar;c:\app\oracle\Middl
    eware\product\fmw\Oracle_SOA1\soa\modules\oracle.soa.fabric_11.1.1\testfwk-xbeans.jar;c:\app\oracle\Middleware\product\fmw\Oracle_
    SOA1\soa\modules\oracle.soa.fabric_11.1.1\oracle-soa-client-api.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\o
    racle.bpm.admin.lifecycle.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\oracle.classloader_11.1.1.jar;C:\app\oracle\MIDD
    LE~1\product\fmw\ORACLE~1\modules\org.apache.commons.logging_1.0.4.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\org.apa
    che.commons.beanutils_1.6.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\oracle.ucp_11.1.0.jar;c:\app\oracle\Middleware\p
    roduct\fmw\Oracle_SOA1\soa\modules\oracle.rules_11.1.1\rulesdk2.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\soa\modules\o
    racle.rules_11.1.1\rl.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\oracle.adf.model_11.1.1\adfm.jar;C:\app\oracle\MIDDL
    E~1\product\fmw\ORACLE~1\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\app\oracle\MIDDLE~1\product\fmw\ORACLE~1\modules\oracle.xdk_1
    1.1.0\xmlparserv2.jar;c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\communications\modules\usermessaging-command_11.1.1.jar
    Oracle Interim Patch Installer version 11.1.0.9.9
    Copyright (c) 2012, Oracle Corporation.  All rights reserved.
    Oracle Home       : c:\app\oracle\Middleware\product\fmw\Oracle_SOA1
    Central Inventory : C:\Program Files\Oracle\Inventory
       from           : n/a
    OPatch version    : 11.1.0.9.9
    OUI version       : 11.1.0.9.0
    Log file location : c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\cfgtoollogs\opatch\opatch2013-07-18_14-33-45PM_1.log
    OPatch detects the Middleware Home as "C:\app\oracle\Middleware\product\fmw"
    Lsinventory Output file location : c:\app\oracle\Middleware\product\fmw\Oracle_SOA1\cfgtoollogs\opatch\lsinv\lsinventory2013-07-18
    _14-33-45PM.txt
    Installed Top-level Products (1):
    Oracle SOA Suite 11g                                                 11.1.1.7.0
    There are 1 products installed in this Oracle Home.
    There are no Interim patches installed in this Oracle Home.
    OPatch succeeded.
    C:\Windows\system32>
    Regards,
    K

Maybe you are looking for