Checking for outstanding commits in session ...
(forms 9iR2, 9i DBMS)
does anyone have any advice on if it is possible (and if so - how!) I can achive the following:
I would like to find out if there is a requirement for carrying out a commit in my form, ie when an item on a block has changed, or one or more blocks of PL/SQL have issued any DML statements (INSERT/DELETE/MERGE) and have not issued a commit.
The "block has changed" part is easy, using :system.form_status = 'CHANGED', but the dml statement is proving to be trickier - I thought that I could use sql%rowcount, but this does not appear to persist accross the forms scope, but just within the pl/sql block which the DML is originally issued in.
example:
procedure write_a_record is
begin
insert into test_table (test_col) values ('X');
message(sql%rowcount); --this would display 1, as expected
end;
procedure commit_if_needed is
begin
if (:system.form_status = 'CHANGED') or (sql%rowcount > 0) then
commit;
end if;
end;
however, when the second procedure is called, after the first one - sql%rowcount returns NULL!
any ideas?!
thanks,
pete :)
Peter,
SQL*ROWCOUNT is not what you want in any case.
You can:
delete from some_tab;
delete from some_tab where 1=2;
and what you will do with sql%rowcount?
As far as I remember there is something in the database that indicate whether were any changes since start of transaction, but it seems that this is more dba topic than Forms...
But why you need procedure commit_if_needed ?
Why not commit_always?
If nothing to commit it will nothing to do.
Similar Messages
-
Oracle Error occured, while checking for Already Committed data
Hi,
In my 1 day old workspace I see more than 3000 errors logged in the owb_error_log_table with text as shown below , can someone from Oracle please advise what the problem seems to be ?
Oracle Error occured, while checking for Already Committed data : 76291.DBObject.TABLE_1.2.en_GB
Oracle Error occured, while checking for Already Committed data : 76291.DBObject.TABLE_1.1.en_GB
Oracle Error occured, while checking for Already Committed data : 42483.PlatformConfiguration.ORACLE.1.en_GB
Oracle Error occured, while checking for Already Committed data : 42483.PlatformConfiguration.ORACLE.2.en_GB
There are many more examples of other errors as well. Google returns nothing for these error....am I the first one to face these errors. We are using 11gRelease2 on RHEL.
They all have a error text of ORA-01403: no data found
tks in advance.I haven't been able to pin it down to a specific action that causes these errors. I have been having various other problems when importing tables ...the screen just freezes and nothing happens. When I queried this table from sql developer to check if I can spot anything and I found these errors.
The screen freezes when I add a new oracle location - the test works fine - but when I click OK to the add oracle location screen it just freezes and nothing happens. -
How to check for outstanding service instance creation requests
Greetings,
In preparation to upgrade my OEM Cloud Control from 12.1.0.1 to 12.1.0.3 I am reading the OEM Cloud Control Upgrade Guide. Step 2b in Chapter 3 (Getting Started) says to check for outstanding database service instance creation requests as follows: In Cloud Control from the Enterprise menu, select Infrastructure Cloud. I do not see an Infrastructure Cloud option under the Enterprise dropdown. I don't understand why not. If anyone can shed some light on this I would appreciate it.
Thank you.
Bill WagmanStep 2b applies to sites with DBaaS (database as a service) feature enabled. If you have not set up DBaaS, it is not necessary to check on database requests referred to in the step.
Doc on DBaaS:
http://docs.oracle.com/cd/E24628_01/doc.121/e28814/cloud_db_using.htm#CHDFDDBC
By the way, it is recommended that you check out the following notes on upgrade:
1568143.1 - EM 12c R3: Checklist for Upgrading Enterprise Manager Cloud Control from Version 12.1.0.x to 12.1.0.3
1569883.1 - EM 12c R3: Checklist for Upgrading Management Agents Version 12.1.0.x to 12.1.0.3 -
Finding if there are any outstanding commits in session
hi,
can anyone tell me a way of finding (in PL/SQL) if there are any DML statements which have been executed and have not yet had a commit or rollback issued?
i was thinking maybe i could use sql%rowcount, but it does not appear to persist outside a pl/sql block, and not through the whole session like I thought it did.
thanks,
peteThere is a presumption in Oracle that we manage our transactions properly. It should not occur that we find ourselves in a situation where we do not know the status of our transaction. A transaction is a set of steps along a predetermined path. In all but the most complicated transactions we should be able to trace all possible routes through the transaction and consequently know all possible statuses.
As a general rule, if you find yourself at the end of your transaction and you've handled all the exceptions then you should issue a commit. If you find yourself in a situation in which you need to undo any changes then you should issue a rollback. Don't bother trying to establish whether there are any changes: just do it.
SQL%ROWCOUNT has no scope beyond the previous SQL statement (it's not cumulative). Consequently, it's not a very reliable guide to the total state of the whole transaction. Besides, even if SQL%ROWCOUNT equals zero (e.g. an update that affected no rows) you still have a resource lock on the table. No other session can execute DDL on that table until you issue a commit or rollback.
Cheers, APC -
How can i check for posted but not yet commited changes in a form
Dears
I make changes programmatically in a form then i post it using (Post built in).
If the user exits the form, i make check for any changes in the form to commit it using the system variable :system.form_status
Unfortunately the value of this system variable is 'Query' not 'Changed' because of using the post built in.
Is ther another system variable ( or any another way ) that check for posted but not yet commited changes in the form ?
Thanks a lot
Mostafa AbolaynainI had faced similar situation. Using of package variable which identifies, what is the user's latest action.
This is just a workaround.
Capture what the user has performed into a variable say, PKG_VAR.ACTION,
This will be assigned values like List L, and Create C, Update U and Saved S.
If commit is executed,assing the status S to the variable.
So while closing,
IF :system.form_status = 'CHANGED' or PKG_VAR.ACTION in ('C','U') THEN
-- validate the data, n perform commit.
else
-- just close the form.
end if;
Regards
Deepz : ) -
Check for empty session variable
Hey there we're making a login for our jsp web application.
The login allready works and so does the log out but now we want to make a check to make it impossible to login with names that are not in the database.
So what basicly happens is as follows...
Login reads the database info:
while (rs.next()) {
if (request.getParameter("username").equals(rs.getString("username")) && request.getParameter("password").equals(rs.getString("password"))){
session.setAttribute("username", rs.getString("username"));
session.setAttribute("firstname", rs.getString("first_name"));
session.setAttribute("lastname", rs.getString("last_name"));
}but when you enter invalid information teh session variabe "lastname" for example should read null. Now we want to make a check for this null value, which should look something like this:
if(session.getAttribute("username").equals(null)){
response.setStatus(301);
response.setHeader("Location", "/index.jsp");
} else {
response.setStatus(301);
response.setHeader("Location", "/mainmenu.jsp");
}But this doesnt work, it just logs in with the null values... any1 got a clue??
edit: im actually looking for something like the isSet command in PHP to give an idea...
Message was edited by:
whappitYour test for null will always fail, because request.getParameter("username") is NEVER null, in that it exists, even though it contains no data.
Try .equals(""); instead. -
Checking for session expiration
We're using JSPs and Servlets in our application. Looking for a way in code to check if the session has expired. We will need to do this from a jsp as well as a servlet (sometimes a jsp is pointed to by a link and sometimes a servlet). Can someone point me in the right direction?
Thanks all.
jlI like the idea of a session verifier. We have about 25 jsps, 15 servlets, and at least 80 components (beans) in the app. How would the verifier component work? How could we intagrate it with all the other existing components? Ideally it would be integrated with minimal modifications...
Is the following what you had in mind with your suggestion to check for session data:
HttpSession session = request.getSession();
//or could this be used too: HttpSession session = pageContext.getSession();
String valid = session.getAttribute( KEY );
if ( null != valid ) {
//then the session is still active
jl
>
If the session has expired and you current have a new
session, then use the isNew() method to check the
session object. Or, you could check the session
object for the data you are looking for. If it is
missing, then the session expired and has been newly
created. You should build into your design a session
verifier so that you don't expierence NullPointers or
missing data. -
ME31K BADI for checking Data in Commitment Plan/ Acct assignment
I am trying to find a BADI or User Exit to check Account Assignment / Commitment Plan Data, to work in TCodes ME31k or ME32K.
I tried using ME_PROCESS_OUT_CUST , But its only for BAPI.
Any Similar BADI to check in ME31K or ME32K.
Appricate any helpalex ice wrote:
Hi.
> 'Can we do any derivation or check to get the account assignment populated automatically in the Commitment Plan ?
> Account assignments screens are avaliable in the commitment plan so i think we dont want to apply this note.'-i don't think so, because as said in this note it's coding error.
Thank you. I will impliment the Corrections
>
> 'We have alaready activated the Fields to be transferred. I dont have a clue where we will set the account assignemnt specifically for contracts (in the case of PR and PO it comes automatically as per the derivation rule mainted)'-it derives not from contract,but from Earmarked fund,which generates from Com. plan.
Ok.Then i think some issue in the Earmarked fund.. How we can check this. Please guide.
>
> 'One more error : While running transaction FM_MRP_PR if the budget exceed the PR not pupulating the account assignment filed (if it is in the budget it is populating) and we are getting error message "Instance 10000120 of object type Purchase Requisition could not be changed ,Message no. BAPI003" Please advice how we can overcome this error.' when you get this error(also put it's number), if while changing, then check PR item number,if it's=0 then customize in OMI5
Message is PR No "10000120 10 Annual budget exceeded by 560,400.00 QAR (FM PB Availability Control) for document item 00010 ,
"Instance 10000120 of object type Purchase Requisition could not be changed ,Message no. BAPI003"
I have checked transaction OMI5 and Plant with Item PR 10 and Item no stock trans Res is 100. and hope this is correct.
Please Guide.
Regards
Hari -
How can I check my outstanding balance for apps I've downloaded so I can clear it so I can update my apps?
I believe the item will get automatically charged to the credit unless it is an item for which such a payment method is not valid (e.g., a gift card).
Showing account balance in iTunes and on a mobile device - https://discussions.apple.com/message/20443884 -
Okay: My start page is the one Google provides: http://www.google.ca/firefox?client=firefox-a&rls=org.mozilla:en-US:official and frequently it has a note underneath the search box that "You're not on the latest version of Firefox. Upgrade today to get the best of the Web!" But when I check for updates on the About Firefox window, it says my Firefox is up to date. So what is the start page looking for? Is there some setting I need to adjust? Or is this a Google marketing ploy to get me to switch to Chrome?
I tentatively think I have the solution; this is for when the session id value 'thing', in about:config, referred to in other answers is already on the default/rest state.
I am assuming, I don't what to imply certainty in-case there is a value wrong in our browsers, that the problem stems from the fact that our homepage is no longer the default for Firefox.
So, go to 'Options'>'General' and delete the homepage. This will reset it to the new address, which is 'about:home'.
I hope this helps some people. -
Best practice for keeping a mail session open in web application?
Hello,
We have a webmail like application where users login with their IMAP credentials, then are taken to an authenticated area of the site where they can manage different things about their email account.
Right now the application is opening and closing a mail store connection (via a new javax.mail.Session) for each page load based on the current logged in user credentials. To me this seems like it would be a bad practice to keep opening and closing a connection each page load.
Are there any best practices for this situation? It would be nice to be able to open the connection to the mail server on login, then keep that connection open until the person logs out, session expires, etc.
I can probably put the javax.mail.Session into the HTTP session, but that seems like it would break any clustering functionality of tomcat. This would be fine if the machine the user is on didn't fail, but id assume if they failed over to another the mail session would be gone. Maybe keeping the mail session in the http session, checking for a connection, then first attempting to reconnect with the logged in credentials before giving up would be a possiblity?
Any pointers would be appreciatedIf you keep the connection open across pages, you're going to need to deal with
timeouts - from the http session and from the mail server.
If you don't keep the connection open, you're going to need to "resynchronize"
your view of the store/folder with each operation, in case the folder is modified
by another session.
The former is easier in the common cases, especially if you don't care how gracefully
you handle failures. The latter is more difficult in the common cases, but handles
failure better, and in particular handles clustering better. You'll need to measure it to
see if it meets your performance and scalability requirements. You may need to mix
the two approaches to get acceptable performance. -
Could not execute auto check for display colors using command /usr/
I am trying to Install Oracle 10g R2 on Solaris X86 32 bit
I am connecting to system from my windows vista laptop through putty... I get the following error...
$ ./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be 5.10. Actual 5.10
Passed
Checking Temp space: must be greater than 250 MB. Actual 1214 MB Passed
Checking swap space: must be greater than 500 MB. Actual 1799 MB Passed
Checking monitor: must be configured to display at least 256 colors
>>> Could not execute auto check for display colors using command /usr/openw
Some requirement checks failed. You must fulfill these requirements before
continuing with the installation,at which time they will be rechecked.
Continue? (y/n) [n] n
User Selected: No
Exiting Oracle Universal Installer, log for this session can be found at /tmp/Or
I have done the following:-
# DISPLAY=192.168.1.133:0.0; export DISPLAY
# echo $DISPLAY
192.168.1.133:0.0
# xhost+
xhost+: not found
# xclock
xclock: not found
I know that I have to do the following:-
1. Install SUNWxwplt package ========> Is already Installed
2. Set DISPLAY variable
3. Execute xhost + on target (set in DISPLAY) computer
# pkginfo -i SUNWxwplt
system SUNWxwplt X Window System platform software
Some sites claim xming and some xwindows etc.... Plz give me a step by step instruction as how to overcome this..
bash-3.00# /usr/openwin/bin/xclock
Error: Can't open display:
bash-3.00# DISPLAY=192.168.1.133:0.0; export DISPLAY; echo DISPLAY
DISPLAY
bash-3.00# echo $DISPLAY
192.168.1.133:0.0
bash-3.00# /usr/openwin/bin/xclock
Error: Can't open display: 192.168.1.133:0.0
bash-3.00# pwd
bash-3.00# find . -name xhost
./usr/openwin/bin/xhost
^C
bash-3.00# /usr/openwin/bin/xhost +
/usr/openwin/bin/xhost: unable to open display "192.168.1.133:0.0"
bash-3.00#
# echo $PATH
/usr/sbin:/usr/bin
I have also gone through the below ... but was not of much help
Unable to execute runInstaller: Check if the DISPLAY variable is set
Plz help
Edited by: [email protected] on Feb 11, 2009 5:16 AMbash-3.00# echo $SHELL
/sbin/sh
bash-3.00# echo $DISPLAY
bash-3.00# DISPLAY=192.168.1.133:0.0;export DISPLAY
bash-3.00# echo $DISPLAY
192.168.1.133:0.0
bash-3.00# /usr/openwin/bin/xclock
Error: Can't open display: 192.168.1.133:0.0
bash-3.00# man xclock
No manual entry for xclock.
bash-3.00# /usr/openwin/bin/xhost +
/usr/openwin/bin/xhost: unable to open display "192.168.1.133:0.0"
bash-3.00# -
Checking for errors in application item computation (at page level)
I have a conditional computation used to set the value of an application-level item.
In the condition, I need to check to see if the action (button-press to initiate DML processing) generated an error (eg cannot delete row because of child records). I don't need to catch/handle any specific errors, I just need to know if an error occurred.
What do I check for? I've seen references on the forum to hidden page items Pxx_msg and Pxx_err, but I've played around with them, and apparently don't know how they're set.
Another thought I had is to create a before-computation process that checks to see if there is some sort of error/exception, but I'm not having luck w/ this either.
Ideas?
Thanks,
CMax -- I appreciate you helping me to clarify this issue. I need to track which database tables have had data changes committed to them in the course of the app running. My thought is to track this in an application item (a list of changed tables), and check/set the item as needed when delete/create/apply changes buttons are pressed. But if a DML statement fails, I don't want to add the table to the list of modified tables.
When I was setting the app item in a computation, it appeared that (like you said) I was trying to check for errors before the process had executed. (I'm also not sure I was checking for errors in the correct manner.) Regardless, the result was that the table got added to the list even when the delete operation failed because of child records.
What I'm doing now appears to work (and sorry, I can't actually access the app this morning, the server is down, so I may not be able to communicate this as clearly as I'd like). If I recall, yes, I'm setting the item in a post comp/validation process. I'm still not doing any error checking, but it appears that if there is an error, the process isn't executing: the item is definitely not getting set.
Can you clarify what you mean when you say that "all of this will execute before the processes". Do you mean that comps and page processes will execute before DML is executed on the database?
Thanks,
Carol -
How to make "check for multiple logons" mandatory in webdynpro application.
Hi SDN members,
Im having a problem with an application developed in webdynpro abap.
We require that end-user only have a session per computer (ip address),
I already tried to achieve this by configuring the webdynpro application throguh SICF and going to Error Pages -> Logon Errors --> System Logon and mark the checkbox Check for multiple logons.
This configurations give only a warning when the user logs multiple times, and show a checkbox letting the user decide to end or not the previous sessions.
How to make end previuos sessions mandatory ??
Regards,
Franklin CedilloYou would have to enforce this at the application level. You can get the IP address of the current client from the framework - IF_WD_APPLICATION method GET_REMOTE_ADDRESS.
You could write an entry with the IP address into a temporary table during WDDOINIT. You could clear the entry in the WDDOEXIT. Also during the WDDOINIT, check to see if there is already an entry for this IP address. If so, then fire an exit nagivation plug to a static MIME object or BSP page that explains why the user can only be logged in once. -
Q30: Cannot find sales order for a committed stock item
I have a few item numbers which show committed stock in item master data/stock but I cannot find an open sales order or even with an open line on a closed sales order. I have tried various query reports without success.
Does anyone have a key to unlock this problem?
Thanks,
RobinHi,
Sorry but I am pretty new to SAP and on a learning curve so no idea what note 999124 is or even where/how I would use it.
Can you explain further please?
Robin
Lakshmipathi
Posts: 17,513
Registered: 8/9/07
Forum Points: 34,462
Solved problem (10)
Very helpful answer (6)
Helpful answer (2)
Re: Q30: Cannot find sales order for a committed stock item
Posted: Jan 12, 2011 3:18 PM in response to: Robin Bellion Reply
Check Note 999124 - Incorrect committed\On order quantity when changing orders
thanks
G. Lakshmipathi
Maybe you are looking for
-
Multi-mapping....2nd mapping not executing
Hi all.. I am doing Proxy to file scenario.... I am using multi-mapping in this.. one source..... 2 targets i am triggering the taregt based on a field value( using equalsS and IF) if i am testing it with single value then the mapping is success and
-
How do I delete a signature in Acrobat XI? Form section doesn't show
I am trying to delete a signature and it appears from other posts that this is done throug the "Forms" section under Tools. However, under Tools the only options are Export PDF, Create PDF, Send Files, and Create Files. I thought the initial problem
-
Greetings, I have been testing a small java applet for a phpbb mod, named Proxy Revealer Basically the java applet "phones home" (connects back to the http host serving the applet) via a Socket connection to establish a direct connection, then basica
-
Mac Pro won't boot after Restart
I have a Mac Pro 2,1 (late 2007) running OS 10.6.8. I recently did two attempted upgrades: 1. I Installed another 16GB of RAM on top of the 16 I already have. It was fully compatible, installed as advised by Apple). But I was getting Kernel panics so
-
How do I convert H 264 video for Imovie?