Update a Column during Insert
A row is being inerted by GUI with a column as NULL. DB need to update this column.
Trigger will create a mutating Error.
Can you please help me how to update the column.
(Using Oracle 10g)
>
UPDATE test
SET column6 = '100'
WHERE column1 = :new.column1;
END trig_test;
As updating the same table, getting Mutating Error.
>
Yes - you can't update the same table and you don't want to use the AFTER trigger.
Jeneesh's uses a BEFORE INSERT .. FOR EACH ROW trigger and sets the new value. So use his code to
create or replace trigger test_trig before insert
on test for each row
begin
if :new.column6 is null then
:new.column6 := '100';
end if;
end;And why are you storing what appears to be a number in a VARCHAR2 datatype? Store numbers in numeric columns.
Similar Messages
-
ME11 update error : Error during insert EINE with key
HI All,
I am facing the below problem..For one particular user update request is failing in ME11 transaction.Error was found in function module name ME_UPDATE_INFORECORD.I also check if it is number range problem but it is not the case..
Please help me out..
Thanks in advacne.Hi,
The problem is that only one user is getting sporadic failed update messages (since last 3-4 days) when using transaction ME11. The error as recorded in SM13 is "Error during insert EINE with key <Inforecord #> <Pur Org>".
I checked the table EINE for the key mentioned in the above message and found that there is a 2 years old record with the same key. Now, what I do not understand is that while creating a new Inforecord, why does SAP comes up with an old number instead of generating a new one from the number range object. I tried to search on SDN as well as OSS Notes, but could not find any mention to this problem.
And yes, it is an abend message with no short dump...
Thanks,
Gaurav
Edited by: Gaurav Malhotra on Feb 24, 2012 3:08 PM -
Cloning the GeneratedValue for another column during insert
I have an entity for a MSSQL table with IDENTITY auto-generated primary key column. I want another column (int as well) to have the same value set during an insert.
How can I do this using JPA? It's my understanding that the @Id and @GeneratedValue(strategy=GenerationType.IDENTITY) annotations can only be assigned to a single getter method.
I tried using entityManager.createNativeQuery("SELECT IDENT_CURRENT('fooTable')").getResultList();but that doesn't return a resultset. Same problem if I use JDBC.This a Seam app and I'm using Hibernate manual flush. So alternatively I could do an insert using persist() then flush() then update using merge() then flush() all in one method (one transaction using CMT).
-
Update xml column by inserting any missing child nodes from a M_V
Hello all,
I am trying to update a xml column(col1) of a table (abc) by looping through, by selecting from a materialized view and find any missing (child) nodes in the existing table (abc) of a xml column (col1) on each rows, and then do update the xml column (col1) of table (abc). How to do this in Oracle pl/sql?.
Thanks & Regards,
JoshYou do not need stored procedure for that. Use something like APPENDCHILDXML, INSERTCHILDXML or INSERTXMLBEFORE. For example, to insert a node into XML document:
SELECT APPENDCHILDXML(
XMLTYPE(
CURSOR(
SELECT ENAME,
SAL
FROM EMP
WHERE DEPTNO = 10
'//ROW',
XMLTYPE('<ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW>')
) EMP_XML
FROM DUAL
EMP_XML
<?xml version="1.0"?><ROWSET><ROW><ENAME>CLARK</ENAME><SAL>2450</SAL><ROW><ENAME
user631757</ENAME><SAL>10000</SAL></ROW></ROW><ROW><ENAME>KING</ENAME><SAL>5000</SAL><ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW></ROW><ROW><ENAME>MILL
ER</ENAME><SAL>1300</SAL><ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW></R
OW></ROWSET>
SELECT INSERTXMLBEFORE(
XMLTYPE(
CURSOR(
SELECT ENAME,
SAL
FROM EMP
WHERE DEPTNO = 10
'//ROW[ENAME="KING"]',
XMLTYPE('<ROW><ENAME>user631757</ENAME><SAL>10000</SAL></ROW>')
) EMP_XML
FROM DUAL
EMP_XML
<?xml version="1.0"?><ROWSET><ROW><ENAME>CLARK</ENAME><SAL>2450</SAL></ROW><ROW>
<ENAME>user631757</ENAME><SAL>10000</SAL></ROW><ROW><ENAME>KING</ENAME><SAL>5000
</SAL></ROW><ROW><ENAME>MILLER</ENAME><SAL>1300</SAL></ROW></ROWSET>
SQL> SY. -
How to auto update date column without using trigger
Hi,
How to write below MYSQL query in Oracle 10g :
CREATE TABLE example_timestamp (
Id number(10) NOT NULL PRIMARY KEY,
Data VARCHAR(100),
Date_time TIMESTAMP DEFAULT current_timestamp on update current_timestamp
I need to auto update the Date_Time column without using trigger when ever i update a record.
Example shown below is from MYSQL. I want to perform the below steps in ORACLE to auto update Date_Time column.
mysql> INSERT INTO example_timestamp (data)
VALUES ('The time of creation is:');
mysql> SELECT * FROM example_timestamp;
| id | data | Date_Time |
| 1 | The time of creation is: | 2012-06-28 12:37:22 |
mysql> UPDATE example_timestamp
SET data='The current timestamp is: '
WHERE id=1;
mysql> SELECT * FROM example_timestamp;
| id | data | Date_Time |
| 1 | The current timestamp is: | 2012-06-28 12:38:55 |
Regards,
Yogesh.Is there no functionality in oracle to auto update date column without using trigger??
I dont want to update the date column in UPDATE statement.
The date column should automatically get updated when ever i execute an Update statement. -
How to update based on condition during insert on child table
hi all,
i have three tables, first table enquiry(enqid, item, type) where all enquiries are entered. after that table bom (bomid, item, enqid, rawmatl) and route (bomid, routeid,routename). in this bom & route are Master Detail table, where entries are made on a later period. the requirement is to update 'type' in enquiry table during insert on Route table.
for 1 row in bom table there will be more than 5 rows in route table. the condition to update type field in enquiry is, scan the first 5 rows of route table during insert and if routename field contains 'JG' the update type with 'J'. if 'JG' is not there scan the same 5 rows for 'ED' and update type with 'E'. if 'ED' is not there scan for 'CN' and update type with 'C' like this 3 more to test and update.
thanks in adv. am on 8i
Krisyes, trigger or proc. or package
any idea how to do this...? -
Not able to update history columns in Jdeveloper11.1.1.3.0
Hi ,
We have one ADF application that is migrated from 10g to 11g.And our application is deployed on the weblogic server.
We are Using JDeveloper 11.1.1.3.
we are facing some session time out issues in the application which is intermitent and whenever we leave the web page for some times, the session get timed out and page gets errored out.
We have checked the error trace and seems after comming back to the page say around 20-25 mins and tried to update any record in the table it throws the error.
Jan 4, 2012 4:24:36 AM com.sun.faces.application.ActionListenerImpl processAction
SEVERE: java.lang.RuntimeException: oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "BEGIN INSERT INTO PGM_USR_PERMISSIONS(PGM_USR_PERMISSION_ID,PROGRAM_ID,LST_UPD_TSTMP,LST_UPD_USR,USER_ID,PERMISSION_ID) VALUES (:1,:2,:3,:4,:5,:6) RETURNING PGM_USR_PERMISSION_ID INTO :7; END;".
javax.faces.el.EvaluationException: java.lang.RuntimeException: oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "BEGIN INSERT INTO PGM_USR_PERMISSIONS(PGM_USR_PERMISSION_ID,PROGRAM_ID,LST_UPD_TSTMP,LST_UPD_USR,USER_ID,PERMISSION_ID) VALUES (:1,:2,:3,:4,:5,:6) RETURNING PGM_USR_PERMISSION_ID INTO :7; END;".
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at com.oracle.stbpo.filter.SecurityFilter.doFilter(SecurityFilter.java:88)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.RuntimeException: oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "BEGIN INSERT INTO PGM_USR_PERMISSIONS(PGM_USR_PERMISSION_ID,PROGRAM_ID,LST_UPD_TSTMP,LST_UPD_USR,USER_ID,PERMISSION_ID) VALUES (:1,:2,:3,:4,:5,:6) RETURNING PGM_USR_PERMISSION_ID INTO :7; END;".
at com.oracle.stbpo.datamodel.appmodule.SecurityAMImpl.saveProgramUsrPermissions(SecurityAMImpl.java:1187)
at com.oracle.stbpo.view.backing.security.PermissionListBackingBean.saveProgramPermissions(PermissionListBackingBean.java:182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
... 38 more
Caused by: oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "BEGIN INSERT INTO PGM_USR_PERMISSIONS(PGM_USR_PERMISSION_ID,PROGRAM_ID,LST_UPD_TSTMP,LST_UPD_USR,USER_ID,PERMISSION_ID) VALUES (:1,:2,:3,:4,:5,:6) RETURNING PGM_USR_PERMISSION_ID INTO :7; END;".
at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:582)
at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:7990)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6319)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3168)
at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2976)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2014)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2273)
at com.oracle.stbpo.datamodel.appmodule.SecurityAMImpl.saveProgramUsrPermissions(SecurityAMImpl.java:1180)
at com.oracle.stbpo.view.backing.security.PermissionListBackingBean.saveProgramPermissions(PermissionListBackingBean.java:182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at com.oracle.stbpo.filter.SecurityFilter.doFilter(SecurityFilter.java:88)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
... 9 more
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("STBPO"."PGM_USR_PERMISSIONS"."LST_UPD_USR")
ORA-06512: at line 1
Some how LST_UPD_USR is comming as null.
We are Using JDeveloper 11.1.1.3.
We have set the session time out parameter in web.xml as well as for AM.
Attached is the problem statement doc.
Also the behaviour is only on the weblogic server and we don't face any issues in the local set up.
Kindly help us in solving this problem. Also let me know if any further details is required.
Thanks
Namit KakkarThanks John
My Web logic server version is WebLogic Server 10.3.3.0..
Java Version:
1.6.0_20
OS Name:
Linux
OS Version:
2.6.18-164.0.0.0.1.el5
JACC Enabled:
false
Also I have find some where that there is some issues with the Jdev11.1.1.3.0 updating the history columns.
Further, We have migrated the application from ADF10g to 11g (11.1.1.3.0)
and we are using trinidad tags .
Do we have any issues with the Trinidad libraries?
Please help me in fixing this issue.
Thanks
Namit.
Edited by: 899138 on Jan 5, 2012 1:54 AM -
All, I'm trying fix an issue with transactional replication where replication monitor is showing the push to the subscriber is failing because of the error, "Cannot update identity column." I've tried to use sp_browsereplcmds to pull up the
command that's failing based on the xact_seqno but when I try that I get the error:
Number: 102, State: 1, Procedure: , LineNumber: 0, Server: , Source: .Net SqlClient Data Provider
Message: Incorrect syntax near '┻'.
I'd like to fix the issue without having to rebuild replication during a maintenance window. I know you cannot publish tables with primary keys, but I'm wondering if dropping the identity column on this table might fix the issue. I'm considering
that but I would prefer to be able to pull the command that's trying to update the identity column, throw in SET IDENTITY_INSERT ON and remove the commands from the distribution database, but if that doesn't work I'm open to ideas of just dropping the primary
key on the replicated table. I think that should be fine.
Does anyone have any recommendations on how to view the command that's failing?
Or if dropping the primary key on the subscriber table would create issues with the publisher (since it is also the primary key)?
Or, know of any other ways in which to address this issue? Thanks.Unfortunately, no. The error was a bit of a red herring. In the end the subscriber was missing all of the stored procedures needed to update data in the published tables (i.e., the procedures for performing inserts/updates/deletes were missing
for every table in the subscriber database). Additionally, I could not recreate these stored procedures using sp_scriptpublicationcustomprocs
because another procedure which was required for that proc to work was also missing. In short, there were hundreds of missing stored procedures in the subscriber database on which transactional replication is dependent in order to replicate DML changes and
function normally and this includes system sprocs which would've been used to recreate the missing DML procs. In short, the subscriber was badly damaged and deemed to be unrecoverable within a reasonable time frame.
The solution was to tear down and start over, which we did successfully later in the evening. -
JBO-26041: Failed to post data to database during "Insert": SQL Statement "
Dear All,
I am trying to insert the data into custom table,getting the following error. Please help me to resolve the issues.
I have created one custom table in APPS schema having the primary key and History Columns.
Created the EO based on the custom table and generate the create method.
Created the VO based on the EO and generated the VOImpl, RowImpl Java Files.
I am using the PER_PEOPLE_S sequence to populate the value into Primary key column.
Calling the below code into create method of EO object to populate the value into Primarykey column.
setPersPersonid(getOADBTransaction().getSequenceValue("PER_PEOPLE_S"));
oracle.apps.fnd.framework.OAException: oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "INSERT INTO XXUTS_PERSON_T(PERS_PERSONID,PERS_FIRSTNAME,PERS_LASTNAME,CREATION_DATE,CREATED_BY,LAST_UPDATED_BY,LAST_UPDATE_DATE,LAST_UPDATE_LOGIN) VALUES (?,?,?,?,?,?,?,?)".
at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(Unknown Source)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
at xxuts.oracle.apps.csc.person.webui.XXCreatePersonCO.processFormRequest(XXCreatePersonCO.java:67)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:72)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
## Detail 0 ##
java.sql.SQLException: ORA-00911: invalid character
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3074)
at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:427)
at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5740)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4539)
at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(Unknown Source)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2996)
at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2807)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1971)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2173)
at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(Unknown Source)
at xxuts.oracle.apps.csc.person.server.XXPersonMainAMImpl.savePersonToDatabase(XXPersonMainAMImpl.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
at xxuts.oracle.apps.csc.person.webui.XXCreatePersonCO.processFormRequest(XXCreatePersonCO.java:67)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:72)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
java.sql.SQLException: ORA-00911: invalid character
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3001)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3074)
at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:427)
at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5740)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4539)
at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(Unknown Source)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2996)
at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2807)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1971)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2173)
at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(Unknown Source)
at xxuts.oracle.apps.csc.person.server.XXPersonMainAMImpl.savePersonToDatabase(XXPersonMainAMImpl.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(Unknown Source)
at xxuts.oracle.apps.csc.person.webui.XXCreatePersonCO.processFormRequest(XXCreatePersonCO.java:67)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:72)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:597)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:521)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
Thanksm
Sai SankilisettyDear Kumar,
I have checked the datatypes of the table and datatypes of the Pageitems, both the datatypes are same.
I have created the region using the wizard based on the VO.
My custom table having only 3 columns and History Columns.Out of 3 columns PersPersonid is Primary key column and I am assigning the sequence value to the column in create method of EO as below
public void create(AttributeList attributeList) {
super.create(attributeList);
setPersPersonid(getOADBTransaction().getSequenceValue("PER_PEOPLE_S"));
//Here PER_PEOPLE_S is the Sequence
Thanks,
Sai -
Update A Column In A Database Table.
I am unable to update a column in a database table.
For example; I have ten records in an EMP table without having any EMPNO. I want to UPDATE (insert) 10 different EMPNO in a table. How can I do it? All I know is that there are ten records in the table; this means that I cannot use a WHERE clause with different criteria for each row.
Thanks.Try something like this
SQL> select * from emp_1
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
SQL> insert into emp_1(empno, ename, job, mgr, hiredate, sal, comm, deptno)
2 select null, ename, job, mgr, hiredate, sal, comm, deptno
3 from emp_1
4 where rownum <= 10
5 /
10 rows created.
SQL> select * from emp_1
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
SMITH CLERK 7902 17-DEC-80 800 20
ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
WARD SALESMAN 7698 22-FEB-81 1250 500 30
JONES MANAGER 7839 02-APR-81 2975 20
MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
BLAKE MANAGER 7839 01-MAY-81 2850 30
CLARK MANAGER 7839 09-JUN-81 2450 10
SCOTT ANALYST 7566 19-APR-87 3000 20
KING PRESIDENT 17-NOV-81 5000 10
TURNER SALESMAN 7698 08-SEP-81 1500 0 30
24 rows selected.
SQL> select max(empno) from emp_1
2 /
MAX(EMPNO)
7934
SQL> create sequence emp_seq start with 7935
2 /
Sequence created.
SQL> update emp_1 set empno = emp_seq.nextval where empno is null
2 /
10 rows updated.
SQL> select * from emp_1
2 /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
7935 SMITH CLERK 7902 17-DEC-80 800 20
7936 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7937 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7938 JONES MANAGER 7839 02-APR-81 2975 20
7939 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7940 BLAKE MANAGER 7839 01-MAY-81 2850 30
7941 CLARK MANAGER 7839 09-JUN-81 2450 10
7942 SCOTT ANALYST 7566 19-APR-87 3000 20
7943 KING PRESIDENT 17-NOV-81 5000 10
7944 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
24 rows selected. -
Memory leak during insert on PocketPC 2002
We've built an application using an Oracle Lite 5.0.1 database using an ODBC interface. We've stolen most of the code from:
C:\OraHome1\Mobile\Sdk\wince\samples\ODBC\sample.cpp
We've found that there appears to be a memory leak during inserts (haven't fully analyzed updates/gets). The thing leaks roughly X bytes per insert where numBytesInInsertString < X < (2.5 * numBytesInInsertString)
Has anyone else seen this? It becomes really apparent during out load from XML method where we walk through an xml document and perform roughly 7000 inserts in a row (commit at the end). The memory leak is not coming from the XML stuff, already tested for that.
Paul Runstedler
Intrexa Corp.I've went back to the sample to confirm my suspicions and sure enough there is memory being leaked. I loaded up the sample workspace in "[ORACLEHOME]\Mobile\Sdk\wince\samples\ODBC" and modified the sample.cpp code ever so slightly. Instead of performing one insert, one update and one select, it performs 5 iterations of 2000 inserts and skips over the updates and deletes. I've placed some memory reporting functionality after each iteration of inserts to report the free memory and this is what I get
After Connection and creation of table Free: 19742720 Used: 8237056
After iteration 1, 2000 inserts Free: 19439616 Used: 8540160
After iteration 2, 2000 inserts Free: 19509248 Used: 8470528
After iteration 3, 2000 inserts Free: 19439616 Used: 8540160
After iteration 4, 2000 inserts Free: 19509248 Used: 8470528
After iteration 5, 2000 inserts Free: 19283968 Used: 8695808
After commit Free: 19283968 Used: 8695808
As you can see, there is a loss of about 458700 bytes (about half a meg) over the 5 iterations. Thats about 46 bytes per insert. Not a lot for single insert, but this will eventually cripple any application that wants to perform a high number of inserts.
Any help would be appreciated.
Thanks,
Paul Runstedler
Intrexa Corp.
PS: The following is the modified method in sample.cpp
BOOL CSampleApp::InitInstance()
COLiteDB db;
MEMORYSTATUS memInfo;
CString message;
if (db.Connect())
db.Execute (_T ("CREATE TABLE TT (COL1 VARCHAR2(40), COL2 VARCHAR2 (50))"));
if (*db.GetError())
AfxMessageBox (db.GetError());
memInfo.dwLength = sizeof(memInfo);
GlobalMemoryStatus(&memInfo);
// Report memory usage
message.Format( _T("After Connection and creation of table Free: %d Used: %d\n"),
memInfo.dwAvailPhys, (memInfo.dwTotalPhys - memInfo.dwAvailPhys));
TRACE(message);
CString insertString;
for( int j = 0; j < 5; j ++ ) {
for( int i = 0; i < 2000; i ++ ) {
insertString.Format( _T("INSERT INTO TT VALUES (\'TESTINGTESTING123%d\', \'TEST2ANDBLAJHBLAJBLAJKBJAJAJAJAJJAJAJAJAJA\')") );
db.Execute (insertString);
if (*db.GetError()) {
AfxMessageBox (db.GetError());
memInfo.dwLength = sizeof(memInfo);
GlobalMemoryStatus(&memInfo);
// Report memory usage
message.Format( _T("After iteration %ld, 2000 inserts Free: %d Used: %d\n"),
(j+1), memInfo.dwAvailPhys, (memInfo.dwTotalPhys - memInfo.dwAvailPhys));
TRACE(message);
#if 0
db.Execute (_T ("UPDATE TT SET COL2 = 'TESTING ORACLE LITE' WHERE COL1='TEST1'"));
if (*db.GetError())
AfxMessageBox (db.GetError());
CSQLResult* pres = db.Execute (_T ("SELECT * FROM TT"));
if (pres != NULL)
const CRowObj* pobj = pres->Fetch();
while (pobj)
CString str = (LPCTSTR)pobj->GetAt (0);
str += TEXT (" ");
str += (LPCTSTR)pobj->GetAt (1);
AfxMessageBox (str);
pobj = pres->Fetch();
delete pres;
#endif
if( db.Commit() != TRUE ) {
AfxMessageBox( _T("couldn't commit") );
memInfo.dwLength = sizeof(memInfo);
GlobalMemoryStatus(&memInfo);
// Report memory usage
message.Format( _T("After commit Free: %d Used: %d\n"),
memInfo.dwAvailPhys, (memInfo.dwTotalPhys - memInfo.dwAvailPhys));
TRACE(message);
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
} -
Handling update operation in Post Insert Trigger
Hi All
We are recording all the data that is being updated or inserted into a Table, (say Table A) by inserting into a custom table whenever an insert or update comes in the trigger.Now suppose a user while updating the data in Table A just fetches the record on front end and click on apply directly without making any changes. This causes an update on Base Table and hence causes an insert into our custom table. As this data is of no use to us..
Is there any way to stop this data being inserted into our table.
I have came across two solutions till now.Please suggest which could be better in terms of performance
1) When the user updates any column in base table and trigger fires. We can check the new values of each column(around 50) with their Old values.In case there is a change we will insert the data into custom table else not.
2)When user updates any column then we are picking all the new values into a record type datatype and same way latest value from custom table.Then performing minus between these two records by making query from dual.
Please let me know if there could be any other way around..
Please Note: My base table could have around 200 columns too
Thanks
AJAjay Sharma wrote:
Hi All
We are recording all the data that is being updated or inserted into a Table, (say Table A) by inserting into a custom table whenever an insert or update comes in the trigger.Now suppose a user while updating the data in Table A just fetches the record on front end and click on apply directly without making any changes. This causes an update on Base Table and hence causes an insert into our custom table. As this data is of no use to us..
Is there any way to stop this data being inserted into our table.
I have came across two solutions till now.Please suggest which could be better in terms of performance
1) When the user updates any column in base table and trigger fires. We can check the new values of each column(around 50) with their Old values.In case there is a change we will insert the data into custom table else not.
2)When user updates any column then we are picking all the new values into a record type datatype and same way latest value from custom table.Then performing minus between these two records by making query from dual.
Please let me know if there could be any other way around..
Please Note: My base table could have around 200 columns too
Thanks
AJOption 3.
Fix the front end to disallow the operation. That option being submitting an update statement which doesn't actually change any data. -
Find the latest updated or the latest inserted record in a table
Hi All,
Thanks in advance
Just a simple question
How do we find the latest updated or the latest inserted record in a table ?
Provide some queries in SQL?You can order by rowid desc to get lately inserted records, but I'm not sure about updated records.That is incorrect, Oracle might use old rowid's even in inserts and you cannot assure that the max(rowid) refers to the latest record.
If the table is created with rowdependencies one can use ORA_ROWSCN pseudo column to check on date/time when the last dml has been performed over that table. But, that has some limitations too, Old snapshots will be erased hence one can check the last dml with a time frame of few days.
Regards,
Prazy -
dear all
I am new to oracle database...
and i create one BLOB column to insert the images..
i can insert and retrieve the image data...
but i cant update this column...
can any one guide me to do this.
i tried to empty the column and update but still fails..
update tablename set columnname=empty_blob()
i tried the above and its clear the data ...but again i cant update this ...
i am using oracle 10g express edition.
any suggestion
thank youi tried to empty the column and update but still fails..How does it fail? Please describe the behaviour in more detail, including any error messages and related information.
Cheers, APC
blog: http://radiofreetooting.blogspot.com -
Update Database Statistics during System Export
hi All,
I am getting following error on step (Update Database Statistics ) during system export.
WARNING 2011-06-17 15:13:35
Execution of the command "E:\usr\sap\PRD\SYS\exe\uc\NTAMD64\
brconnect.exe -u / -c -o summary -f stats -o SAPSR3 -t all -m +I -s
P10 -f allsel,collect,method,precision,space,keep -p 4"
finished with return code 5.
Output: BR0801I BRCONNECT 7.00 (31)BR0805I Start of BRCONNECT processing:
cegczbfe.sta 2011-06-17 15.12.02BR0484I BRCONNECT log file:
G:\oracle\PRD\sapcheck\cegczbfe.sta
ERROR 2011-06-17 15:13:35
CJS-30023 Process call 'E:\usr\sap\PRD\SYS\exe\uc\NTAMD64\
brconnect.exe -u / -c -o summary -f stats -o SAPSR3 -t all -m +I -s P10
-f allsel,collect,method,precision,space,keep -p 4'
exits with error code 5. For details see log file(s) brconnect.log.
there is small part of brconnect.log is:
BR0204I Percentage done: 27.88%, estimated end time: 15:16
BR0001I **************____________________________________
BR0280I BRCONNECT thread 2: time stamp: 2011-06-17 15.13.31
BR0301E SQL error -20003 in thread 2 at location stats_tab_collect-20, SQL statement:
'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BEV3/CHCL_STAT"', ESTIMATE_PERCENT => NULL, METHOD_OPT => 'FOR ALL COLUMNS SIZE 1', DEGREE => NULL, CASCADE => TRUE, NO_INVALIDATE => FALSE); END;'
ORA-20003: Specified bug number (5099019) does not exist
ORA-06512: at "SYS.DBMS_STATS", line 14830
ORA-06512: at "SYS.DBMS_STATS", line 14851
ORA-06512: at line 1
BR0886E Checking/collecting statistics failed for table SAPSR3./BEV3/CHCL_STAT
BR0280I BRCONNECT thread 2: time stamp: 2011-06-17 15.13.31
BR0301E SQL error -20003 in thread 2 at location stats_tab_collect-20, SQL statement:
'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BEV3/CHCL_STATT"', ESTIMATE_PERCENT => NULL, METHOD_OPT => 'FOR ALL COLUMNS SIZE 1', DEGREE => NULL, CASCADE => TRUE, NO_INVALIDATE => FALSE); END;'
ORA-20003: Specified bug number (5099019) does not exist
ORA-06512: at "SYS.DBMS_STATS", line 14830
ORA-06512: at "SYS.DBMS_STATS", line 14851
ORA-06512: at line 1
BR0886E Checking/collecting statistics failed for table SAPSR3./BEV3/CHCL_STATT
BR0280I BRCONNECT thread 2: time stamp: 2011-06-17 15.13.31
BR0301E SQL error -20003 in thread 2 at location stats_tab_collect-20, SQL statement:
'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BEV3/CHCMVWOBJ"', ESTIMATE_PERCENT => NULL, METHOD_OPT => 'FOR ALL COLUMNS SIZE 1', DEGREE => NULL, CASCADE => TRUE, NO_INVALIDATE => FALSE); END;'
ORA-20003: Specified bug number (5099019) does not exist
ORA-06512: at "SYS.DBMS_STATS", line 14830
ORA-06512: at "SYS.DBMS_STATS", line 14851
ORA-06512: at line 1
BR0886E Checking/collecting statistics failed for table SAPSR3./BEV3/CHCMVWOBJ
BR0280I BRCONNECT thread 2: time stamp: 2011-06-17 15.13.31
BR0301E SQL error -20003 in thread 2 at location stats_tab_collect-20, SQL statement:
'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BEV3/CHCMVWOBPR"', ESTIMATE_PERCENT => NULL, METHOD_OPT => 'FOR ALL COLUMNS SIZE 1', DEGREE => NULL, CASCADE => TRUE, NO_INVALIDATE => FALSE); END;'
ORA-20003: Specified bug number (5099019) does not exist
ORA-06512: at "SYS.DBMS_STATS", line 14830
BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BEV3/CHCTLVAR"', ESTIMATE_PERCENT => NULL, METHOD_OPT => 'FOR ALL COLUMNS SIZE 1', DEGREE => NULL, CASCADE => TRUE, NO_INVALIDATE => FALSE); END;'
ORA-20003: Specified bug number (5099019) does not exist
ORA-06512: at "SYS.DBMS_STATS", line 14830
ORA-06512: at "SYS.DBMS_STATS", line 14851
ORA-06512: at line 1
ORA-06512: at line 1
BR0886E Checking/collecting statistics failed for table SAPSR3./BEV3/CHCTMSTFUB
BR0280I BRCONNECT thread 2: time stamp: 2011-06-17 15.13.34
BR0844E 100 errors occurred in thread 2 - terminating processing of the thread...
BR0280I BRCONNECT time stamp: 2011-06-17 15.13.34
BR0848I Thread 2 finished with return code -1
BR0280I BRCONNECT time stamp: 2011-06-17 15.13.34
BR0879I Statistics checked for 0 tables
BR0878I Number of tables selected to collect statistics after check: 0
BR0880I Statistics collected for 639/0 tables/indexes
BR0889I Structure validated for 0/749/0 tables/indexes/clusters
BR1308E Collection of statistics failed for 68292/0 tables/indexes
BR0806I End of BRCONNECT processing: cegczbfe.sta 2011-06-17 15.13.34
BR0280I BRCONNECT time stamp: 2011-06-17 15.13.35
BR0804I BRCONNECT terminated with errors
how can I resolve this issue?
Regards,
majamilhi SM,
I have applied these patches with Opatch which successfully applied.
is it ok or i had to use the MOpatch for these?
one more thing for your information , when i execute Delete Harmful Statistics under Database Statistics in brtools then i got following
BR0280I BRCONNECT time stamp: 2011-06-30 08.10.53
BR0818I Number of tables found in DBSTATC for owner SAPSR3: 390
BR0280I BRCONNECT time stamp: 2011-06-30 08.10.53
BR0807I Name of database instance: PRD
BR0808I BRCONNECT action ID: cegfjniv
BR0809I BRCONNECT function ID: dst
BR0810I BRCONNECT function: stats
BR0812I Database objects for processing: HARMFUL
BR0852I Number of tables to delete statistics: 0
BR0856I Number of indexes to delete statistics: 0
BR0863W No tables/indexes found to update/delete statistics or validate structur
e
BR0806I End of BRCONNECT processing: cegfjniv.dst 2011-06-30 08.10.53
BR0280I BRCONNECT time stamp: 2011-06-30 08.10.53
BR0803I BRCONNECT completed successfully with warnings
BR0292I Execution of BRCONNECT finished with return code 1
BR0668I Warnings or errors occurred - you can continue to ignore them or go back
to repeat the last action
BR0280I BRTOOLS time stamp: 2011-06-30 08.10.53
BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:
c
why i am getting this return code 1?
Regards,
Edited by: majamil on Jun 30, 2011 8:20 AM
Maybe you are looking for
-
Map My Update Rule from a Master Data Attribute
Hello experts, I haven't tried this scenario yet, hope you can help me, the Issue is this I have 2 InfoObjects ZPSCHRCHY and 0PROFIT_CTR from InfoCube WBS cost and allocations I want both the InfoObjects to be mapped to 0PROFIT_CTR attribute of 0WBS_
-
How do I download attachments to an external drive
How do I download attachments to an external drive
-
Which iso is right one for Athlon XP 1.8G?
I will have ethernet connection while installing but which CD iso do I need? Sorry about the real newbie question. A. archlinux-2009.08-netinstall-i686.iso i686/32bit CD-ISO B. archlinux-2009.08-netinstall-x86_64.iso x86_64/6
-
What are the /rpc/ and /ews/ folders used for in Microsoft Exchange Server?
I come across these two folders constantly when seeing the Microsoft Exchange server externally (other folders are usually /owa/, /powershell/ and /ecp/. I've looked everywhere online I can think of but cannot find an easy-to-understand description t
-
Unable to kill infoview session using LogOnToken
Hi All, I am not able to reuse the EnterpriseSession created in java. I have a java webapp which displays a list of webi reports with hyper-link. when user click on a hyper-link, the web app displays the report in infoview in a iframe element. The pr