Strange events with examples from the book to Tom Kyte. 10 XE

'


Hi all

I was twiddling my thumbs and decided to revisit some of the fundamentals of Oracle.

Book of Tom Kyte - Effective Oracle of design. Examples on p. 141-142 (to do with
bind variables). Typed in the example and got a reaction very strange system.

It consists of a 'DEMO_141_PKG' package with 1 procedure 'parse_bind_execute_close '.
that is called by the QUICKFIX142 procedure. The system then proceeds to go mental.

If someone could explain to me what is happening, I would be grateful. I'm under 10 XE on
Ubuntu Linux.


On the execution of the code (below), I get this in the "Run" window of SQLDeveloper.
Connecting to the database demo.
ORA-01000: maximum open cursors exceeded
ORA-06512: at "SYS.DBMS_SYS_SQL", line 884
ORA-06512: at "SYS.DBMS_SQL", line 9
ORA-06512: at "DEMO.DEMO_141_PKG", line 17
ORA-06512: at "DEMO.QUICKFIX142", line 8
ORA-06512: at line 2
And the window just a continuous record of SQLDevloper watch
flow of the text below - I have to kill the sessions as a SYS of
within Oracle - the process Terminate of SQLDeveloper
fails to kill this runaway process.

Record output
SEVERE     2474100     1     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded
SEVERE     2474099     1     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded
SEVERE     2474098     0     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded
SEVERE     2474097     0     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded
SEVERE     2474096     1     oracle.dbtools.raptor.runner.DBStarterFactory     logDbmsOutput: ORA-01000: maximum open cursors exceeded

<Millions of lines snipped - it just keeps going>
Now, the code is here for those who would like to help me get to the bottom of this phenomenon.

create or replace
PACKAGE DEMO_141_PKG AS 

procedure parse_bind_execute_close(p_input in varchar2);

END DEMO_141_PKG;

create or replace
PACKAGE BODY DEMO_141_PKG AS
  g_first_time boolean := TRUE;
  g_cursor number;

procedure parse_bind_execute_close(p_input in varchar2) 
AS
  l_cursor number;
  l_output varchar2(4000);
  l_status number;
BEGIN
  l_cursor := dbms_sql.open_cursor;
  dbms_sql.parse(l_cursor, 'SELECT * FROM Dual WHERE Dummy = :x', dbms_sql.native);
  dbms_sql.bind_variable(l_cursor, ':x', p_input);
  dbms_sql.define_column(l_cursor, 1, l_output, 4000);
  l_status := dbms_sql.execute(l_cursor);
  if(dbms_sql.fetch_rows(l_cursor) <= 0)
  then
    l_output := null;
  else
    dbms_sql.column_value(l_cursor, 1, l_output);
  end if;
END parse_bind_execute_close;
END DEMO_141_PKG;
and the above is called here

create or replace
PROCEDURE QUICKFIX142 AS 
BEGIN

 -- demo.runstats_pkg.rs_start; // Don't worry about  runstats - it's a Tom Kyte package for 
-- timings and measuring contention.
  execute immediate 'alter session set session_cached_cursors = 0';
  for i in 1..1000
  loop
    DEMO_141_PKG.parse_bind_execute_close('Y');
  end loop;
 -- runstats_pkg.rs_middle;
  execute immediate 'alter session set session_cached_cursors = 100';  // reduced this to 50, 20, 10 & 5 - no effect.
  for i in 1..1000
  loop
    DEMO_141_PKG.parse_bind_execute_close('Y');
  end loop;
 -- runstats_pkg.rs_stop;

END QUICKFIX142;
Published by: Paulie August 12, 2011 14:18

If you modify the called package by adding:

  -- CLOSE THE CURSOR
  dbms_sql.close_cursor(l_cursor);

in

procedure parse_bind_execute_close(p_input in varchar2)
AS
  l_cursor number;
  l_output varchar2(4000);
  l_status number;
BEGIN
  l_cursor := dbms_sql.open_cursor;
  dbms_sql.parse(l_cursor, 'SELECT * FROM Dual WHERE Dummy = :x', dbms_sql.native);
  dbms_sql.bind_variable(l_cursor, ':x', p_input);
  dbms_sql.define_column(l_cursor, 1, l_output, 4000);
  l_status := dbms_sql.execute(l_cursor);
  if(dbms_sql.fetch_rows(l_cursor) <= 0)
  then
    l_output := null;
  else
    dbms_sql.column_value(l_cursor, 1, l_output);
  end if;
  -- CLOSE THE CURSOR
  dbms_sql.close_cursor(l_cursor);
END parse_bind_execute_close;
END DEMO_141_PKG;

Then the script runs with the default OPEN_CURSORS parameter:

SQL> connect / as sysdba
Connected.
SQL> show parameter open_c

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
open_cursors                         integer     300
SQL> connect test/test
Connected.
SQL> exec quickfix142;

PL/SQL procedure successfully completed.

Tags: Database

Similar Questions

  • Strange problem with measurement of the color under Mac.

    Hello, I have a strange problem with measurement of the color under Mac. For example I create a gradient in Photoshop color 200 200 200 color 240 240 240. When I measure the color of the gradient with the Photoshop color measurement tool or with the built in OS X color measurement tool measured color is of 200 199 197 to 240 240 238. I measured the same gradient with Photoshop for PC and the values are OK (the same values that I create).

    I don't know what the problem is, but I think that the colors that I create are the same I have measure after creating them and also values between Mac and PC. I appreciate much help or information you could give me that helps me understand what is happening here.

    Thank you for your time

    Marcelo.

    Yep, you guessed it, evidence as monitor basically removes all profiling and just offer it right.

    is it possible to make the OS X color measurement tool to measure the original color values

    You mean the colors of paper - No., as I said photoshop filter your image through the profile document, proof of installation and the monitor profile. Why use Digital color meter for this though?

    I don't understand what is measurement of color values that will change every time point calibrate it my monitor.

    Because color values are "larger" what is on your monitor. Your monitor (via photoshop) makes only the best he can to display these values, which can be anything from LAB colors outside the range of your monitor - to the CMYK color. Calibration, it is the only way to allow your monitor to do this in any way accurately. (never really impossible) The monitors have a certain range and are only representations / would the REAL colors who is the holder of a document, with a profile. There's only one good reason to measure the monitor values so that is to build a monitor profile.

  • I have a large collection of big slideshows in iPhoto, created over the years with captions from the titles of the photos. How can I keep these slide shows subtitled in Photos?

    I have a large collection of big slideshows in iPhoto, created over the years with captions from the titles of the photos. How can I keep these slide shows subtitled in Photos?

    You can't keep slideshows as captioned photos.  Slide shows get migrated in the form of albums for the Group of photos is maintained.  But Photos don't have the ability to add descriptions to the slide show so that they would have to be manually added to each slide automatically.

    However, a possible solution would be to export every slide show in iPhoto as a Quicktime movie file. Which will keep the titles and descriptions on each slide.  The resulting QT files can be imported into the iPhoto library before migration or photo library after.

  • Why past events are removed from the calendar

    Why past events are removed from the calendar?

    Klassical,

    Check the settings > Mail, Contacts, calendars > calendars > synchronization > select your condition for the retention of the event.

  • Strange problem after moving from the virtual computer to a new data store

    I am migrating our VM existing (8 in total) a 'problem' RAID to a new table on a new controller and am having a strange problem. Here are the steps I took (host OS is Ubuntu 8.0.4 LTS x 64):

    (1) off the power the virtual computer from the Web interface

    (2) the directories created for each virtual on the new RAID array computer (in this case a RAID 10 array on LSI 9750-8i controller)

    (3) rSync used to copy the data from RAID1 to be RAID2

    4) has created a new data store on the new RAID through the Web Server of VMWare user interface.

    (5) removed VM of the inventory through the Web, their return, added user interface then choose files .vmx on new data store on RAID2

    They have all power save fine... but three of them are not accessible on the network. I can open a console in the Web Server of VMWare user interface and they all run normally... but I can't their ping or access the respective virtual machine Web GUI. It seems quite arbitrary that those who work and those who are not. In this case... the VM that don't work is a license Autodesk, a Squid proxy server and a VM of cactus. All three of these virtual machines are 32-bit Ubuntu Server VM (two 8.0.4 and a 10.0.4)... and are the only Ubuntu VM on this host. It must be signifigant but I'm not see how.

    If I delete these three virtual machines of the inventory again and add to their original location (on the RAID1) they light up AND work normally. A consultant that we were working seemed surprised, as he had also done this experiment with some of the older VMWare products. I don't see how it would be the physical location of the files of the virtual machine. Any ideas?

    We rely on the migration to ESXi soon but in the meantime, we get these a few VM out of this RAID array problem. I'm stuck.

    Depending on the application, it may be enough to reconfigure the IP parameters (they are very probably on DHCP now) for the newly detected virtual NIC.

    André

  • No key event is generated from mac book pro trackpad

    I'm developing an application in javafx multiltouch on mac, but no key event was taken by the Manager using the trackpad. Event handlers are added to the scene.

    I use JDK1.7.0_07.

    Someone has an idea.

    Thank you.

    I don't think it will work. The javadocs for the TouchEvent explicitly state

    "Touch event indicates a touchscreen action."

    The trackpad isn't a touch screen.

    The trackpad will generate GestureEvents. Once again, since the javadocs:

    "Actions are usually caused by direct (touch screen) or indirect (track pad) touch events."

    If you can handle things like ScrollEvent, RotateEvent and ZoomEvent. I think that the mapping between the physical gestures on the trackpad and semantic events is managed by the operating system (if the behaviour could change if the user changes the settings for trackpad in system preferences, for example). It doesn't look like it will answer to your needs, but maybe...

    I don't know if there is another way to interact with the trackpad (someone else surely will).

    Here is a simple way to see which events are generated (it will generate a lot of output).

    import javafx.application.Application;
    import javafx.event.EventHandler;
    import javafx.scene.Scene;
    import javafx.scene.input.InputEvent;
    import javafx.scene.layout.AnchorPane;
    import javafx.stage.Stage;
    
    public class TouchTest extends Application {
    
      @Override
      public void start(Stage primaryStage) throws Exception {
        Scene scene = new Scene(new AnchorPane(), 400,400);
        scene.addEventHandler(InputEvent.ANY, new EventHandler() {
          @Override
          public void handle(InputEvent event) {
            System.out.println(event.getEventType().getName());
          }
        });
        primaryStage.setScene(scene);
        primaryStage.sizeToScene();
        primaryStage.show();
      }
    
      public static void main(String[] args) {
        launch(args);
      }
    
    }
    
  • How to combine files from the book in a single file-IND

    Hello

    I'm doing an InDesign file from the files in a book.

    I know the option book export to PDF, but I want is something like:

    Add bookfile pages 1 to a new document.

    then add the pages of bookfile 2 in this new document (at the end)

    then add bookfile pages 3 to this new document (at the end)

    until all pages of all bookfiles are combined into a single document.

    I will not place the pages (which makes them any pages and images).

    Is this possible? [Windows - Javascript platform]

    Is what I figured (as a non-programmer)

    to open the bookfile

    (var app.open(File("/c/Bookname.indb = myDocument"), false);

    use a counter for the number of bookfiles in the book

    for (i = 0; i < myDocument.bookContents.count (); i ++)

    {

    to retrieve the name of the bookfile

    var myINDFile = myDocument.bookContents.item (i) .fullName;

    }

    Theres a move command under menu panels Pages Pages. With it you can move pages also between documents... may be you can use programmatically too? In the InDesign Scripting forum guys know better, although some of them reads this forum too...

  • Strange behavior when searching from the address bar

    Hi all! I tried to remove google as the default search provider in firefox. To do this, I did these two things-

    -Duckduckgo moved to the top of the list in the firefox search box and set it as the current research.

    -Put the URL 'https://duckduckgo.com/?q=' keyword and keyword.enabled to true.

    However, this makes my search from the location bar (single word and several Word channels) still return google.

    There seems to be something to do with the entry of google search into the firefox search bar. If I remove that, it behaves as expected - single word searches then return an error "Cannot find server" (not quite what I wanted but probably correct behavior) and several Word searches go to Duckduckgo.

    Any suggestions on how to solve this problem without removing the option of completely google search would be appreciated.

    Thanks in advance

    It is supposed to function as described in this article, it seems that you have followed: search bar location | How | Firefox Help. I see no reason for the presence or absence of a plugin of search engine related. You have additional modules that could touch location bar behavior?

    You can try this: create a clean profile Firefox. Which will work around the current modules and custom, settings have fresh data bases of fresh settings and a cache folder.

    Close Firefox and starts in the Profile Manager, as described in the management profiles. Any time want spending profiles, close Firefox and come back to this dialog box.

    Change your keyword preferences and see if they work in the new profile. A little luck?

  • When a user event is removed from the register?

    Howdy-

    Guys, I think I'm everything just to understand something about the events user here, but I could use a little help.  In short, I need to make sure that many consumers respond to an event, even if the event was triggered before certain Structures of the consumers' event begin to run.  Attached, are all permutations of the basic idea I could think.  I know that 'Box 5' is guaranteed to work if I create individual registers before the event is raised, but it bothers me that I do not understand exactly why "case 4" does not work, then all the others do.  My initial understanding of the registration of a user event had me thinking that 'Case 4' and ' box 3 "would be the same... i. e, one of the Structures removes the event from the registry, leaving others looking at an empty queue."»  Why "Case 4" is the only one that does not?

    There are two separate issues. The first is that you have a race condition. There is no guarantee that the registration will happen before the event is generated (although probably the trigger is the change in the value of the control, and it takes you a lot of time to press the button). The code should be amended so that the recording happens before.

    The second issue is that you use the same event record refnum for two structures of the event. It is an easy mistake to make, but it is also a very large. A refnum enrollment event should NEVER NEVER NEVER at more than one structure of the event. If so, you'll find yourself running in all sorts of weird bugs (like the one you see where something that apparently should not affect their behaviour affects them). There is a warnings section in the help of LV who talks about it, but it is easy to miss and not as explicit as I am.

    The correct way to proceed is to have two separate record nodes.

  • Payment options (payment with invoice from the vendor) blackBerry Smartphones

    Hallo,

    I have a problem paying applications out of the BBWorld with the invoice from the vendor.

    We need this payment option to satisfy the finacial controller. The Don t want to pay with paypal or a credit card.

    Now, I tourned the payment for payment with the invoice from the vendor. But when I try to buy an app with my smartphone provided payment options are only credit card and paypal.

    If I try to buy an app on the store of the computer, I have the smartphone-button. I have activity button and nothing arrived except the change of color of the activation button.

    Could someone tell me how I could buy some applications with the payment provider. ?

    You mean carrier billing? Contact your carrier if they support this feaure.

  • Using an image with transparency in the book module and keep the transparency?

    Hello.

    Let's see if I can explain my question, I'm not an experienced LR or PS user (and not in the English language)

    I changed an image in PS and cut out a part of it and pasted into a new layer and then adjust the opacity of the background at 0%.

    Then I saved the picture in PSD format and imported to LR to be used in ledger. When I then use the peak and attached to the photo book have a white background.

    What I want is that only the cutting part appears in the book and the rest of the area of the image is in the same color as the color of the pages (in my case clear yellow).

    Is it possible to do what I want to do and if it is, how?

    Shovelc wrote:

    What I want is that only the cutting part appears in the book and the rest of the area of the image is in the same color as the color of the pages (in my case clear yellow).

    Is it possible to do what I want to do and if it is, how?

    You should be able to do this by building the PSD file layer of the same color as background color LR ledger. The key to making this work correctly is by matching the two background colors. In the book LR module background panels 'Background color' color picker icon, right-click in the color selector box, click on select HSB. In the PS use fill and set the background color using the STL values inside the book LR module. Color space ProPhoto RGB native of LR in PS helps prevent the background color to move within LR.

    Example for 59, 16, 93 HSB

  • Download a book (from the book module) on the web module

    Hello!

    I just finished my first wedding album in the module of Lightroom 4 book (yay!), now I would like to be able to download the book via the web module so that my clients can approve, but when I move the web module, it seems only to download individual images - not page layouts.

    Is there a work around?

    Thank you!

    Ellen

    In Acrobat Pro, look at the file > properties > initial view. Like many things, it depends on your needs and preferences, but I feel a more similar books experience works best upon approval of a layout of book, and with some customers, it is preferable to locking down, just in case things. You can still export the JPEG images later.

  • * With examples (script), the script calculation commands *.

    Dear Guru,

    I'm new recruit in Essbase.

    I am easily understand Essbase calculation scripts except. Recently, I've studied Essbase Ser60 Pdf. But I need scripts of calculation with examples (with scenario) to understand easily.

    any suggestions would be very helpful.

    Thanks in advance.

    Do a search through this forum and the Essbase54, you see a lot of examples, or just start to scroll back posts.

    Also begin to develop some tests on your own, the best way to learn is to try.

  • Best way to deal with pictures from the start? (Bridge CS5 and iPhoto)

    Hi all

    I am just learning the strings of all the suite CS5 and began to add keywords etc in bridge, when I realized that I couldn't access the files in my iPhoto library ('09). I read a few threads on this topic, but have not really found a consensus on how to deal with it.

    I think I'm in a good position to get things right from the start, because I have no tags or sides etc. in my configuration of iPhoto (and only add keywords for the few photos that weren't in my iPhoto library), and wonder what you think is the best way to sort photos given I intend to use them in web design etc. and all the parts of my suite CS5.

    If the photos in iPhoto is the best what is the best way to do it? I have read suggestions do a right-click on the library and click "Show content" - or something like cela, but that does not come up as an option when I right click my iPhoto in Bridge library. Thanks a lot for your help!

    Please let me know if there is any info I could give you that could be useful in order to understand this one.

    Best,

    Mara

    PS: for the temporary folder, I use a name like to-do Images

    Remember once the keywords are used is not just the manipulation/image adjustments which are important metadata but also robust observation with integrity

  • Recomposable EPUB from the book (indb) file

    Is it possible to export a file cc indesign book (indb) composed of several indd files a recomposable epub? The only option available on the menu drop-down of the book panel is «Export the book to epub...» "makes a fixed provision epub only. There is no option that I can find on the Panel book to export as a recomposable epub. And because it is a book, not a file individual indd, in the main file menu export option is grayed out. FYI, I can create a PDF and a static epub ebook, but I don't see any options for a recomposable epub.

    There is an option for EPUB (reflowable) just below EPUB (fixed provision). InDesign displays by default the last of them, that you used.

Maybe you are looking for

  • Re: Equium - A300D - 13 X switch?

    After leaving my old Equium A300D-13 X 14 months on charges he now will power? Laptop was fine except for the usual switch overheating. He took off dial-up as usual, allow it to charge for 3-4 hours and now no response from the power switch Have you

  • PCV-RZ54G which is used for ATI display driver

    What is the computer display in PCV-RZ54G ATI driver using the XP media center operating system. Please e-mail me at **********@*********.net Thank you

  • New LCD Panel

    Hello. Following these instructions , I tried to change the display of my X 201. I did notice something special when taking apart, but when I tried to see if the new display worked there do not have. Then I tried with my old screen, but that didn't w

  • Center Solutions HP stop working all that I get is a black screen

    I have a HP Photosmart D 110 series, when I open the HP Solution Center, all I get is a screen black with a symbol of HP on this issue I tried to reload with the same results.

  • Browse through the pages

    Hello I'm creating a native application that has a list of items. When an item is selected, navigates to a particular page. I could not navigate to another page. Please help me with the code to navigate through the pages. Here is my code. import bb.c