About cursor close
Hi
Here i am not able to close the cursor....
After commit also not possible....
Before commit also not possible...
Plz can u tell me...
is
cursor udtp_cursor is
select * from TIME_SLOT;
BEGIN
for udtp_value in udtp_cursor
loop
dbms_output.put_line(udtp_value.SLOT_ID);
-- insert into TEST_TIMESLOT values (udtp_value.SLOT_ID, 'Shankar');
end loop;
-- close udtp_cursor;
commit;
END;
You are doing a cursor for loop. The cursor is automatically closed when the loop completes.
Similar Messages
-
WTF? you ask for details then tell me I have exceeded the 255 character limit. Clicking on links in an email I wound up with 5 open tabs. Tried to close the last tab opened. I got pop-up warning I was about to close 5 tabs.
ya I'm aware of the shortcut keys. Been using a mac since they came out. She is used to interaction with the mouse, hence the specific question as to where the X has gone.
-
When I close - it does still tell me that I am about to close multiple tabs... but it no longer gives me the option to save open tabs, NOT bookmark, SAVE open tabs. That way, the next time I open Mozilla, all the open tabs from my previous session would open once again. 'Save Open Tabs' is GONE - it would be very helpful to have it back. I don't use it all the time, but it was much easier to save open tabs when I wasn't able to finish what I was doing instead of having to search through the previous days history to find what I need when I start my next session!!!
Firefox now always stores the old session which you can access by going to the History menu and selecting "Restore Previous Session".
If you always open the last set of tabs, an alternative approach is this:
# Click the orange Firefox button, then select options to open the options window
# Go to the General panel
# Change the setting "When Firefox starts" to "Show my windows and tabs from last time" -
How to get information about cursor? I had only a reference on it.
Hello
How to get information about cursor, that I receive in my procedure as a reference. For example I need to know, a number of columns. I know nothing about this cursor, except the link on it.
Best Regards, Kostya Proskudin!However, I would seriously reconsider what you are trying to achieve.
It looks like you are trying to write some ultimately generic cursor processor. i.e. pass any cursor and process it in some generic way.
Good design should include knowledge of what is expected to be passed and that knowledge can be put into the code.
Generic code is inherently difficult to maintain and debug and will never 100% deal with all possible situations e.g. even if you know the table being queried in the cursor you can't rely on the data dictionary to give you all the returned columns if some of the returned columns of the cursor are computed columns.
Be careful you aren't writing something that's going to cause problems later. -
May 3 InDesign SDK Workshop in Seattle: Enrollment about to close
Registration for InDesign SDK Dev Workshop in @CSBU Dev Summit in Seattle officially closes April 16. We still have spots available, but late enrollment causes us some logistical hassles.
We might or might not accept latecomers, and there might be an administration fee.
Learning to program the InDesign SDK can easily take between two to six months of non-productive time.
Kris Coppieters will return with his acclaimed one-day workshop that will slash the time it takes to get up to speed. This class is run in conjunction with the Developer Summit - there is an additional cost, and registration is handled separately from the Adobe Developer Summit.
For more details and registration, go to
http://www.rorohiko.com/wordpress/workshop-getting-started-with-the-indesign-sdk /
Track: Product Specific Technologies
Date, Time and Location:Monday May 3, 2010
Starts at 9:00 am, lasts 8 hours
Adobe University 1
Don't delay-register now!
http://niemannross.host.adobe.com/2010csbuDeveloperSummit/conference/index.php
http://niemannross.host.adobe.com/2010csbuDeveloperSummit/conference/eachSession .php?id=44
Cheers,
KrisFYI - Enrollment for the InDesign SDK course is about to close (official close date is April 16). Later enrollments will be accepted but might incur an extra fee.
http://www.rorohiko.com/wordpress/2010/03/30/workshop-getting-started-with-the-indesign-sd k-2/ -
A strange error about cursor and dblink
My dbms:Oracle8i Enterprise Edition Release 8.1.7.4.0
I have a stored procedure, which inserts records from a remote database into a local table.
The 'insert' statement have similar pattern:
insert into table_a
select table_b.columns from table_b@dblink
where table_a.column in (select table_b.column from table_b@dblink);
commit;
There are about 100 'insert' statement in my procedure. But there is same error messages at the same
place when the procedure is run. The error messages:ora-01000:maximum open cursors exceeded,ora-02063:
preceding line from dblink. I have manually run the 'insert'statements before the error place and after the error place.
The before and after statements are both OK.
From google.com, I have learned that 'commit' will clear the implicit cursors from 'insert' statement. So I think
the problem is ora-02063. Again, keywords 'ora-01000 ora-02063'from google.com, I found 'alter session close
database link dblink' might solve the problem. I have add the 'alter session' statement after each 'commit' in
my procedure. Unfortunately, same error happened again at the same place.
I am puzzled. Would you like to give some advice? Thanks a lot!Hello
Well, the best place to lookup error messages is here....
http://www.oracle.com/pls/db92/db92.homepage
It's also where all the rest of the database documentation is. As for this error, too many open cursors, as it suggests, one session has too many open. From the statement you are using to select the data, it seems like you are forming the statements dynamically, is this the case? If so, you're using cursors, and so there's a good chance you aren't closing them.
HTH -
I have Firefox 8 for Vista, and according to the "About" screen, Firefox is up to date. I heard this might be a problem with my plugins, so I updated them all. Still a problem. I disabled all my plugins and add-ons and still got the message.
ONLY 8 people have this problem?
Look, virtually all Mozilla's potential users are coming from Internet Exploder, which gets this ALMOST RIGHT, while FireF*x does it totally wrong. Including in webmail: there's no way I could have got to this forum without leaving 4 windows active or closing everything, including closing my mail without logging out.
ONLY 8 PEOPLE? How many thousand simply throw up their hands & uninstall yr f- nurdware over this one single issue? Not to bore you with details, but I'm hardly unsympathetic to open sources that don't look like the best argument for Micros**t and Google hegemony.
Btw, I said they get it -almost- right... It would be really nice if IE or >somebody< offered a checkbox to NEVER close multiple tabs. Look, if this bug disguised as a feature is useful to a few nurds by all means keep it as an advanced option, but PLEASE set up FireFox so it at least defaults to the real world. -
Question about cursors in a function and how to return the results
Hi all,
Some tech info:
I'm using Oracle 11G database and APEX 4.0.2.00.06
I use three cursors in a function. My function is called in an APEX standard report, like this by example:
SELECT fnc_exp(tab.arg1, tab,arg2) FROM table_exp tab;
My question is: how can I return the values calculated from my function to a standard APEX report? Before, this function was used like this by Oracle Forms to fetch the cursors in the right table columns:
open c_a;
fetch c_a into :loc.arg1;
close c_a;
open c_b;
fetch c_b into :loc.arg2, :loc.arg3, :loc.arg4, :loc.arg5;
close c_b;
Thanks for your advices!
Maybe my solution is not right, if you have better ideas, please suggest :)
PS: If you need more details, please ask which you need.Hi,
I don't think you can do exactly like that in APEX.
Go for a pipelined function if you want the value be returned from the function. -
Before installing 4.0.1 I could right click on the Firefox icon on my computer's taskbar and hit close window. It would then give me the option to "save tabs and quit" or "close all tabs."
Now it just alerts me that I'll be closing multiple tabs.
It was convenient to be able to close Firefox and open it with all of the tabs in place. There is nothing more irritating than having multiple tabs lost because your computer did an update overnight and restarted. Also it was helpful when you wanted to run a tun-up or cleaner that asked you close out of your browser for optimum result's.
How do I get "save and quit" back?
ThanksFirefox now always stores the old session, and you can access it by going to the History menu and selecting "Restore Previous Session"
If you want Firefox to display the message to save the session, it can be turned back on by changing some preferences.
# Type '''about:config''' into the location bar and press enter
# Accept the warning message that appears, you will be taken to a list of preferences
# Locate the preference '''browser.tabs.warnOnClose''', if its value is set to '''false''', double-click on it to change its value to '''true'''
# Repeat this for these 3 preferences '''browser.warnOnQuit''', '''browser.warnOnRestart''' and '''browser.showQuitWarning'''
If you always open the last set of tabs, an alternative approach is this:
# Click the orange Firefox button, then select options to open the options window
# Go to the General panel
# Change the setting "When Firefox starts" to "Show my windows and tabs from last time" -
Need help about method close() in BufferedWriter Class
Hi All,
I'm a newbie in Java programming and I have problem regarding BufferedWriter class. I put the code snippet below.
Sometimes I found wr.close() need a long time to be executed, around 9 seconds. For the normal case, it only needs 1 second. The transaction is same with the normal case and I found no errors in the log.
Do you guys have any idea about this problem? What cases that can cause this problem?
Thanks
// Create a socket to the host
InetAddress addr = InetAddress.getByName(shost);
Socket socket = new Socket(shost, sport);
// Send header
BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(), "UTF8"));
data = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><request><contentcode>" + content_code +"</contentcode><msisdn>"+ orig_num +"</msisdn></request>";
System.out.println("------------POST----------");
wr.write("POST /" + surlname +" HTTP/1.1\r\n");
wr.write("Host: " + shost + "\r\n");
wr.write("Connection: close \r\n");
wr.write("Content-type: text/xml \r\n");
wr.write("Content-length: " + data.length() + "\r\n");
wr.write("\r\n");
wr.write(data);
System.out.println("POST /" + surlname +" HTTP/1.1\r\n");
System.out.println("Host: " + shost);
System.out.println("Connection: close");
System.out.println("Content-type: text/xml");
System.out.println("Content-length: " + data.length());
System.out.println("-------------------------");
System.out.println("data = " + "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><request><contentcode>" + content_code +"</contentcode><msisdn>"+ orig_num +"</msisdn></request>");
wr.flush();
// Get response
BufferedReader rd = new BufferedReader(new InputStreamReader(socket.getInputStream()));
while ((linelength = rd.read(charline)) >0) {
reply += new String(charline, 0, linelength);
wr.close();
rd.close();
System.out.println("reply = " + reply);
log.info("(New Log) reply = " + reply);sabre150 wrote:
So what makes you think that not using StringBuffer is the cause of the OP's problem?Just by experience. The main cause of resource hogs in Java is large string concatenation enclosed in a loop.
I've just made the following experience :
public class Test {
public static void main(String[] args) {
new Test().execute();
private void execute() {
long a, b, c;
String value = "A123456789B123456789C123456789D123456789";
String reply = "";
StringBuffer buffer = new StringBuffer();
a = System.currentTimeMillis();
for (int i = 0; i < 5000; i++) { reply += value; }
b = System.currentTimeMillis();
for (int i = 0; i < 5000; i++) { buffer.append(value); }
reply = buffer.toString();
c = System.currentTimeMillis();
System.out.println("Duration - concatenation = " + (b-a) + " / string buffer = " + (c-b));
}Output :
Duration - concatenation = 21295 / string buffer = 7 -
Hi All,
Today we had detailed discussion on cursor.
We had task, query needs to written over 7-8 tables and as a result data set can be 100,000 of rows.
These all records needs to write in flat file.
For example these are the accounting entries for couple of accounts for e.g lets say for 10 accounts.
What we done, designed a cursor which is taking account no as parameter and extracted the details for given account.
write those records in file the close the cursor.
Again opened same cursor for new account and write data in file and close the cursor. Same set operations are done 10 times.
Debate was that, some people was saying that opening of cursor is heavy task. So instead of opening the cursor for each account, fetch all required data in one go and write the result in file.
If we query whole data set means 100,000 records, it can also be a problem.?
Question:-
Is this true Oracle perform heavy task at the time of opening the cursor.
Which one is correct fetch again-2 data for different accounts or whole data set in one go.
We did small POC on it, when we fetched the data in chunks it took 9 seconds but when we fetched whole data set in one go it took 19 seconds.
Still the peoples are saying if it is taking much time it is acceptable but opening of cursor again and again is not acceptable.
Please suggest.....
Thanks
SandeepAs Sybrand said, a simply soft parse is all that is needed to re-use the same SQL cursor in the Shared Pool.
To put this into context and show just why the concept of cursor-are-heavy is laughable and a total fallacy - how long do you think it takes to open and close a half million cursors? Minutes? Perhaps hours?
Not even close. It takes less than 10 seconds. From a 10.2.0.1 dev database of mine (on a small 2 CPU blade server):
SQL> declare
2 MAX_LOOP constant number := 500000;
3 cursor c is select * from user_objects;
4 t1 number;
5 t number;
6 begin
7 t1 := dbms_utility.get_cpu_time; -// returns time in 100th of seconds
8
9 for i in 1..MAX_LOOP
10 loop --// we simply open and close cursors to determine the impact of this only
11 open c;
12 close c;
13 end loop;
14
15 t := (dbms_utility.get_cpu_time-t1) / 100;
16
17 dbms_output.put_line( to_char(t)||' secs' );
18 dbms_output.put_line( to_char(t/MAX_LOOP,'990.000000')||' sec/cursor' );
19 end;
20 /
8.68 secs
0.000017 sec/cursor
PL/SQL procedure successfully completed.
SQL> Oracle is designed around and for cursor processing. A cursor is an "+executable SQL program+" - and as a SQL data processing platform, Oracle exists to run cursors fast and in a scalable fashion.
The concept that cursors are somehow "heavy" in Oracle, it utterly and totally flawed. -
Disable "asking about to close a window"
Hey, with Safari 3, there is the "Taboo-Plugin" included, so I read right...
It makes me insane, that Safari is always asking me if I want to close really the window, only cause I written some text in any field.
Is there any option to disable this new function?
Thanks, PeteriBod,
Closing multiple tabs is a different issue from the one schottenfalke asked about.
In Safari 3, if you enter text into a form on a web page, and later close the page, it asks if you really want to close it. This is not addressed in the Preferences, nor can I find anything in the plist.
Any way to turn it off? -
Exception:
Non-transactional Cursors may not be used in multiple threads; Cursor was created in Thread[http-8888-Processor25,5,main] but used in Thread[http-8888-Processor24,5,main]
why?
Is the creation and use only in the same thread?What Linda said is correct. You also asked "why". Non-transactional cursors are very prone to self-deadlock, which is when two cursors are open in a single thread and access the same records. To avoid the self-deadlock problem, we allow two non-transactional cursors in the same thread to share locks. This means that a non-transactional is attached to a thread, and can only be used in the thread it was created in. This is a limitation, but is a much smaller problem than the self-deadlock problem would be.
In general you should open a cursor just before you need it and close it ASAP. If you find that you're sharing cursors between threads, you may want to ask yourself why you're doing that and re-examine your design. With transactions, you can share cursors between threads, but I consider this to be a very advanced and rare use case.
--mark -
Hello. I have a Windows 7 HP Mini Netbook 32-bit. I just installed Firefox version 6.0.2 (the most updated one). Under
Tools ---> Options ---> Tabs, "Warn me when closing multiple tabs" is checked. However, when I have multiple tabs open and I click on "X" (accidentally one time), it closed Firefox. No warning at all. I tested it again and again (checking the box, unchecking it, then checking it again), and it keeps closing all my tabs without warning.
FYI...I also have a work laptop (Windows XP) and for some reason the "Confirm close" shows up when I try to close multiple tabs.
Thank you.Firefox does not ask to save tabs and windows on exit
* https://support.mozilla.com/en-US/kb/Firefox%20does%20not%20ask%20to%20save%20tabs%20and%20windows%20on%20exit
Warning does not appear when closing multiple tabs
* http://kb.mozillazine.org/Warning_does_not_appear_when_closing_multiple_tabs
Check and tell if its working. -
I only want to close one tab at a time
ONLY 8 people have this problem?
Look, virtually all Mozilla's potential users are coming from Internet Exploder, which gets this ALMOST RIGHT, while FireF*x does it totally wrong. Including in webmail: there's no way I could have got to this forum without leaving 4 windows active or closing everything, including closing my mail without logging out.
ONLY 8 PEOPLE? How many thousand simply throw up their hands & uninstall yr f- nurdware over this one single issue? Not to bore you with details, but I'm hardly unsympathetic to open sources that don't look like the best argument for Micros**t and Google hegemony.
Btw, I said they get it -almost- right... It would be really nice if IE or >somebody< offered a checkbox to NEVER close multiple tabs. Look, if this bug disguised as a feature is useful to a few nurds by all means keep it as an advanced option, but PLEASE set up FireFox so it at least defaults to the real world.
Maybe you are looking for
-
Hello, I have an issue with connecting client SB1H on Windows, the scenario is as follows: 1.- Server: Suse Linux Enterprise Server 11.3 kernel version: 3.0.76-0.11 IBM NDB and Server are review 69 SP06 2.- Client: Windows 8 Pro Virtua
-
Approval Work Item still appears in inbox after approval
Hello, We have an issue in SRM 7.0 UWL when an approval work item at a specific level finds more than 1 approver. 1) When there is more than 1 agent at a specifc approval level, after the item is approved the work item still stays in the Inbox of the
-
Dynamic file naming for 820 outbound transaction
Hi All, We have a requirement to set the file name of outbound 820 based on few fields of xml payload from the backend BPEL process. We are currently implementing batching by sending the action name in (jca.jms.JMSProperty.ACTION_NAME) property.We ar
-
How to extract the image field content?
Hi, experts I placed an image fields on an interactive form , user can upload jpg file into this field. Could you pls tell me how to extract that using programming languages with the help of XML DOM? I built a sample program that can retrive the cont
-
Calculated Date Range in Lookup Column
I want to have a lookup column on a list called Report Week. The report week is a date range between Sun and Sat. I could easily make a column of ranges in a seperate list and then use it as a lookup but I am hoping for something more elegant. Wha