INCOMPLETE CURSOR

Can someone help me to desgin a test case to simulate V$SQL_SHARED_CURSOR.INCOMPLETE_CURSOR issue? In my production database i am having high version count due to incomplete_cursor.
Looking for help.
Regards,
ajisutr
Edited by: Rajib Sutradhar on Oct 31, 2011 12:51 PM

If you look for help don't SHOUT the subject.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Delivery Incompletion procedure  - CustomTAB - Cursor control

    We have defined a new tab in delivery at item level and we have some
    custom fields on that new screen.
    This new screen is working ok.
    We also have made one of this new field as part of our incompletion
    procedure. 
    Scenario is like this:
    1. We do not fill in the value for this field.
    2. We check incompletion procedure.
    3. Incompletion procedure has an entry in the log.
    4. We select that item and click on edit data.
    5. Now SAP takes us to this new tab.
    6. But SAP is not positioning the cursor in the right field
    It always positions on the first field on this new tab.
    Looking for some tips here.
    Thanks
    Satya

    Hi,
    From what I understand the Incompletion procedure works fine.
    As far as the position of cursor is concerned,this is the Standard behaviour in most of the SAP screens and the cursor in not always positioned in the exact field where the data needs to be entered.
    This behaviour you could notice irrespective of custom or standard fields.
    Hope this helps.

  • Using a Variable for Table Name  with a cursor

    Hello All
    Is it possible to use a Parameter passed to a procedure as the table name
    in a cursor selection statment. I thought the below would work but I get
    a error. Does anyone have any ideas?? The Error is listed below to.
    Here's the code I just complied
    CREATE OR REPLACE PROCEDURE Dup_Add(NEWQATABLE IN VARCHAR2) IS
    CURSOR c1 IS SELECT MUNI,PROV FROM NEWQATABLE GROUP BY MUNI, PROV;
    c1rec c1%ROWTYPE;
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 INTO c1rec;
    EXIT WHEN c1%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(c1rec.MUNI);
    END LOOP;
    CLOSE c1;
    END;
    Here is the errors
    LINE/COL ERROR
    3/8 PLS-00341: declaration of cursor 'C1' is incomplete or malformed
    3/15 PL/SQL: SQL Statement ignored
    3/38 PLS-00201: identifier 'NEWQATABLE' must be declared
    5/7 PL/SQL: Item ignored
    10/3 PL/SQL: SQL Statement ignored
    10/17 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    12/3 PL/SQL: Statement ignored
    12/24 PLS-00320: the declaration of the type of this expression is
    incomplete or malformed
    LINE/COL ERROR
    Thanks
    Peter

    If you are going to have a table name or a column name as a parameter, then you have to open the cursor dynamically. The following example uses Native Dynamic SQL (NDS) to open a ref cursor dynamically. I also eliminated the group by clause, since it is intended for use with aggregate functions and you weren't using an aggregate function. Also notice that there are some other differences in terms of defining variables and fetching and so forth.
    SQL> CREATE TABLE test_table
      2  AS
      3  SELECT deptno AS muni,
      4         dname  AS prov
      5  FROM   dept
      6  /
    Table created.
    SQL> CREATE OR REPLACE PROCEDURE Dup_Add
      2    (newqatable IN VARCHAR2)
      3  IS
      4    TYPE cursor_type IS REF CURSOR;
      5    c1 cursor_type;
      6    c1muni NUMBER;
      7    c1prov VARCHAR2 (20);
      8  BEGIN
      9    OPEN c1 FOR 'SELECT muni, prov FROM ' || newqatable;
    10    LOOP
    11      FETCH c1 INTO c1muni, c1prov;
    12      EXIT WHEN c1%NOTFOUND;
    13      DBMS_OUTPUT.PUT_LINE (c1muni || ' ' || c1prov);
    14    END LOOP;
    15    CLOSE c1;
    16  END;
    17  /
    Procedure created.
    SQL> SHOW ERRORS
    No errors.
    SQL> SET SERVEROUTPUT ON
    SQL> EXECUTE dup_add ('test_table')
    10 ACCOUNTING
    20 RESEARCH
    30 SALES
    40 OPERATIONS
    PL/SQL procedure successfully completed.

  • Using SLiM, dmenu's path is incomplete

    Due to an issue with the proprietary NVidia drivers causing the virtual consoles to go blank on my graphics card, I need to use a graphical login manager. I've decided on SLiM, however, I have one issue: When I login with SLiM (into XMonad or DWM), applications such as dmenu and GMrun don't detect the path additions that are set in my ~/.bashrc, so I can't use dmenu to launch any of the applications in ~/bin or ~/.cabal/bin. For instance, from urxvt, my path is as follows:
    /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl:/home/drkp/.cabal/bin:/home/drkp/bin
    If I "echo $PATH > somefile" from dmenu, it's:
    /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl
    What can I do to fix this bevavior?
    My /etc/slim.conf (the commented-out login command also doesn't work):
    # Path, X server and arguments (if needed)
    # Note: -xauth $authfile is automatically appended
    default_path /bin:/usr/bin:/usr/local/bin
    default_xserver /usr/bin/X
    xserver_arguments -nolisten tcp vt07
    # Commands for halt, login, etc.
    halt_cmd /sbin/shutdown -h now
    reboot_cmd /sbin/shutdown -r now
    console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
    #suspend_cmd /usr/sbin/suspend
    # Full path to the xauth binary
    xauth_path /usr/bin/xauth
    # Xauth file for server
    authfile /var/run/slim.auth
    # Activate numlock when slim starts. Valid values: on|off
    # numlock on
    # Hide the mouse cursor (note: does not work with some WMs).
    # Valid values: true|false
    # hidecursor false
    # Set cursor to left pointer
    cursor left_ptr
    # This command is executed after a succesful login.
    # you can place the %session and %theme variables
    # to handle launching of specific commands in .xinitrc
    # depending of chosen session and slim theme
    # NOTE: if your system does not have bash you need
    # to adjust the command according to your preferred shell,
    # i.e. for freebsd use:
    # login_cmd exec /bin/sh - ~/.xinitrc %session
    login_cmd exec /bin/bash -login ~/.xinitrc %session > ~/.xerr 2>&1
    # Commands executed when starting and exiting a session.
    # They can be used for registering a X11 session with
    # sessreg. You can use the %user variable
    # sessionstart_cmd some command
    # sessionstop_cmd some command
    # Start in daemon mode. Valid values: yes | no
    # Note that this can be overriden by the command line
    # options "-d" and "-nodaemon"
    # daemon yes
    # Available sessions (first one is the default).
    # The current chosen session name is replaced in the login_cmd
    # above, so your login command can handle different sessions.
    # see the xinitrc.sample file shipped with slim sources
    sessions xmonad,dwm
    # Executed when pressing F11 (requires imagemagick)
    screenshot_cmd import -window root /slim.png
    # welcome message. Available variables: %host, %domain
    welcome_msg Welcome to %host
    # Session message. Prepended to the session name when pressing F1
    # session_msg Session:
    # shutdown / reboot messages
    shutdown_msg The system is halting...
    reboot_msg The system is rebooting...
    # default user, leave blank or remove this line
    # for avoid pre-loading the username.
    default_user drkp
    # Focus the password field on start when default_user is set
    # Set to "yes" to enable this feature
    focus_password yes
    # Automatically login the default user (without entering
    # the password. Set to "yes" to enable this feature
    #auto_login no
    # current theme, use comma separated list to specify a set to
    # randomly choose from
    current_theme archlinux-soft-grey
    # Lock file
    lockfile /var/lock/slim.lock
    # Log file
    logfile /var/log/slim.log
    My .bashrc:
    # ~/.bashrc
    # If not running interactively, don't do anything
    [[ $- != *i* ]] && return
    # Aliases
    if [ -f ~/.bash_aliases ]; then
    source ~/.bash_aliases
    fi
    # Misc
    eval $(dircolors -b) # Enhance colored ls output
    export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
    export LESS="-R" # Allow colored less output
    export EDITOR=vim # Vim as default text editor
    export ESCDELAY=1 # Ncurses escape delay
    # Path
    export PATH="$PATH:$HOME/.cabal/bin"
    export PATH="$PATH:$HOME/bin"
    # Prompt
    PS1='\[\e[1;34m\][\T] \[\e[0;33m\][\w] \[\e[0;31m\]$\[\e[0m\] '
    Last edited by DrKillPatient (2012-09-01 17:07:50)

    RAD version is 6.0.1.1
    "The project was not built since its build path is incomplete."This is obviously an IBM RAD question then.
    See if you can find an IBM RAD forum.
    I need this help urgently as I am stuck up.LOL.

  • Help on CAST function, defining TYPE TABLE and using a REF cursor

    Hi,
    I have written a procedure (lookup) inside a package (lookup_pkg) as shown below.
    Procedure has an output variable of type PL/SQL TABLE which is defined in the package.
    I want to write a wrapper procedure lookupref to the procedure lookup to return a ref cursor.
    CREATE OR REPLACE PACKAGE lookup_pkg AS
    TYPE t_lookup_refcur IS REF CURSOR;
    CURSOR c_lookup IS
         Select columns1,2,3,....100
                   FROM A, B, C, D, E
                   WHERE ROWNUM < 1;
    TYPE t_lookup IS TABLE OF c_lookup%ROWTYPE;
    Procedure lookup(id Number, o_lookup OUT t_lookup);
    End lookup_pkg;
    CREATE OR REPLACE PACKAGE BODY lookup_pkg As
    Procedure lookup(id Number, o_lookup OUT t_lookup) IS
    BEGIN
    END lookup;
    Procedure lookupref(id Number, o_lookupref OUT t_lookup_refcur) IS
    o_lookup t_lookup;
    BEGIN
    lookup(id, o_lookup t_lookup);
    OPEN t_lookup_refcur FOR
    SELECT *
         FROM TABLE(CAST(o_lookup AS t_lookup));
    Exception
    End lookupref;
    END lookup_pkg;
    When I compile this procedure, I am getting invalid datatype Oracle error and
    cursor points the datatype t_lookup in the CAST function.
    1. Can anyone tell me what is wrong in this. Can I convert a PL/SQL collection (pl/sql table in this case) to PL/SQL datatype table or does it need to be a SQL datatype only (which is created as a type in database).
    Also, to resolve this error, I have created a SQL type and table type instead of PL/SQL table in the package as shown below.
    create or replace type t_lookuprec as object
                   (Select columns1,2,3,....100
                   FROM A, B, C, D, E
                   WHERE ROWNUM < 1);
    create or replace type t_lookup_tab AS table of t_lookuprec;
    CREATE OR REPLACE PACKAGE BODY lookup_pkg As
    Procedure lookup(id Number, o_lookup OUT t_lookup) IS
    BEGIN
    END lookup;
    Procedure lookupref(id Number, o_lookupref OUT t_lookup_refcur) IS
    o_lookup t_lookup;
    BEGIN
    lookup(id, o_lookup t_lookup);
    OPEN t_lookup_refcur FOR
    SELECT *
         FROM TABLE(CAST(o_lookup AS t_lookup_tab));
    Exception
    End lookupref;
    END lookup_pkg;
    When I compile this package, I am getting "PL/SQL: ORA-22800: invalid user-defined type" Oracle error and
    points the datatype t_lookup_tab in the CAST function.
    2. Can anyone tell me what is wrong. Can I create a type with a select statement and create a table type using type created earlier?
    I have checked the all_types view and found that
    value for Incomplete column for these two types are YES.
    3. What does that mean?
    Any suggestions and help is appreciated.
    Thanks
    Srinivas

    create or replace type t_lookuprec as object
    (Select columns1,2,3,....100
    FROM A, B, C, D, E
    WHERE ROWNUM < 1);You are correct that you need to use CREATE TYPE to use the type in SQL.
    However unless I am mistaken you appear to have invented your own syntax for CREATE TYPE, suggest you refer to Oracle documentation.

  • Cursor: pin S 事件导致系统性能严重下降

    环境:db:10.2.0.4.0 system:hp-ux 11.31
    近期系统在访问高峰时,性能严重下降,分析awr得到信息为
    Elapsed:          60.20 (mins)          
    DB Time:          1,916.95 (mins)     系统负担非常严重
    Library Hit %:     99.60     Soft Parse %:     99.44
    Execute to Parse %:     -22.89 重解析现象很严重
    Event     Waits     Time(s)     Avg Wait(ms)     % Total Call Time     Wait Class
    CPU time          26,661          23.2     
    cursor: pin S     5,346,339     11,727     2     10.2     Other
    latch: cache buffers chains     25,963     5,205     200     4.5     Concurrency
    db file scattered read     710,601     2,698     4     2.3     User I/O
    latch: library cache     6,743     2,087     309     1.8     Concurrenc
    cursor: pin S事件为等待时间第一, 一般判读为系统并发sql语句过多,由于没有之前正常状态的awr报告作为对比,所以对于这个系统问题的根源和解决办法不是很清楚,对于应用方面,减少并发sql语句,绑定变量等,在数据库方面调整ession_cached_cursors参数,增加sharepool空间,由于水平有限只能知道这么多,希望得到更加深入的分析。谢谢
    附部分awr(如何上传完整报告?)WORKLOAD REPOSITORY report for
    DB Name     DB Id     Instance     Inst num     Release     RAC     Host
    ORCL     1183953527     orcl     1     10.2.0.4.0     NO     HP-UX-1
    Snap Id     Snap Time     Sessions     Cursors/Session
    Begin Snap:     36825     14-8ÔÂ -12 09:00:16     1426      1.5
    End Snap:     36826     14-8ÔÂ -12 10:00:29     1630      1.4
    Elapsed:            60.20 (mins)           
    DB Time:            1,916.95 (mins)           
    Report Summary
    Cache Sizes
    Begin     End          
    Buffer Cache:      9,216M      9,216M     Std Block Size:      8K
    Shared Pool Size:      6,144M      6,144M     Log Buffer:      14,348K
    Load Profile
    Per Second     Per Transaction
    Redo size:      85,077.91      5,632.74
    Logical reads:      323,798.90      21,437.69
    Block changes:      489.98      32.44
    Physical reads:      4,190.38      277.43
    Physical writes:      36.21      2.40
    User calls:      7,273.13      481.53
    Parses:      1,499.45      99.27
    Hard parses:      8.39      0.56
    Sorts:      150.73      9.98
    Logons:      1.72      0.11
    Executes:      1,220.19      80.78
    Transactions:      15.10     
    % Blocks changed per Read:      0.15     Recursive Call %:      9.01
    Rollback per transaction %:      12.68     Rows per Sort:      118.78
    Instance Efficiency Percentages (Target 100%)
    Buffer Nowait %:      99.99     Redo NoWait %:      99.99
    Buffer Hit %:      98.71     In-memory Sort %:      100.00
    Library Hit %:      99.60     Soft Parse %:      99.44
    Execute to Parse %:      -22.89     Latch Hit %:      99.95
    Parse CPU to Parse Elapsd %:      6.61     % Non-Parse CPU:      94.79
    Shared Pool Statistics
    Begin     End
    Memory Usage %:      92.12      92.19
    % SQL with executions>1:      90.33      87.07
    % Memory for SQL w/exec>1:      90.37      88.32
    Top 5 Timed Events
    Event     Waits     Time(s)     Avg Wait(ms)     % Total Call Time     Wait Class
    CPU time            26,661            23.2     
    cursor: pin S      5,346,339      11,727      2      10.2     Other
    latch: cache buffers chains      25,963      5,205      200      4.5     Concurrency
    db file scattered read      710,601      2,698      4      2.3     User I/O
    latch: library cache      6,743      2,087      309      1.8     Concurrency
    Time Model Statistics
    Total time in database user-calls (DB Time): 115017.1s
    Statistics including the word "background" measure background process time, and so do not contribute to the DB time statistic
    Ordered by % or DB time desc, Statistic name
    Statistic Name     Time (s)     % of DB Time
    sql execute elapsed time     89,472.10     77.79
    DB CPU     26,660.94     23.18
    parse time elapsed     20,759.09     18.05
    PL/SQL execution elapsed time     322.11     0.28
    hard parse elapsed time     256.97     0.22
    connection management call elapsed time     90.04     0.08
    failed parse elapsed time     44.23     0.04
    hard parse (sharing criteria) elapsed time     27.70     0.02
    sequence load elapsed time     13.43     0.01
    PL/SQL compilation elapsed time     10.03     0.01
    hard parse (bind mismatch) elapsed time     2.82     0.00
    repeated bind elapsed time     0.10     0.00
    inbound PL/SQL rpc elapsed time     0.05     0.00
    DB time     115,017.09     
    background elapsed time     451.46     
    background cpu time     47.64     
    Back to Wait Events Statistics
    Back to Top
    Wait Class
    s - second
    cs - centisecond - 100th of a second
    ms - millisecond - 1000th of a second
    us - microsecond - 1000000th of a second
    ordered by wait time desc, waits desc
    Wait Class     Waits     %Time -outs     Total Wait Time (s)     Avg wait (ms)     Waits /txn
    Other     5,359,517     0.06     12,985     2     98.23
    Concurrency     41,787     7.97     7,899     189     0.77
    User I/O     1,541,553     0.00     4,385     3     28.25
    Network     28,263,892     0.00     515     0     518.03
    Commit     31,974     1.02     489     15     0.59
    Application     7,028     1.04     232     33     0.13
    System I/O     41,367     0.00     118     3     0.76
    Configuration     48     0.00     8     177     0.00
    Back to Wait Events Statistics
    Back to Top
    Wait Events
    s - second
    cs - centisecond - 100th of a second
    ms - millisecond - 1000th of a second
    us - microsecond - 1000000th of a second
    ordered by wait time desc, waits desc (idle events last)
    Event     Waits     %Time -outs     Total Wait Time (s)     Avg wait (ms)     Waits /txn
    cursor: pin S     5,346,339     0.00     11,727     2     97.99
    latch: cache buffers chains     25,963     0.00     5,205     200     0.48
    db file scattered read     710,601     0.00     2,698     4     13.02
    latch: library cache     6,743     0.00     2,087     309     0.12
    db file sequential read     657,512     0.00     1,191     2     12.05
    latch free     7,839     0.10     973     124     0.14
    read by other session     153,818     0.04     489     3     2.82
    log file sync     31,974     1.02     489     15     0.59
    SQL*Net more data to client     2,454,333     0.00     308     0     44.98
    enq: TX - row lock contention     82     89.02     227     2762     0.00
    latch: library cache lock     968     0.00     211     218     0.02
    latch: session allocation     1,369     0.00     196     143     0.03
    latch: shared pool     1,801     0.00     177     98     0.03
    SQL*Net message to client     25,709,776     0.00     130     0     471.22
    latch: row cache objects     2,772     0.00     113     41     0.05
    log file parallel write     33,654     0.00     105     3     0.62
    SQL*Net more data from client     99,783     0.00     77     1     1.83
    buffer busy waits     198     24.24     64     325     0.00
    latch: cache buffers lru chain     204     0.00     35     173     0.00
    cursor: pin S wait on X     3,284     99.97     32     10     0.06
    LGWR wait for redo copy     3,493     91.24     32     9     0.06
    latch: object queue header operation     91     0.00     8     91     0.00
    latch: In memory undo latch     43     0.00     8     191     0.00
    db file parallel read     530     0.00     7     14     0.01
    enq: SQ - contention     8     0.00     5     670     0.00
    log file sequential read     400     0.00     5     13     0.01
    SQL*Net break/reset to client     6,942     0.00     5     1     0.13
    Streams AQ: qmn coordinator waiting for slave to start     1     100.00     5     4889     0.00
    control file parallel write     1,844     0.00     5     2     0.03
    latch: enqueue hash chains     55     0.00     4     76     0.00
    Log archive I/O     344     0.00     3     9     0.01
    wait list latch free     104     0.00     2     20     0.00
    latch: undo global data     9     0.00     2     191     0.00
    log file switch (checkpoint incomplete)     11     0.00     2     150     0.00
    log file switch completion     28     0.00     1     53     0.00
    os thread startup     11     0.00     1     132     0.00
    control file sequential read     5,093     0.00     0     0     0.09
    latch: redo allocation     4     0.00     0     68     0.00
    enq: RO - fast object reuse     4     0.00     0     59     0.00
    local write wait     50     0.00     0     2     0.00
    latch: library cache pin     1     0.00     0     95     0.00
    latch: cache buffer handles     1     0.00     0     80     0.00
    enq: CF - contention     2     0.00     0     19     0.00
    direct path read temp     18,314     0.00     0     0     0.34
    log file single write     32     0.00     0     1     0.00
    enq: TX - index contention     3     0.00     0     5     0.00
    direct path write temp     25     0.00     0     0     0.00
    reliable message     4     0.00     0     0     0.00
    direct path read     350     0.00     0     0     0.01
    Background Wait Events
    ordered by wait time desc, waits desc (idle events last)
    Event     Waits     %Time -outs     Total Wait Time (s)     Avg wait (ms)     Waits /txn
    events in waitclass Other     2,441     130.93     140     57     0.04
    log file parallel write     33,654     0.00     105     3     0.62
    log file sequential read     400     0.00     5     13     0.01
    control file parallel write     1,844     0.00     5     2     0.03
    buffer busy waits     4     75.00     3     832     0.00
    Log archive I/O     344     0.00     3     9     0.01
    os thread startup     11     0.00     1     132     0.00
    latch: library cache     3     0.00     1     220     0.00
    control file sequential read     4,390     0.00     0     0     0.08
    latch: shared pool     1     0.00     0     309     0.00
    db file sequential read     82     0.00     0     4     0.00
    db file scattered read     56     0.00     0     4     0.00
    log file single write     32     0.00     0     1     0.00
    latch: library cache lock     1     0.00     0     26     0.00
    direct path read     344     0.00     0     0     0.01
    direct path write     343     0.00     0     0     0.01
    latch: In memory undo latch     1     0.00     0     0     0.00
    Back to Wait Events Statistics
    Back to Top
    Operating System Statistics
    Statistic     Total
    AVG_BUSY_TIME     355,404
    AVG_IDLE_TIME     5,624
    AVG_IOWAIT_TIME     1,350
    AVG_SYS_TIME     24,626
    AVG_USER_TIME     330,677
    BUSY_TIME     2,844,143
    IDLE_TIME     45,639
    IOWAIT_TIME     11,363
    SYS_TIME     197,893
    USER_TIME     2,646,250
    LOAD     8
    OS_CPU_WAIT_TIME     ###############
    RSRC_MGR_CPU_WAIT_TIME     0
    VM_IN_BYTES     0
    VM_OUT_BYTES     0
    PHYSICAL_MEMORY_BYTES     51,504,857,088
    NUM_CPUS     8
    NUM_CPU_SOCKETS     8
    Back to Wait Events Statistics
    Back to Top
    Service Statistics
    ordered by DB Time
    Service Name     DB Time (s)     DB CPU (s)     Physical Reads     Logical Reads
    orcl     108,264.60     24,956.90     12,796,071     1,110,466,840
    SYS$USERS     6,748.20     1,707.20     2,350,206     59,196,825
    SYS$BACKGROUND     0.00     0.00     1,188     41,361
    Back to Wait Events Statistics
    Back to Top
    Service Wait Class Stats
    Wait Class info for services in the Service Statistics section.
    Total Waits and Time Waited displayed for the following wait classes: User I/O, Concurrency, Administrative, Network
    Time Waited (Wt Time) in centisecond (100th of a second)
    Service Name     User I/O Total Wts     User I/O Wt Time     Concurcy Total Wts     Concurcy Wt Time     Admin Total Wts     Admin Wt Time     Network Total Wts     Network Wt Time
    orcl     1354220     373545     40097     757402     0     0     26777629     50042
    SYS$USERS     186115     64780     1563     27129     0     0     1456144     1238
    SYS$BACKGROUND     1221     183     23     584     0     0     0     0
    Back to Wait Events Statistics
    Back to Top
    SQL ordered by Elapsed Time
    Resources reported for PL/SQL code includes the resources used by all SQL statements called by the code.
    % Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100
    Elapsed Time (s)     CPU Time (s)     Executions     Elap per Exec (s)     % Total DB Time      SQL Id     SQL Module     SQL Text
    17,352     1,151     282,032     0.06     15.09     58nqcgq93qdpp      w3wp.exe     SELECT sysdate FROM dual
    13,412     3,344     3,516     3.81     11.66     gpz6zsfjvvgx7      obilling.exe     select sum ( costs ) , sum ( ...
    9,176     2,771     393     23.35     7.98     ajp712h079d57      dosage.exe     select DIAG_DESC from outp_mr ...
    8,351     2,411     3,163     2.64     7.26     9skkhx9qfmzjy      outpdoct.exe      SELECT "OUTP_TREAT_REC"."VIS...
    6,278     2,042     2,598     2.42     5.46     f9nfgywd1dzbc      outpdoct.exe      SELECT :"SYS_B_0" del_indica...
    3,406     1,070     729     4.67     2.96     3fgaurmna0hx9      obilling.exe      SELECT "OUTP_PRESC_T"."VISIT...
    3,228     867     9,221     0.35     2.81     3vy04kpknkqgk      w3wp.exe     select T1.REMIND_DATETIME, T1....
    2,802     514     214     13.09     2.44     f4q13jvt6n8r8      mzcx.exe      SELECT DISTINCT "OUTPBILL"."...
    2,406     533     725     3.32     2.09     87mazvgqfas1z      obilling.exe      SELECT "OUTP_TREAT_REC_T"."V...
    2,340     535     724     3.23     2.03     f4xrxypn2cpkm      obilling.exe      SELECT "OUTP_PRESC_T"."VISIT...
    2,303     781     15,143     0.15     2.00     89yw129xmhchc      w3wp.exe     select a.PATIENT_ID, a.VISIT_I...
    1,572     449     4,748     0.33     1.37     0nwg8cxxzcb0m      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,258     135     44     28.58     1.09     cnuj5dstf2559      outpdoct.exe      SELECT "DOCT_DRUG_PRESC_DE...
    Back to SQL Statistics
    Back to Top
    SQL ordered by CPU Time
    Resources reported for PL/SQL code includes the resources used by all SQL statements called by the code.
    % Total DB Time is the Elapsed Time of the SQL statement divided into the Total Database Time multiplied by 100
    CPU Time (s)     Elapsed Time (s)     Executions     CPU per Exec (s)     % Total DB Time      SQL Id     SQL Module     SQL Text
    3,344     13,412     3,516     0.95     11.66     gpz6zsfjvvgx7      obilling.exe     select sum ( costs ) , sum ( ...
    2,771     9,176     393     7.05     7.98     ajp712h079d57      dosage.exe     select DIAG_DESC from outp_mr ...
    2,411     8,351     3,163     0.76     7.26     9skkhx9qfmzjy      outpdoct.exe      SELECT "OUTP_TREAT_REC"."VIS...
    2,042     6,278     2,598     0.79     5.46     f9nfgywd1dzbc      outpdoct.exe      SELECT :"SYS_B_0" del_indica...
    1,151     17,352     282,032     0.00     15.09     58nqcgq93qdpp      w3wp.exe     SELECT sysdate FROM dual
    1,070     3,406     729     1.47     2.96     3fgaurmna0hx9      obilling.exe      SELECT "OUTP_PRESC_T"."VISIT...
    867     3,228     9,221     0.09     2.81     3vy04kpknkqgk      w3wp.exe     select T1.REMIND_DATETIME, T1....
    781     2,303     15,143     0.05     2.00     89yw129xmhchc      w3wp.exe     select a.PATIENT_ID, a.VISIT_I...
    540     825     1,790     0.30     0.72     cw74b4gm99xd5      ORACLE.EXE     SELECT "A4"."PATIENT_ID", TO_C...
    535     2,340     724     0.74     2.03     f4xrxypn2cpkm      obilling.exe      SELECT "OUTP_PRESC_T"."VISIT...
    533     2,406     725     0.73     2.09     87mazvgqfas1z      obilling.exe      SELECT "OUTP_TREAT_REC_T"."V...
    514     2,802     214     2.40     2.44     f4q13jvt6n8r8      mzcx.exe      SELECT DISTINCT "OUTPBILL"."...
    449     1,572     4,748     0.09     1.37     0nwg8cxxzcb0m      w3wp.exe     select T1.REMIND_DATETIME, T1....
    135     1,258     44     3.06     1.09     cnuj5dstf2559      outpdoct.exe      SELECT "DOCT_DRUG_PRESC_DE...
    Back to SQL Statistics
    Back to Top
    SQL ordered by Gets
    Resources reported for PL/SQL code includes the resources used by all SQL statements called by the code.
    Total Buffer Gets: 1,169,640,302
    Captured SQL account for 71.4% of Total
    Buffer Gets     Executions     Gets per Exec     %Total     CPU Time (s)     Elapsed Time (s)      SQL Id     SQL Module     SQL Text
    158,325,351     3,516     45,029.96     13.54     3344.37     13412.17     gpz6zsfjvvgx7      obilling.exe     select sum ( costs ) , sum ( ...
    142,486,001     3,163     45,047.74     12.18     2410.79     8351.24     9skkhx9qfmzjy      outpdoct.exe      SELECT "OUTP_TREAT_REC"."VIS...
    107,954,245     2,598     41,552.83     9.23     2041.61     6278.17     f9nfgywd1dzbc      outpdoct.exe      SELECT :"SYS_B_0" del_indica...
    54,640,906     729     74,953.23     4.67     1069.81     3405.85     3fgaurmna0hx9      obilling.exe      SELECT "OUTP_PRESC_T"."VISIT...
    54,464,191     15,143     3,596.66     4.66     781.43     2302.60     89yw129xmhchc      w3wp.exe     select a.PATIENT_ID, a.VISIT_I...
    52,300,799     9,221     5,671.92     4.47     866.73     3228.09     3vy04kpknkqgk      w3wp.exe     select T1.REMIND_DATETIME, T1....
    36,350,381     1,790     20,307.48     3.11     539.85     825.10     cw74b4gm99xd5      ORACLE.EXE     SELECT "A4"."PATIENT_ID", TO_C...
    28,097,571     1,132     24,821.18     2.40     105.62     304.33     44cpsg5hgwtv3      outpdoct.exe      SELECT "CLINIC_MASTER"."NAME...
    27,329,179     724     37,747.48     2.34     534.54     2339.79     f4xrxypn2cpkm      obilling.exe      SELECT "OUTP_PRESC_T"."VISIT...
    27,276,384     725     37,622.60     2.33     532.84     2405.61     87mazvgqfas1z      obilling.exe      SELECT "OUTP_TREAT_REC_T"."V...
    26,913,555     4,748     5,668.40     2.30     449.02     1571.69     0nwg8cxxzcb0m      w3wp.exe     select T1.REMIND_DATETIME, T1....
    25,335,084     214     118,388.24     2.17     514.25     2802.12     f4q13jvt6n8r8      mzcx.exe      SELECT DISTINCT "OUTPBILL"."...
    12,756,154     4     3,189,038.50     1.09     73.99     592.57     4v3jxnrj4duq0      ºǫ́ÅäÒ©ÐÂ2012.07.31.exe      SELECT "DRUG_PRESC_MASTER"....
    Back to SQL Statistics
    Back to Top
    SQL ordered by Reads
    Total Disk Reads: 15,136,657
    Captured SQL account for 81.4% of Total
    Physical Reads     Executions     Reads per Exec     %Total     CPU Time (s)     Elapsed Time (s)      SQL Id     SQL Module     SQL Text
    6,716,909     214     31,387.43     44.38     514.25     2802.12     f4q13jvt6n8r8      mzcx.exe      SELECT DISTINCT "OUTPBILL"."...
    3,642,877     44     82,792.66     24.07     134.64     1257.56     cnuj5dstf2559      outpdoct.exe      SELECT "DOCT_DRUG_PRESC_DE...
    1,707,395     12     142,282.92     11.28     56.42     470.82     bkkm26gd9ydjp      prescent.exe      SELECT "DRUG_PRESC_MASTER"....
    208,221     4     52,055.25     1.38     73.99     592.57     4v3jxnrj4duq0      ºǫ́ÅäÒ©ÐÂ2012.07.31.exe      SELECT "DRUG_PRESC_MASTER"....
    137,856     0           0.91     383.09     1041.12     b1y7hxw5s572b      ORACLE.EXE     SELECT /*+ OPAQUE_TRANSFORM */...
    45,210     1     45,210.00     0.30     136.24     617.92     9k2mtm738ffbk      ORACLE.EXE     SELECT "A1"."PATIENT_ID", "A1"...
    21,692     0           0.14     44.82     288.67     5w6u29xnk192r      ORACLE.EXE     SELECT "A1"."TEST_NO", "A1"."I...
    2,078     17,010     0.12     0.01     6.78     13.35     3ts97u1my91n4      testprn.exe      SELECT "LAB"."LAB_TEST_ITEM...
    539     1,732     0.31     0.00     124.85     289.44     0a96nnbzvb78j      sjcj.exe     select diag_desc , doctor fro...
    224     14,499     0.02     0.00     1.75     2.81     adr24vcznhjhz      C:\Documents and Settings\yj.ÐÄÄÚʵÑéÊÒ1.000\×À?     SELECT COSTS , BILLING_INDICA...
    Back to SQL Statistics
    Back to Top
    SQL ordered by Executions
    Total Executions: 4,407,615
    Captured SQL account for 43.0% of Total
    Executions     Rows Processed     Rows per Exec     CPU per Exec (s)     Elap per Exec (s)      SQL Id     SQL Module     SQL Text
    324,063     324,042     1.00     0.00     0.00     1jzhjx524wyfm      presdisp.exe     select TRADE_PRICE , retail_p...
    282,032     281,745     1.00     0.00     0.06     58nqcgq93qdpp      w3wp.exe     SELECT sysdate FROM dual
    197,067     197,006     1.00     0.00     0.00     f0wzs9nc663bn      obilling.exe     select sysdate from dual
    162,033     112,966     0.70     0.00     0.00     ak8wcxnbv0mq7      presdisp.exe     select location from drug_stoc...
    162,032     162,023     1.00     0.00     0.00     g982zswg09n71      presdisp.exe     SELECT sum ( DRUG_STOCK.QUANTI...
    152,651     1,296     0.01     0.00     0.00     ctc7t080mcrpr      PACSVR.exe     Select exam_master.*, exam_ma...
    89,187     89,186     1.00     0.00     0.00     054n8y7sfgsjc      anesmgr.exe     select 1 from dual
    53,088     24,076     0.45     0.00     0.00     fhzdwv4sgvurz      ORACLE.EXE     SELECT "A1"."END_DATE_TIME", S...
    43,074     991     0.02     0.00     0.00     8kj11spfu1w5k      ORACLE.EXE     SELECT DISTINCT "A1"."LOG_DATE...
    40,962     4,803     0.12     0.00     0.00     664crkjw8n47y      doctws.exe     select dept_code , ward_code ...
    Back to SQL Statistics
    Back to Top
    SQL ordered by Parse Calls
    Total Parse Calls: 5,416,394
    Captured SQL account for 41.3% of Total
    Parse Calls     Executions     % Total Parses      SQL Id     SQL Module     SQL Text
    457,941     152,651     8.45     ctc7t080mcrpr      PACSVR.exe     Select exam_master.*, exam_ma...
    324,064     324,063     5.98     1jzhjx524wyfm      presdisp.exe     select TRADE_PRICE , retail_p...
    281,992     282,032     5.21     58nqcgq93qdpp      w3wp.exe     SELECT sysdate FROM dual
    197,067     197,067     3.64     f0wzs9nc663bn      obilling.exe     select sysdate from dual
    162,033     162,033     2.99     ak8wcxnbv0mq7      presdisp.exe     select location from drug_stoc...
    162,032     162,032     2.99     g982zswg09n71      presdisp.exe     SELECT sum ( DRUG_STOCK.QUANTI...
    113,451     0     2.09     gbztx1wqkp1zw      ORACLE.EXE     SELECT * FROM "OPERATION_MASTE...
    109,344     0     2.02     1gk864rffswjx      ORACLE.EXE     SELECT * FROM "PAT_VISIT"
    104,957     0     1.94     dw9ggd0h86cw4      ORACLE.EXE     SELECT * FROM "ADT_LOG"
    89,187     89,187     1.65     054n8y7sfgsjc      anesmgr.exe     select 1 from dual
    Back to SQL Statistics
    Back to Top
    SQL ordered by Sharable Memory
    Only Statements with Sharable Memory greater than 1048576 are displayed
    Sharable Mem (b)     Executions     % Total      SQL Id     SQL Module     SQL Text
    14,285,976           0.22     998p6b7d1q9bz           ** SQL Text Not Available **
    14,265,528           0.22     dsxd21s5bw5h3           ** SQL Text Not Available **
    4,621,517     45     0.07     18h8s79av5v45      w3wp.exe     select T1.REMIND_DATETIME, T1....
    3,949,845     20     0.06     bn69cjprha24w      w3wp.exe     select T1.REMIND_DATETIME, T1....
    3,407,101     41     0.05     5syt1sugfkg7c      w3wp.exe     select T1.REMIND_DATETIME, T1....
    2,623,013     65     0.04     gh6391dujc994      w3wp.exe     select T1.REMIND_DATETIME, T1....
    2,314,741     30     0.04     49husy8txxw6h      w3wp.exe     select T1.REMIND_DATETIME, T1....
    2,184,421     87     0.03     5a77mhab8fmq4      w3wp.exe     select T1.REMIND_DATETIME, T1....
    2,029,197     24     0.03     57wp7yk0ajprt      w3wp.exe     select T1.REMIND_DATETIME, T1....
    2,028,837     5     0.03     csd4pjvrfpxry      w3wp.exe     select T1.REMIND_DATETIME, T1....
    2,024,581     44     0.03     890zsd9cju097      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,925,949     39     0.03     cw4y41z3vnz8y      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,793,389     71     0.03     gwx893aphkzw8      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,747,565     19     0.03     4p0vbj8qba0sj      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,747,253     75     0.03     6hhka0kpch5bq      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,746,061     60     0.03     cqbyt6m5m9f6g      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,745,909     47     0.03     aatwks74mtqkx      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,718,005     20     0.03     cmws54r2xv332      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,709,493     24     0.03     71zxrhv747290      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,265,905     1,585     0.02     a7c5z25vb0kvz      obilling.exe     SELECT COLUMN_NAME, DATA_TYPE...
    1,132,605     30     0.02     9s6btksh172dz      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,115,157     30     0.02     9s6btksh172dz      w3wp.exe     select T1.REMIND_DATETIME, T1....
    1,055,029     105     0.02     da0pcbq6qxxqx      w3wp.exe     select T1.REMIND_DATETIME, T1....
    Back to SQL Statistics
    Back to Top
    SQL ordered by Version Count
    Only Statements with Version Count greater than 20 are displayed
    Version Count     Executions      SQL Id     SQL Module     SQL Text
    698           998p6b7d1q9bz           ** SQL Text Not Available **
    697           dsxd21s5bw5h3           ** SQL Text Not Available **
    57     192     9mrhw217pc809      DOCTWS.EXE     select MR_CODE , mr_attr , m...
    43     1,307     53mkjqn5tdptj      examapt.exe     SELECT to_char ( last_updt_dat...
    32     125     399071urkdx7n      admit.exe     SELECT to_char ( last_updt_dat...
    26     564     14fz7s749tx24      prescent.exe     Select drug_spec , batch_no , ...
    Back to SQL Statistics
    Back to Top
    Complete List of SQL Text
    SQL Id     SQL Text
    054n8y7sfgsjc     select 1 from dual
    0a96nnbzvb78j     select diag_desc , doctor from outp_mr where patient_id =:1 and visit_date like visit_date and visit_no =:2
    0nwg8cxxzcb0m     select T1.REMIND_DATETIME, T1.START_DATETIME, T1.VISIT_DATE, T1.REMIND_TYPE, T1.REMIND_ID, T1.DELETE_FLAG, T1.REPEAT_INTERVAL, T1.VISIT_ID, T1.VISIT_NO, T1.DELETE_USER_ID, T1.DELETE_USER_NAME, T1.PATIENT_ID, T1.REMIND_DEPICT, T1.REMIND_INDEX, T2.REMIND_TYPE_NAME, T1.REMIND_USER_ID, T1.REMIND_USER_NAME from REMIND T1, REMIND_TYPE_DICT T2 where T1.REMIND_TYPE=T2.REMIND_TYPE_CODE(+) and T1.Remind_Type in (:"SYS_B_0") and T1.Delete_Flag=:"SYS_B_1" and T1.Remind_User_Name=:"SYS_B_2" order by T1.Remind_Id
    14fz7s749tx24     Select drug_spec , batch_no , quantity , supply_indicator from drug_stock where drug_code =:1 and firm_id =:2 and package_spec =:3 and package_units =:4 and storage =:5 order by batch_no DESC
    18h8s79av5v45     
    sql--省略
    Back to SQL Statistics
    Back to Top
    SGA breakdown difference
    ordered by Pool, Name
    N/A value for Begin MB or End MB indicates the size of that Pool/Name was insignificant, or zero in that snapshot
    Pool     Name     Begin MB     End MB     % Diff
    java     free memory     26.47     26.47     0.00
    java     joxlod exec hp     5.34     5.34     0.00
    large     free memory     32.00     32.00     0.00
    shared     CCursor     870.37     871.80     0.16
    shared     Cursor Stats     65.30     65.30     0.00
    shared     PCursor     506.48     505.60     -0.17
    shared     db_block_hash_buckets     90.00     90.00     0.00
    shared     free memory     484.07     480.10     -0.82
    shared     kglsim object batch     90.30     90.30     0.00
    shared     library cache     352.64     351.46     -0.33
    shared     sql area     3,290.12     3,291.57     0.04
    streams     free memory     16.00     16.00     0.00
         buffer_cache     9,216.00     9,216.00     0.00
         fixed_sga     1.99     1.99     0.00
         log_buffer     14.01     14.01     0.00
    Back to Memory Statistics
    Back to Top
    Resource Limit Stats
    only rows with Current or Maximum Utilization > 80% of Limit are shown
    ordered by resource name
    Resource Name     Current Utilization     Maximum Utilization      Initial Allocation      Limit
    processes     1,631     1,824     2000     2000
    sessions     1,639     1,884     2205     2205
    Back to Top
    init.ora Parameters
    Parameter Name     Begin value     End value (if different)
    audit_file_dest     /oracle/product/10.2.0/admin/orcl/adump      
    background_dump_dest     /oracle/product/10.2.0/admin/orcl/bdump      
    compatible     10.2.0.1.0      
    control_files     /oradata/orcl/control01.ctl, /oradata/orcl/control02.ctl, /oradata/orcl/control03.ctl, /oralog/orcl/control04.ctl      
    core_dump_dest     /oracle/product/10.2.0/admin/orcl/cdump      
    cursor_sharing     FORCE      
    db_block_size     8192      
    db_cache_size     9663676416      
    db_domain             
    db_file_multiblock_read_count     32      
    db_name     orcl      
    db_recovery_file_dest     /oracle/product/10.2.0/flash_recovery_area      
    db_recovery_file_dest_size     2147483648      
    java_pool_size     33554432      
    job_queue_processes     10      
    large_pool_size     33554432      
    log_archive_dest_1     LOCATION=/oralog/arch      
    nls_language     SIMPLIFIED CHINESE      
    nls_length_semantics     CHAR      
    nls_territory     CHINA      
    open_cursors     300      
    pga_aggregate_target     2147483648      
    processes     2000      
    remote_login_passwordfile     EXCLUSIVE      
    sessions     2205      
    shared_pool_size     6442450944      
    streams_pool_size     16777216      
    undo_management     AUTO      
    undo_tablespace     UNDOTBS1      
    user_dump_dest     /oracle/product/10.2.0/admin/orcl/udump      
    Back to Top
    End of Report

    焦点在于解析:
    Parses:      1,499.45      99.27
    Hard parses:      8.39      0.56
    Execute to Parse %:      -22.89每秒软解析1500次 ,Execute to Parse 解析是负值 , 这说明 执行解析比非常差。
    以下SQL parse次数频繁:
    SQL ordered by Parse Calls
    Total Parse Calls: 5,416,394
    Captured SQL account for 41.3% of Total
    Parse Calls     Executions     % Total Parses      SQL Id     SQL Module     SQL Text
    457,941     152,651     8.45     ctc7t080mcrpr      PACSVR.exe     Select exam_master.*, exam_ma...
    324,064     324,063     5.98     1jzhjx524wyfm      presdisp.exe     select TRADE_PRICE , retail_p...SQL ID ctc7t080mcrpr     1jzhjx524wyfm     
    ctc7t080mcrpr 实际执行只有 152,651 ,解析倒有457,941次
    建议分析以上语句为何产生了大量软解析
    Advice:
    1. 分析SQL语句,减少软解析的数量
    2. 利用open cursor、session cached cursors等技术减少软解析
    3. 考虑设置_kks_use_mutex_pin=FALSE 禁用10g中的MUTEX PIN CURSOR特性
    *<font color="red" size="2" face="courier">如果觉得本回复有意义,请点击本条回复右手边的Correct按钮,谢谢!</font>*
    Maclean Liu
    Oracle Database Administrator
    Oracle Certified 10g/11g Master     
    www.askmaclean.com
    Edited by: Liu Maclean on 2012-8-23 下午11:48

  • Cursor Declaration

    I am trying to declare a cursor in a stored procedure using the following sql:
         CURSOR conversionCursor is select customer_number, company_id , buyer_id
         from hpsiuser.conversion_master natural join
         (select distinct mfg_code, customer_number
                                                 from hpsiuser.vendor_info, invoice_h
                                                 where vendor_id = vendorID);
    I get the following errors:
    Line # = 6 Column # = 29 Error Text = PL/SQL: SQL Statement ignored
    Line # = 6 Column # = 9 Error Text = PLS-00341: declaration of cursor 'CONVERSIONCURSOR' is incomplete or malformed
    Line # = 7 Column # = 43 Error Text = PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    My assumption is that it is having a problem with the join yet it works as a stand alone select statement.
    Any insight would be appreciated.
    Jon King

    CURSOR Expressions
    A CURSOR expression returns a nested cursor. This form of expression is equivalent to the PL/SQL REF CURSOR and can be passed as a REF CURSOR argument to a function.
    cursor_expression::=
    Text description of cursor_expression
    A nested cursor is implicitly opened when the cursor expression is evaluated. For example, if the cursor expression appears in a SELECT list, a nested cursor will be opened for each row fetched by the query. The nested cursor is closed only when:
    The nested cursor is explicitly closed by the user
    The parent cursor is reexecuted
    The parent cursor is closed
    The parent cursor is cancelled
    An error arises during fetch on one of its parent cursors (it is closed as part of the clean-up)
    Restrictions on CURSOR Expressions
    If the enclosing statement is not a SELECT statement, nested cursors can appear only as REF CURSOR arguments of a procedure.
    If the enclosing statement is a SELECT statement, nested cursors can also appear in the outermost SELECT list of the query specification, or in the outermost SELECT list of another nested cursor.
    Nested cursors cannot appear in views.
    You cannot perform BIND and EXECUTE operations on nested cursors.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/expressions6a.htm#1035109
    Joel P�rez

  • How to get rowtype of a ref cursor?

    Hello again,
    I need your help once more.
    I have a function in a package which returns a SYS_REFCURSOR. Now I am trying to open that cursor from the application (currently sql_developer) to show the data. For starting I have a simple query in the statement: select * from emp;
    Later it will be a complex query which returns results of multiple joined tables.
    I have the following package:
    >
    CREATE OR REPLACE
    PACKAGE P_TEST_ASP AS
    FUNCTION test_asp_1 (dti_id in NUMBER)
    RETURN SYS_REFCURSOR;
    END P_TEST_ASP;
    >
    And here comes the package body:
    >
    CREATE OR REPLACE
    PACKAGE BODY P_TEST_ASP AS
    FUNCTION test_asp_1 (dti_id in NUMBER)
    RETURN SYS_REFCURSOR AS
    resultCursor SYS_REFCURSOR;
    BEGIN
    OPEN resultCursor FOR select * from emp;
    RETURN resultCursor;
    END test_asp_1;
    END P_TEST_ASP;
    >
    Now my Problem is that I do not know how to get the cursor's rowtype to assign it to the collection:
    I Managed to access the cursor when I set the rowtype of my collection res to emp%rowtype.
    >
    set serveroutput on
    DECLARE
    type        testtype is TABLE OF emp%rowtype;
    myCursor SYS_REFCURSOR;
    res testtype;
    BEGIN
    -- Get ref cursor from function
    myCursor := p_test_asp.test_asp_1(9);
    FETCH myCursor BULK COLLECT into res;
    dbms_output.put_line('Value from cursor:' );
    CLOSE myCursor;
    END;
    >
    But that will not work with the final statement.
    I would like to set the rowtype to myCursor%rowtype -> But I don't know how to do it:
    >
    set serveroutput on
    DECLARE
    type        testtype is TABLE OF myCursor%rowtype;
    myCursor SYS_REFCURSOR;
    res testtype;
    BEGIN
    -- Get ref cursor from function
    myCursor := p_test_asp.test_asp_1(9);
    FETCH myCursor BULK COLLECT into res;
    dbms_output.put_line('Value from cursor:' );
    CLOSE myCursor;
    END;
    >
    this statement throws the following errors:
    Fehlerbericht:
    ORA-06550: line 2, column 36:
    PLS-00320: the declaration of the type of this expression is incomplete or malformed
    ORA-06550: line 2, column 3:
    PL/SQL: Item ignored
    ORA-06550: line 11, column 36:
    PLS-00597: expression 'RES' in the INTO list is of wrong type
    ORA-06550: line 11, column 3:
    PL/SQL: SQL Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    Edited by: Andreas S. on 13.12.2011 04:56

    Why do you want to use a collection? I dont see any need for that.
    Lets say your client is SQL Plus. SQL Plus provides a API called PRINT that prints the cursor. You can use that.
    SQL> var rc refcursor
    SQL>
    SQL> exec open :rc for select level from dual connect by level <= 10;
    PL/SQL procedure successfully completed.
    SQL> print rc
         LEVEL
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.
    SQL>Like wise whatever is your client use the correct API that offers to handle cursors.

  • Open Cursor in a procedure

    Hi to all,
    my problem is to open a cursor into a procedure.
    The code is the following:
    PROCEDURE p_selection_customer
    IS
         CURSOR cursor_customer IS
              SELECT
              c_u.id_customer
              FROM
              customer_unified_a c_u;
         BEGIN
              FOR record_customer IN cursor_customer LOOP
                   ROLLBACK;
              END LOOP;
    END p_selection_customer;
    The error is :
    Errore(55,3): PL/SQL: SQL Statement ignored
    Errore(58,3): PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
    This procedure is defined in the spec. Then I suppose that my problem is that I can't open a cursor into my schema. Do I verify this hypotesys in my schema? Do I have some queries? My schema don't have the dba and sys grants.
    Thank'you very match!

    Hi Alex,
    this is the complete script used to generate the table.
    Me too, I knew that the partition was transparent to the Cursor statement.
    Thank'you very match!
    CREATE TABLE "SSVILCID"."TW_E_CUSTOMER_UNIFIED_A"
       (     "ID_CUSTOMER_UNIFIED" VARCHAR2(27 BYTE) NOT NULL ENABLE,
         "START_VALIDITY_DATE" DATE NOT NULL ENABLE,
         "START_ASINC_DATE" DATE NOT NULL ENABLE,
         "END_ASINC_DATE" DATE,
         "CUSTOMER_STATUS" VARCHAR2(255 BYTE),
         "TERMINATION_DATE" DATE,
         "CUSTOMER_DOMAIN" VARCHAR2(255 BYTE),
         "CUSTOMER_CLUSTER" VARCHAR2(255 BYTE),
         "CUSTOMER_SENIORITY" DATE,
         "ACTIVATION_DATE" DATE,
         "ACQUISITION_DATE" DATE,
         "ACQUISITION_CHANNEL" VARCHAR2(255 BYTE),
         "SUB_ACQUISITION_CHANNEL" VARCHAR2(255 BYTE),
          CONSTRAINT "TW_E_CUSTOMER_UNIFIED_A_PK" PRIMARY KEY ("START_ASINC_DATE", "ID_CUSTOMER_UNIFIED", "START_VALIDITY_DATE")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSTEM"  ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
      PARTITION BY RANGE ("START_ASINC_DATE")
      SUBPARTITION BY LIST ("END_ASINC_DATE")
    (PARTITION "M200909"  VALUES LESS THAN (TO_DATE(' 2009-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M200909_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M200909_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M200910"  VALUES LESS THAN (TO_DATE(' 2009-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M200910_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M200910_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M200911"  VALUES LESS THAN (TO_DATE(' 2009-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M200911_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M200911_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M200912"  VALUES LESS THAN (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M200912_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M200912_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M201001"  VALUES LESS THAN (TO_DATE(' 2010-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M201001_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M201001_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "M201002"  VALUES LESS THAN (TO_DATE(' 2010-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M201002_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M201002_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") ,
    PARTITION "FUTURE"  VALUES LESS THAN (MAXVALUE)
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
      STORAGE(
      BUFFER_POOL DEFAULT)
      TABLESPACE "DATI"
    ( SUBPARTITION "M210001_N"  VALUES (NULL)
       TABLESPACE "DATI",
      SUBPARTITION "M210001_NN"  VALUES (DEFAULT)
       TABLESPACE "DATI") )  ENABLE ROW MOVEMENT ;

  • Incomplete data or ORA-28528 errors when accesing an Informix Server

    We have configured a dblink to an Informix Server. We are using UnixODBC + Informix CSDK on a RHEL 4 x86_64.
    After running several queries we have seen 3 different situations:
    A. The result of the query is correct.
    B. The result is incomplete. The table may have 24 rows, but the output shows only 13. However, Oracle receives 24 rows, as it's shown at the end of the output.
    C. Error about datatype conversion.
    SQL> select * from "centros"@test_informix2;
    ERROR:
    ORA-28528: Heterogeneous Services datatype conversion error
    ORA-02063: preceding line from TEST_INFORMIX2
    dg4odbc output when performing a select with incomplete results as described in situation B
    Oracle Corporation --- TUESDAY AUG 11 2009 16:12:02.321
    Heterogeneous Agent Release
    11.1.0.6.0
    Oracle Corporation --- TUESDAY AUG 11 2009 16:12:02.321
    Version 11.1.0.6.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "4"
    Entered hgosdip
    setting HS_OPEN_CURSORS to default of 50
    setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
    setting HS_FDS_RECOVERY_PWD to default value
    setting HS_FDS_TRANSACTION_LOG to default of "HS_TRANSACTION_LOG"
    setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
    setting HS_NLS_NCHAR to default of "AL32UTF8"
    setting HS_FDS_TIMESTAMP_AS_DATE to default of "TRUE"
    setting HS_RPC_FETCH_REBLOCKING to default of "ON"
    setting HS_FDS_FETCH_ROWS to default of "100"
    setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
    setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
    setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
    setting HS_FDS_MAP_NCHAR to default of "TRUE"
    setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
    setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
    setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
    setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
    setting HS_FDS_QUERY_DRIVER to default of "TRUE"
    setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
    setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQ
    LStatistics"
    Exiting hgosdip, rc=0
    ORACLE_SID is "test_informix2"
    Product-Info:
    Port Rls/Upd:6/0 PrdStat:0
    Agent:Oracle Database Gateway for ODBC
    Facility:hsa
    Class:ODBC, ClassVsn:11.1.0.6.0_0006, Instance:test_informix2
    Exiting hgogprd, rc=0
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=31
    HOCXU_DRV_NCHAR=873
    HOCXU_DB_CSET=31
    HOCXU_SEM_VER=102000
    Entered hgolofn at 2009/08/11-16:12:02
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/local/lib/libodbc.so"
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLAllocHandle
    symbol_peflctx=0x9893c70d
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLBindCol
    symbol_peflctx=0x9893c873
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLBindParameter
    symbol_peflctx=0x9893d2e4
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLCancel
    symbol_peflctx=0x9893ec84
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLDescribeParam
    symbol_peflctx=0x98949f10
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLDisconnect
    symbol_peflctx=0x9894a5c8
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLEndTran
    symbol_peflctx=0x9894d4d4
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLExecute
    symbol_peflctx=0x9894f17c
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLFetch
    symbol_peflctx=0x9894fd04
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLFreeHandle
    symbol_peflctx=0x98951fc9
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLFreeStmt
    symbol_peflctx=0x98951fec
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLGetData
    symbol_peflctx=0x989541dc
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLGetEnvAttr
    symbol_peflctx=0x98957fa8
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLGetFunctions
    symbol_peflctx=0x989583c4
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLMoreResults
    symbol_peflctx=0x9895ab28
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLNumResultCols
    symbol_peflctx=0x9895bad8
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLParamData
    symbol_peflctx=0x9895bedc
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLPutData
    symbol_peflctx=0x9895e908
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLRowCount
    symbol_peflctx=0x9895ee78
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLSetEnvAttr
    symbol_peflctx=0x98961458
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLSetDescRec
    symbol_peflctx=0x98961230
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLColAttribute
    symbol_peflctx=0x9893f4ec
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLColumns
    symbol_peflctx=0x989416e4
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLConnect
    symbol_peflctx=0x98947014
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLDescribeCol
    symbol_peflctx=0x989494f0
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLDriverConnect
    symbol_peflctx=0x9894b337
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLExecDirect
    symbol_peflctx=0x9894e9e2
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLForeignKeys
    symbol_peflctx=0x98950bdc
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLGetConnectAttr
    symbol_peflctx=0x989524ab
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLGetDiagField
    symbol_peflctx=0x989567f3
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLGetDiagRec
    symbol_peflctx=0x989576e5
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLGetInfo
    symbol_peflctx=0x98959083
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLGetStmtAttr
    symbol_peflctx=0x989593e3
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLGetTypeInfo
    symbol_peflctx=0x9895a548
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLPrepare
    symbol_peflctx=0x9895c9c6
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLPrimaryKeys
    symbol_peflctx=0x9895d13e
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLProcedureColumns
    symbol_peflctx=0x9895d938
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLProcedures
    symbol_peflctx=0x9895e19a
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLSetConnectAttr
    symbol_peflctx=0x9895f1fc
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLSetStmtAttr
    symbol_peflctx=0x989634a8
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLSetDescField
    symbol_peflctx=0x98960e5a
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLStatistics
    symbol_peflctx=0x98965ed6
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Entered hgolofns at 2009/08/11-16:12:02
    libname=/usr/local/lib/libodbc.so, funcname=SQLTables
    symbol_peflctx=0x98967014
    hoaerr:0
    Exiting hgolofns at 2009/08/11-16:12:02
    Exiting hgolofn, rc=0 at 2009/08/11-16:12:02
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    Exiting hgoinit, rc=0 at 2009/08/11-16:12:02
    Entered hgolgon at 2009/08/11-16:12:02
    reco:0, name:informix, tflag:0
    Entered hgosuec at 2009/08/11-16:12:02
    Exiting hgosuec, rc=0 at 2009/08/11-16:12:02
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned ""HS_TRANSACTION_LOG""
    HOSGIP for "HS_FDS_TIMESTAMP_AS_DATE" returned "TRUE"
    HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULT_SET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using informix as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    Entered hgocont at 2009/08/11-16:12:02
    HS_FDS_CONNECT_INFO = "test_informix2"
    RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
    Entered hgogenconstr at 2009/08/11-16:12:02
    dsn:test_informix2, name:informix
    optn:
    ##>Connect Parameters (len=43)<##
    ## DSN=test_informix2;
    #! UID=informix;
    #! PWD=*
    Exiting hgogenconstr, rc=0 at 2009/08/11-16:12:02
    DriverName:iclis09b.so, DriverVer: 3.50.0000 3.50.U
    DBMS Name:Informix, DBMS Version:07.31.0000 UD5
    Exiting hgocont, rc=0 at 2009/08/11-16:12:02
    SQLGetInfo returns Y for SQL_CATALOG_NAME
    SQLGetInfo returns 18 for SQL_MAX_CATALOG_NAME_LEN
    Exiting hgolgon, rc=0 at 2009/08/11-16:12:02
    Entered hgoulcp at 2009/08/11-16:12:02
    Entered hgowlst at 2009/08/11-16:12:02
    Exiting hgowlst, rc=0 at 2009/08/11-16:12:02
    SQLGetInfo returns " for SQL_IDENTIFIER_QUOTE_CHAR
    SQLGetInfo returns N for SQL_COLUMN_ALIAS
    Exiting hgoulcp, rc=0 at 2009/08/11-16:12:02
    Entered hgouldt at 2009/08/11-16:12:02
    Exiting hgouldt, rc=0 at 2009/08/11-16:12:02
    Entered hgobegn at 2009/08/11-16:12:02
    tflag:0 , initial:1
    hoi:0xbfffe688, ttid (len 21) is ...
    00: 54534554 3135352E 36616133 2E332E37 [TEST.5513aa67.3.]
    10: 36352E33 34 [3.564]
    tbid (len 10) is ...
    0: 00030003 00000234 0104 [....4.....]
    Exiting hgobegn, rc=0 at 2009/08/11-16:12:02
    Entered hgodtab at 2009/08/11-16:12:02
    count:1
    table: agentes
    Entered hgopcda at 2009/08/11-16:12:02
    Column:1(cod_agent): dtype:1 (CHAR), prc/scl:2/0, nullbl:0, octet:2, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2009/08/11-16:12:02
    Entered hgopcda at 2009/08/11-16:12:02
    Column:2(desc_agent): dtype:12 (VARCHAR), prc/scl:50/0, nullbl:0, octet:50, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2009/08/11-16:12:02
    The hoada for table agentes follows...
    hgodtab, line 577: Printing hoada @ 0x6c0b90
    MAX:2, ACTUAL:2, BRC:1, WHT=6
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    1 CHAR N 2 2 0/ 0 0 0 0 cod_agent
    12 VARCHAR N 50 50 0/ 0 0 0 0 desc_agent
    Exiting hgodtab, rc=0 at 2009/08/11-16:12:02
    Entered hgodafr, cursor id 0 at 2009/08/11-16:12:02
    Exiting hgodafr, rc=0 at 2009/08/11-16:12:02
    Entered hgotcis at 2009/08/11-16:12:02
    Calling SQLStatistics for agentes
    IndexType=SQL_TABLE_STAT: cardinality=24
    New Index:353_1379, type=3, ASCENDING, UNIQUE, cardinality=24
    ordinal position = 1
    Calling SQLColumns for informix.agentes
    Column "cod_agent": dtype=1, colsize=2, decdig=0, char_octet_length=2, cumulative avg row len=2
    Column "desc_agent": dtype=12, colsize=50, decdig=0, char_octet_length=50, cumulative avg row len=39
    Exiting hgotcis, rc=0 at 2009/08/11-16:12:02
    Entered hgopars, cursor id 1 at 2009/08/11-16:12:02
    type:0
    SQL text from hgopars, id=1, len=55 ...
    00: 454C4553 41205443 63222E31 615F646F [SELECT A1."cod_a]
    10: 746E6567 31412C22 6564222E 615F6373 [gent",A1."desc_a]
    20: 746E6567 52462022 22204D4F 6E656761 [gent" FROM "agen]
    30: 22736574 204131 [tes" A1]
    Exiting hgopars, rc=0 at 2009/08/11-16:12:02
    Entered hgoopen, cursor id 1 at 2009/08/11-16:12:02
    hgoopen, line 83: NO hoada to print
    Exiting hgoopen, rc=0 at 2009/08/11-16:12:02
    Entered hgodscr, cursor id 1 at 2009/08/11-16:12:02
    Entered hgopcda at 2009/08/11-16:12:02
    Column:1(cod_agent): dtype:1 (CHAR), prc/scl:2/0, nullbl:0, octet:2, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2009/08/11-16:12:02
    Entered hgopcda at 2009/08/11-16:12:02
    Column:2(desc_agent): dtype:12 (VARCHAR), prc/scl:50/0, nullbl:0, octet:50, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2009/08/11-16:12:02
    hgodscr, line 506: Printing hoada @ 0x6c08f8
    MAX:2, ACTUAL:2, BRC:100, WHT=5
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    1 CHAR N 2 2 0/ 0 0 0 0 cod_agent
    12 VARCHAR N 50 50 0/ 0 0 0 0 desc_agent
    Exiting hgodscr, rc=0 at 2009/08/11-16:12:02
    Entered hgoftch, cursor id 1 at 2009/08/11-16:12:02
    hgoftch, line 117: Printing hoada @ 0x6c08f8
    MAX:2, ACTUAL:2, BRC:100, WHT=5
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    1 CHAR N 2 2 0/ 0 0 0 0 cod_agent
    12 VARCHAR N 50 50 0/ 0 0 0 0 desc_agent
    SQLBindCol: column 1, cdatatype: 1, bflsz: 3
    SQLBindCol: column 2, cdatatype: 1, bflsz: 51
    SQLFetch: row: 1, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 1, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 1, column 2, bflsz: 51, bflar: 16
    SQLFetch: row: 1, column 2, bflsz: 51, bflar: 16
    SQLFetch: row: 2, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 2, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 2, column 2, bflsz: 51, bflar: 26
    SQLFetch: row: 2, column 2, bflsz: 51, bflar: 26
    SQLFetch: row: 3, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 3, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 3, column 2, bflsz: 51, bflar: 33
    SQLFetch: row: 3, column 2, bflsz: 51, bflar: 33
    SQLFetch: row: 4, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 4, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 4, column 2, bflsz: 51, bflar: 35
    SQLFetch: row: 4, column 2, bflsz: 51, bflar: 35
    SQLFetch: row: 5, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 5, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 5, column 2, bflsz: 51, bflar: 6
    SQLFetch: row: 5, column 2, bflsz: 51, bflar: 6
    SQLFetch: row: 6, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 6, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 6, column 2, bflsz: 51, bflar: 5
    SQLFetch: row: 6, column 2, bflsz: 51, bflar: 5
    SQLFetch: row: 7, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 7, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 7, column 2, bflsz: 51, bflar: 27
    SQLFetch: row: 7, column 2, bflsz: 51, bflar: 27
    SQLFetch: row: 8, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 8, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 8, column 2, bflsz: 51, bflar: 26
    SQLFetch: row: 8, column 2, bflsz: 51, bflar: 26
    SQLFetch: row: 9, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 9, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 9, column 2, bflsz: 51, bflar: 34
    SQLFetch: row: 9, column 2, bflsz: 51, bflar: 34
    SQLFetch: row: 10, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 10, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 10, column 2, bflsz: 51, bflar: 32
    SQLFetch: row: 10, column 2, bflsz: 51, bflar: 32
    SQLFetch: row: 11, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 11, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 11, column 2, bflsz: 51, bflar: 31
    SQLFetch: row: 11, column 2, bflsz: 51, bflar: 31
    SQLFetch: row: 12, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 12, column 1, bflsz: 3, bflar: 2
    SQLFetch: row: 12, column 2, bflsz: 51, bflar: 22
    SQLFetch: row: 12, column 2, bflsz: 51, bflar: 22
    SQLFetch: row: 13, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 13, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 13, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 13, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 14, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 14, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 14, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 14, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 15, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 15, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 15, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 15, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 16, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 16, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 16, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 16, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 17, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 17, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 17, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 17, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 18, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 18, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 18, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 18, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 19, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 19, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 19, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 19, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 20, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 20, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 20, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 20, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 21, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 21, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 21, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 21, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 22, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 22, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 22, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 22, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 23, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 23, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 23, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 23, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 24, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 24, column 1, bflsz: 3, bflar: 0
    SQLFetch: row: 24, column 2, bflsz: 51, bflar: 0
    SQLFetch: row: 24, column 2, bflsz: 51, bflar: 0
    24 rows fetched
    Exiting hgoftch, rc=0 at 2009/08/11-16:12:02
    Entered hgoftch, cursor id 1 at 2009/08/11-16:12:02
    hgoftch, line 117: Printing hoada @ 0x6c08f8
    MAX:2, ACTUAL:2, BRC:24, WHT=5
    DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
    1 CHAR N 2 2 0/ 0 0 0 0 cod_agent
    12 VARCHAR N 16 50 0/ 0 0 0 0 desc_agent
    0 rows fetched
    Exiting hgoftch, rc=1403 at 2009/08/11-16:12:02
    Entered hgoclse, cursor id 1 at 2009/08/11-16:12:04
    Exiting hgoclse, rc=0 at 2009/08/11-16:12:04
    Entered hgodafr, cursor id 1 at 2009/08/11-16:12:04
    Exiting hgodafr, rc=0 at 2009/08/11-16:12:04
    Entered hgocomm at 2009/08/11-16:12:04
    keepinfo:0, tflag:1
    00: 54534554 3135352E 36616133 2E332E37 [TEST.5513aa67.3.]
    10: 36352E33 34 [3.564]
    tbid (len 10) is ...
    0: 00030003 00000234 0104 [....4.....]
    cmt(0):
    Entered hgocpctx at 2009/08/11-16:12:04
    Exiting hgocpctx, rc=0 at 2009/08/11-16:12:04
    Exiting hgocomm, rc=0 at 2009/08/11-16:12:04
    Entered hgolgof at 2009/08/11-16:12:04
    tflag:1
    Exiting hgolgof, rc=0 at 2009/08/11-16:12:04
    Entered hgoexit at 2009/08/11-16:12:04
    Exiting hgoexit, rc=0 at 2009/08/11-16:12:04
    Any idea or hint would be really appreciated!
    Thanks!

    Ok. Bad news.
    There is an unpublished bug 799360 UNSUPPORTED INFORMIX RELEASE ERROR RUNNING DG4IFMX 11.1.
    To workround the problem, choose either of the following:
    1. Apply fix for unpublished Bug 6799360 when it becomes available.
    2. Upgrade Informix to 9.4 or 10 as the problem does not happen with these versions.
    3. Use 10.2 TG4Informix until a fix for the 11g DG4Informix is available.
    None of them are valid if you don't have any control of the Informix databases and if your Oracle database is in 64 bits (tg4informix not availabe for 64 bits).

  • PL/SQL Using Cursor to Update Another Cursor

    Dear all,
    i am trying to do the below process ..i just wrote this code as an example ..can anyone give me idea how to acheive
    this .. i attached the error msg i am getting below ..
    CREATE OR REPLACE PROCEDURE EMP_COMPARE
    AS
    CURSOR c_emp_err
    IS
    SELECT EMPNO FROM EMP_ERR;
    CURSOR c_emp_cur
    IS
    SELECT EMPNO,FRST_NAME,LAST_NAME
    FROM EMP WHERE DEPTNO=20;
    BEGIN
    FOR r_emp IN c_emp_cur
    LOOP
    IF r_emp.EMPNO NOT IN(c_emp_err) --DONT PICK THE EMP'S WHICH ARE IN ERROR TABLE
    THEN
    UPDATE EMP SET APPLY_DATE=SYSDATE
    WHERE EMPNO=r_emp.EMPNO;
    END IF;
    END LOOP;
    END;
    ERR: PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Thanks in Advance ...

    Hi,
    I see.
    My answer still applies: don't use cursors if you don't have to. Look for a way to do what you need to using just SQL statements.
    If you really do have to use two cursors, where some values in one are taken from the other, you can have nested cursors.
    For exampe, using scott's tables, say you want to give a 10% salaray raise to everyone in any department based in a given city.
    You could have two cursors:
    (1) find each department based in the right city
    (2) find each employee in the current department from (1)
    CREATE OR REPLACE PROCEDURE     slow_update
    (     in_city_name     IN     VARCHAR2
    AS
         CURSOR     dept_csr     (target_loc     VARCHAR2)
         IS     SELECT     deptno
              FROM     dept
              WHERE     loc     = UPPER (target_loc);
         CURSOR     emp_csr     (target_deptno     NUMBER)
         IS     SELECT     empno
              FROM     emp
              WHERE     deptno     = target_deptno;
    BEGIN
         FOR     dept_rec IN dept_csr (in_city_name)
         LOOP
              FOR     emp_rec IN emp_csr (dept_rec.deptno)
              LOOP
                   UPDATE     emp
                   SET     sal     = sal * 1.1
                   WHERE     empno     = emp_rec.empno;
              END LOOP;
         END LOOP;
    END     slow_update;Notice how I used parameters in the cursors.
    You would run the procedure like this:
    EXECUTE  slow_update ('Dallas');Repeat: This is for demonstration purposes only.
    The smart way to do such an UPDATE doesn't require cursors or PL/SQL:
    UPDATE     emp
    SET     sal     = sal * 1.1
    WHERE     deptno     IN     (
                   SELECT     deptno
                   FROM     dept
                   WHERE     loc     = UPPER (:target_city_name)
                   );

  • Data Warehouse Cursor Problem

    I am trying to complete a piece of work for College but am having trouble with the completion of a cursor. The object of this small project is to create a very basic data warehouse from an operational system.
    I have populated all of the dimension tables except one which is to be populated with the FACT table. These tables are to be populated with the cursor I am trying to complete.
    I having difficulty understanding what the first select statement in the cursor does. For the region dimension table, I was asked to create a sequence to use as the primary key (region_id). The region_id in the operational table has different values e.g. 6000, 6001.
    'dw_op' is the schema on the operation table which is accessed through the DB link 'q_link'.
    Any thoughts on what is required to complete this cursor would be a big help.
    Here is the incomplete anonymous block and cursor:
    declare
         cursor c_sales is
              select order_line.product_id, order_line.quantity,
              product.unit_cost, product.unit_price, ord.client_id,
              ord.SALES_REP_ID, ord.order_date from dw_op.ord@q_link, dw_op.order_line@q_link,
              dw_op.product@q_link
              where ord.order_id = order_line.order_id AND
              order_line.product_id = product.product_id...
         s_value number;
         s_cost number;
         begin
         for c_rec in c_sales loop
              select region_id into r_id
              from region where region_name =
                   (select region_name from dw_op.sales_region@q_link,
                   dw_op.sales_rep@q_link where sales_region.region_id =
                   sales_rep.region_id and SR_id = c_rec.SALES_REP_ID);
              select time_seq.nextval into s_time from dual;
              Insert into time values (s_time, s_day, s_month, s_year ... );
              s_value := ... // how much it costs the company, unit_price * something?
              s_cost := ... // time something by the quantity
    INSERT INTO sale VALUES (ord.client_id, order_line.product_id, ord.SALES_REP_ID, r_id, s_time, order_line.quantity,
    s_value, s_cost); // need to find out how to enter select info into table
         end loop
    end;

    You may have an IO problem but you may also have a design issue/configuration issue. what you are seeing is multiple session waiting for the same block, if 20 sessions all request the same block one will read it form disk (db file scattered read or db file sequential read) and 19 session will wailt on read by other session and then get the block from the cache.
    there do seem to be a very high number of waits for read by other session in the database so you may want to investigate exactly what sql is waiting on this event and if you could benifit form either a larger buffer cache or using te keep and recycle pools to manage frequently accessed tables better. Otherwise investigate the SQL that is perfomring the most IO and tune it to do less work.
    Chris

  • Position Cursor on a specific SO line in VA01 / 02

    Hi,
      I have a requirement to do some validation in the User Exit, SAVE_DOC_PREPARE for VA01 / 02. If there is a Error, I want the cursor to be positioned on the specific line item which had this error. Please note the above exit gets called the user presses the 'Save' buttn, so this can happen from any screen.
    Regards,
    SG..

    why don't you do the same thing with incompletion log procedure...system will take the user to that particular field and he can proceed with 'save' option in both VA01/02.
    Reward Points if it helps,
    Regards,
    N

  • BIB-9009 Oracle OLAP could not create cursor.

    Hi,
    I am working on OLAP catalog. I created one cube and 6 Dim. And OEM Console mgs showing this as valid CUbe. When I m trying to create Presentation after selecting my Measure it gives this error:-
    oracle.dss.dataSource.common.QueryRuntimeException: BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.ExpressServerExceptionError class: OLAPI
    Server error descriptions:
    DPR: Unable to execute the query, Generic at TxsOqCursorManager::fetchInitialBlocks
    SEL: Unexpected error occurred. Contact Oracle Support!, Generic at null
    java.lang.CloneNotSupportedException: BIB-9009 Oracle OLAP could not create cursor.
    oracle.express.ExpressServerExceptionError class: OLAPI
    Server error descriptions:
    DPR: Unable to execute the query, Generic at TxsOqCursorManager::fetchInitialBlocks
    SEL: Unexpected error occurred. Contact Oracle Support!, Generic at null
    void oracle.dss.dataSource.common.QueryDataDirector.addDataDirectorListener(oracle.dss.util.DataDirectorListener)
    QueryDataDirector.java:687
    void oracle.dss.dataView.ModelAdapter.setDataDirector(oracle.dss.util.DataDirector)
    ModelAdapter.java:145
    void oracle.dss.crosstab.CrosstabModelAdapter.setDataSource(oracle.dss.util.DataSource)
    CrosstabModelAdapter.java:49
    void oracle.dss.dataView.Dataview.setDataSource(oracle.dss.util.DataSource)
    Dataview.java:386
    void oracle.dss.addins.wizard.presentation.PresentationWizardState.applyQuery()
    PresentationWizardState.java:106
    void oracle.dss.addins.wizard.presentation.PresentationWizardDialog.wizardFinished(oracle.bali.ewt.wizard.WizardEvent)
    It is little urgent.
    JDev version is 9.0.3.3 (Build 1205)
    Business Comp Version 9.0.3.11.50
    OS Win 2000 Proff
    DOwn Loaded BIBean9032 and bibeans90321 patch

    I suspect your metadata is incomplete. Please refer to the bi_checkconfig utility to test your metadata. This can be found on the documentation section of the BI Beans section of OTN:
    Displaying Information about your BI Beans Client Configuration using the bi_checkconfig utility
    http://www.oracle.com/technology/products/bib/htdocs/904/tech_notes/bicheckconfig/bi_checkconfig_tn.html
    This will allow you to test the structures in your metadata to ensure each object (dimension, cube) can in fact be queried.
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • PROCEDURE WITH CURSOR ERROR

    I wanted to have a cursor in my procedure having results from different tables and different databases. I successfully created the query and compiled it using the procedure builder. However, when i was about to create it as stored procedure in iSQLplus, it displayed a warning. It says "Procedure created wuth compilation error." The first error is "PLS-00341: declaration of cursor 'SUBJ_CUR' is incomplete or malformed"
    Here's a piece of my code:
    PROCEDURE assess(STUD_ID VARCHAR2, STUD_YEAR NUMBER, STUD_TYPE CHAR) IS
    CURSOR subj_cur IS
    SELECT e.student_id, s.subject_id, s.subj_code, s.subject_title, s.units, s.pay_units,
    d.department_name, s.tuition_fee_type, s.lab_fee_type, f.year, f.amount
    FROM regist.enrol e, regist.offering o, regist.subject s,
    fee_details f, regist.student st, regist.department d
    WHERE (e.student_id = STUD_ID) AND (e.offering_id = o.offering_id) AND
    (o.subject_id = s.subject_id) AND (f.fee_no = s.tuition_fee_type) AND
    (st.student_id=e.student_id) AND ((f.year = STUD_YEAR) OR (f.year=0)) AND
    (s.department_id = d.department_id);
    regist and system are databases.
    Can anyone tell me where did I go wrong?
    I resorted though in creating views, however I still received an error. It says, "Insufficient privileges"
    Help me please..... I really need it badly..

    First of all, I've no experience with iSQLplus. I'm just wondering in which database the table fee_details is: system or regist? You didn't prefix the table.

Maybe you are looking for