OCI-22303: type "SCOTT"."ODP_NT_SAMPLE_PERSON_COLL_TYPE" no

Good day!
I'm trying to get the UDT sample code for NestedTable to run but I am getting this error.
However, I can describe the type (in SqlPlus) so it seems to be valid.
The source database is a 9.2.0.4 version. Would this be part of the problem?
Thanks

Please disregard this post. I found the problem. It's working now.
mea culpa

Similar Messages

  • OCI-22303: type ""."DISCREPTABTYP"

    OCI-22303: type ""."DISCREPTABTYP" not found:BEGIN
    timeKeeper_package.discrepancy2(:unit, :startdate, :enddate, :unknown_tb, :belongWork_tb, :floatIn_tb, :floatOut_tb);
    END;
    I am getting the above error when I am running at OCI program through a web application. This did work on another server 2 years ago. Project got put on hold and now that DB on that server can be restarted, I need to install in on a new server and db. I created this type for a user and granted permissions to public. I think it is either some sort of permission problem or patch problem. When I orginally worked on project it was in oracle 9i and one of last things I did was upgrade db to 11g. I don't know if I had to make some sort of change when I did that upgrade. But I need to get it working again on a 9i database (9.2.0.3.0)
    Below I have include 3 parts that I think make up the the problem
    1) The oci code that is giving error message
    2) The sql that creates the type
    3) The package that the OCI program is trying to run ( i had to remove comments for max length in oracle forums)
    So I am looking for help on what I might be missing or re createing this application. I kind of think I may have had to do something different with creating the type. For all of the .sql I just ran them as same user that owns all of my other tables.
    1) Below is line from OCI program that is failing
    if (ociCheckError("timeDiscrepancy.c(8008)", OCITypeByName(hba.envhp, hba.errhp, hba.svchp,
    (text *) 0, (ub4) 0, (text *) "DISCREPTABTYP", (ub4) strlen((const char *) "DISCREPTABTYP"),
    (CONST text *) 0, (ub4) 0, OCI_DURATION_SESSION, OCI_TYPEGET_HEADER,
    &discreptab_tdo), TRUE, &hba) == -1) {
    callMessage(&hba);
    deconstructHba(&hba);
    return (0);
    2) Below is sql that crated type
    drop type discrepTabTyp;
    Create or Replace Type discrepancyType as object(
    empcd varchar2(12),
    skilltpe varchar2(9),
    hprdcode varchar2(6),
    wprdcode varchar2(6),
    strtdate date,
    enddate date,
    empupdate date,
    empfnme varchar2(12),
    empmint varchar2(2),
    emplnme varchar2(20),
    prodcode varchar2(6),
    startscan date,
    endscan date,
    origstart date,
    reason varchar2(23),
    timeupdate date)
    GRANT EXECUTE ON DISCREPANCYTYPE TO public;
    CREATE PUBLIC SYNONYM DISCREPANCYTYPE FOR DISCREPANCYTYPE;
    Create or Replace type discrepTabTyp is table of discrepancyType
    GRANT EXECUTE ON DISCREPTABTYP TO public;
    CREATE PUBLIC SYNONYM DISCREPTABTYP FOR DISCREPTABTYP;
    3) Below is the package that the OCI program is trying to run
    create or replace package timeKeeper_package as
    Type empschdRec IS RECORD (
    hprdcode empschd.hprdcode%type,
    empcd empschd.empcode%type,
    skilltpe empschd.skilltpe%type,
    wprdcode empschd.wprdcode%type,
    strtdate date,
    enddate date,
    lastupdate date,
    match pls_integer);
    Type timeRec IS RECORD (
    prodcode time_keeper.prodcode%type,
    empcd time_keeper.empcode%type,
    origstart date,
    startscan date,
    endscan date,
    lastupdate date,
    match pls_integer);
    Type discrepancyRec IS RECORD (
    empcd empschd.empcode%type DEFAULT '',
    skilltpe empschd.skilltpe%type DEFAULT'',
    hprdcode empschd.hprdcode%type DEFAULT '',
    wprdcode empschd.wprdcode%type DEFAULT '',
    strtdate date DEFAULT NULL,
    enddate date DEFAULT NULL,
    empupdate date DEFAULT NULL,
    empfnme empcode.empfnme%type DEFAULT ' ',
    empmint empcode.empmint%type DEFAULT ' ',
    emplnme empcode.emplnme%type DEFAULT ' ',
    prodcode time_keeper.prodcode%type DEFAULT '',
    startscan date DEFAULT NULL,
    endscan date DEFAULT NULL,
    origstart date DEFAULT NULL,
    timeupdate date DEFAULT NULL,
    reason varchar2(23) DEFAULT '');
    type empArray is table of empschdRec index by pls_integer;
    type timeArray is table of timeRec index by pls_integer;
    type discrepancyArray is table of discrepancyRec index by pls_integer;
    procedure discrepancy (unit in prodcode.prodcode%type, start_date date, end_date date,
    unknown_tb in out discrepancyArray, belongWork_tb in out discrepancyArray,
    floatIn_tb in out discrepancyArray, floatOut_tb in out discrepancyArray);
    procedure discrepancy2 (unit in prodcode.prodcode%type,
    start_date date, end_date date,
    unknown_tab out discrepTabTyp, belongWork_tab out discrepTabTyp,
    floatIn_tab out discrepTabTyp, floatOut_tab out discrepTabTyp);
    procedure match (unit in prodcode.prodcode%type, start_date date, end_date date,
    empschd_tb out empArray, time_keeper_tb out timeArray);
    end timeKeeper_package;
    create or replace package body timeKeeper_package as
    Type empcodeRec IS RECORD (
    prodcode empcode.prodcode%type,
    empcd empcode.empcode%type,
    bskiltpe empcode.bskiltpe%type,
    empfnme empcode.empfnme%type,
    empmint empcode.empmint%type,
    emplnme empcode.emplnme%type,
    swipe empcode.swipe%type,
    home_swipe empcode.home_swipe%type);
    type empcodeArray is table of empcodeRec index by pls_integer;
    function empcode_find (empcd empcode.empcode%type, emcdTable empcodeArray,
    maxIndex int) return int;
    procedure add_discrepancy (unit in prodcode.prodcode%type,
    unknown_tb in out discrepancyArray,
    belongWork_tb in out discrepancyArray,floatIn_tb in out discrepancyArray,
    floatOut_tb in out discrepancyArray,
    empcode_tb empcodeArray, empcdIndex pls_integer,
    empschd_tb empArray,schdIndex pls_integer,
    time_keeper_tb timeArray, timeIndex pls_integer, reason varchar2);
    procedure match (unit in prodcode.prodcode%type, start_date date, end_date date,
    empschd_tb out empArray, time_keeper_tb out timeArray) as
    CURSOR schd_cursor is
    select empschd.hprdcode,empschd.empcode,empschd.skilltpe,empschd.wprdcode,
    empschd.strtdate,empschd.enddate, empschd.lastupdate, 0
    from empschd,empcode
    where (empschd.hprdcode = unit or empschd.wprdcode = unit) and
    (empschd.strtdate between start_date and end_date or
    empschd.enddate between start_date and end_date)
    and empschd.openclsd = 'OPEN' and empcode.empcode = empschd.empcode and
    empcode.swipe = 'Y' and empcode.termcode is null
    order by empschd.empcode,empschd.strtdate,empschd.enddate;
    CURSOR time_cursor is
    select time_keeper.prodcode, time_keeper.empcode, time_keeper.origstart,
    time_keeper.startscan, time_keeper.endscan, time_keeper.lastupdate, 0
    from time_keeper, prodcode
    where (time_keeper.empcode in (select empcode from empcode where prodcode = unit)
    or time_keeper.prodcode = unit) and
    (time_keeper.startscan between (start_date - (prodcode.scan_reset/24))
    and (end_date + (prodcode.scan_reset/24)) or
    time_keeper.endscan between (start_date - (prodcode.scan_reset/24))
    and (end_date + (prodcode.scan_reset/24))) and
    time_keeper.active = 'Y' and prodcode.prodcode = unit
    order by time_keeper.empcode, time_keeper.startscan, time_keeper.endscan;
    timeIndex integer; -- current index in time_keeper_tb
    diffCurrent float; -- difference between current empschd and time keeper start dates
    diffNext float; -- difference between current empschd and next time keeper start dates
    diffEmp2 float; -- difference between next empschd 7 current time keeper start dates
    BEGIN
    open schd_cursor;
    fetch schd_cursor bulk collect into empschd_tb;
    close schd_cursor;
    open time_cursor;
    fetch time_cursor bulk collect into time_keeper_tb;
    close time_cursor;
    if (empschd_tb.FIRST is not NULL and time_keeper_tb.FIRST is not NULL) then
    timeIndex := 1;
    for i in empschd_tb.FIRST .. empschd_tb.LAST
    loop
    while (timeIndex <= time_keeper_tb.LAST and (time_keeper_tb(timeIndex).match != 0 or
    time_keeper_tb(timeIndex).empcd != empschd_tb(i).empcd))
    loop
    timeIndex := timeIndex + 1;
    end loop;
    if (timeIndex > time_keeper_tb.LAST) then
    timeIndex := 1;
    else
    diffCurrent := abs (empschd_tb(i).strtdate - time_keeper_tb(timeIndex).startscan);
    while (timeIndex < time_keeper_tb.LAST and
    time_keeper_tb(timeIndex).empcd = empschd_tb(i).empcd)
    loop
    if (timeIndex+1 <= time_keeper_tb.LAST and
    empschd_tb(i).empcd = time_keeper_tb(timeIndex+1).empcd) then
    diffNext := abs (empschd_tb(i).strtdate - time_keeper_tb(timeIndex+1).startscan);
    else
    diffNext := diffCurrent;
    end if;
    exit when diffCurrent <= diffNext;
    timeIndex := timeIndex + 1;
    diffCurrent := diffNext;
    end loop; -- end while finding closesest empschd
    if (i+1 <= empschd_tb.LAST and
    empschd_tb(i+1).empcd = time_keeper_tb(timeIndex).empcd) then
    diffEmp2 := abs (empschd_tb(i+1).strtdate - time_keeper_tb(timeIndex).startscan);
    else
    diffEmp2 := diffCurrent;
    end if;
    -- decide which time keeper record to match to current empschd record
    if (diffCurrent <= diffEmp2) then
    empschd_tb(i).match := timeIndex;
    time_keeper_tb(timeIndex).match := i;
    timeIndex := timeIndex+1;
    else
    -- if previous time_keeper record is unmatched,
    -- then match it to current empschd else it remains unmatched
    if (timeIndex > 1 and time_keeper_tb(timeIndex-1).match = 0 and
    empschd_tb(i).empcd = time_keeper_tb(timeIndex-1).empcd) then
    empschd_tb(i).match := timeIndex-1;
    time_keeper_tb(timeIndex-1).match := i;
    end if;
    end if; -- end else next empschd was closer
    end if;
    end loop; -- end for each empschd
    end if;
    -- utl_file.fclose (fip);
    END match;
    procedure discrepancy (unit in prodcode.prodcode%type,
    start_date date, end_date date,
    unknown_tb in out discrepancyArray, belongWork_tb in out discrepancyArray,
    floatIn_tb in out discrepancyArray, floatOut_tb in out discrepancyArray) as
    -- read in all non terminated employee records
    CURSOR emp_cursor is
    select prodcode, empcode, bskiltpe, empfnme, nvl(empmint,' '), emplnme,
    swipe, home_swipe
    from empcode
    where termcode is null
    order by empcode;
    empcode_tb empcodeArray; -- holds non terminated employee array
    employee_index pls_integer; -- current employee in empcode_tb
    timeKeeper_indx pls_integer; -- current time keeper record
    empschd_tb empArray; -- holds employee schedule data
    time_keeper_tb timeArray; -- holds time keeper data
    unitgrace number (38,34); -- unit's grace time
    found boolean; -- indicates if discrepancy found
    reason varchar2(23); -- the reason of discrepancy
    fip utl_file.file_type;
    begin
    -- this places record in all_directories table which seems to be used by fopen
    fip := utl_file.fopen ('TIME_KEEP_DIR','discrepancy.pr','w',500);
    -- read and convert grace time for unit from minutes to fraction
    -- of 1 day for date comparisons
    select (grace_time / 60)/24
    into unitgrace
    from prodcode where prodcode = unit;
    -- get the employee records to validate employee codes scanned
    open emp_cursor;
    fetch emp_cursor bulk collect into empcode_tb;
    close emp_cursor;
    utl_file.put_line(fip, 'match start '|| to_char (start_date, 'MM/DD/YYYY HH:MI:SS AM') ||
    ' End: ' || to_char (end_date, 'MM/DD/YYYY HH:MI:SS AM'), TRUE);
    -- given a unit, start time and end time, read in and match employee schedule
    -- and time keeper records to each other.
    timeKeeper_package.match (unit, start_date, end_date, empschd_tb, time_keeper_tb);
    -- print out employee schedule records
    utl_file.new_line(fip,1);
    utl_file.put_line (fip, 'EMPLOYEE SCHEDULE RECORDS');
    utl_file.new_line(fip,1);
    if (empschd_tb.FIRST is not NULL) then
    for j in empschd_tb.FIRST ..empschd_tb.LAST
    loop
    utl_file.put_line(fip, 'index: '||j||' match: '||empschd_tb(j).match||' empcode: '||
    empschd_tb(j).empcd ||' '|| ' skill: '|| empschd_tb(j).skilltpe ||
    ' Home: ' || empschd_tb(j).hprdcode || ' Work: ' || empschd_tb(j).wprdcode ||
    ' Start: '|| to_char (empschd_tb(j).strtdate, 'MM/DD/YYYY HH:MI:SS AM') ||
    ' End: ' || to_char (empschd_tb(j).enddate, 'MM/DD/YYYY HH:MI:SS AM'), TRUE);
    end loop;
    end if;
    -- print the time keeper scan data
    utl_file.new_line(fip,1);
    utl_file.put_line (fip, 'TIME KEEPER RECORDS');
    utl_file.new_line(fip,1);
    if (time_keeper_tb.FIRST is not NULL) then
    for i in time_keeper_tb.FIRST ..time_keeper_tb.LAST
    loop
    utl_file.put_line(fip,'Index: '||i||' match: '|| time_keeper_tb(i).match||
    ' empcode: ' || time_keeper_tb(i).empcd ||
    ' Start: '|| to_char (time_keeper_tb(i).startscan, 'MM/DD/YYYY HH:MI:SS AM') ||
    ' End: ' || to_char (time_keeper_tb(i).endscan, 'MM/DD/YYYY HH:MI:SS AM'),TRUE);
    end loop;
    end if;
    -- perform discrepancy logic between empschd and time keeper records
    timeKeeper_indx := 1;
    -- go through all empschd records
    if (empschd_tb.FIRST is not NULL) then
    for i in empschd_tb.FIRST ..empschd_tb.LAST loop
    -- find the next time keeper record that has same empcode as current empschd
    while (time_keeper_tb(timeKeeper_indx).empcd <= empschd_tb(i).empcd) loop
    if (time_keeper_tb(timeKeeper_indx).match = 0) then
    -- check if time keeper record is with in start and end date range if not
    -- skip record else have a descrepancy which need to figured out. It can
    -- only be 1 of 2 possiblities since there is no matching empshcd record.
    if NOT((time_keeper_tb(timeKeeper_indx).startscan < start_date and
    time_keeper_tb(timeKeeper_indx).endscan < start_date) or
    (time_keeper_tb(timeKeeper_indx).startscan > end_date and
    time_keeper_tb(timeKeeper_indx).endscan > end_date)) then
    employee_index := empcode_find (time_keeper_tb(timeKeeper_indx).empcd,
    empcode_tb, empcode_tb.LAST);
    found := false;
    -- figure out reason of descrepancy
    if (employee_index < 0) then
    found := true;
    reason := 'Unknown Employee-Swipe';
    else
    found := true;
    reason := 'Not Scheduled, Swipe-in';
    end if;
    if (found = true) then
    add_discrepancy (unit,unknown_tb, belongWork_tb, floatIn_tb, floatOut_tb,
    empcode_tb, employee_index,
    empschd_tb, -1, time_keeper_tb, timeKeeper_indx, reason);
    end if;
    end if;
    end if; -- end if time keeper match = 0
    timeKeeper_indx := timeKeeper_indx + 1;
    end loop; -- end while time keeper empcode <= empschd empcode
    employee_index := empcode_find (empschd_tb(i).empcd, empcode_tb, empcode_tb.LAST);
    found := false;
    -- if current empschd has no match then check for descrepancy
    if (empschd_tb(i).match = 0) then
    if (employee_index < 0) then
    found := true;
    reason := 'Unknown Employee-Sched';
    elsif ((empschd_tb(i).strtdate + unitgrace) < sysdate) then
    found := true;
    reason := 'Scheduled, no swipe-in';
    end if;
    if (found = true) then
    add_discrepancy (unit,unknown_tb, belongWork_tb, floatIn_tb, floatOut_tb,
    empcode_tb, employee_index,
    empschd_tb, i, time_keeper_tb, -1, reason);
    end if;
    else
    -- empschd has a match, check for descrepancies
    case
    when time_keeper_tb(empschd_tb(i).match).prodcode != empschd_tb(i).wprdcode and
    empcode_tb(employee_index).home_swipe = 'N' then
    found := true;
    reason := 'Swiped into wrong unit';
    when time_keeper_tb(empschd_tb(i).match).endscan is NULL and
    (empschd_tb(i).enddate + unitgrace) < sysdate then
    found := true;
    reason := 'Swipe-in, no Swipe-out';
    when (time_keeper_tb(empschd_tb(i).match).startscan + unitgrace) <
    empschd_tb(i).strtdate then
    found := true;
    reason := 'Swipe-in early';
    when (time_keeper_tb(empschd_tb(i).match).startscan - unitgrace) >
    empschd_tb(i).strtdate then
    found := true;
    reason := 'Swipe-in late';
    when (time_keeper_tb(empschd_tb(i).match).endscan + unitgrace) <
    empschd_tb(i).enddate then
    found := true;
    reason := 'Swipe-out early';
    when (time_keeper_tb(empschd_tb(i).match).endscan - unitgrace) >
    empschd_tb(i).enddate then
    found := true;
    reason := 'Swipe-out late';
    else
    found := false;
    end case;
    if (found = true) then
    add_discrepancy (unit,unknown_tb, belongWork_tb, floatIn_tb, floatOut_tb,
    empcode_tb, employee_index,
    empschd_tb, i, time_keeper_tb, empschd_tb(i).match, reason);
    end if;
    end if;
    end loop; -- end for each empschd
    -- process all unproccesed time_keeper records with match value of 0
    while (timeKeeper_indx <= time_keeper_tb.LAST) loop
    if (time_keeper_tb(timeKeeper_indx).match = 0) then
    -- check if time keeper record is with in start and end date range if not
    -- skip record else have a descrepancy which need to figured out. It can
    -- only be 1 of 2 possiblities since there is no matching empshcd record.
    if NOT((time_keeper_tb(timeKeeper_indx).startscan < start_date and
    time_keeper_tb(timeKeeper_indx).endscan < start_date) or
    (time_keeper_tb(timeKeeper_indx).startscan > end_date and
    time_keeper_tb(timeKeeper_indx).endscan > end_date)) then
    employee_index := empcode_find (time_keeper_tb(timeKeeper_indx).empcd,
    empcode_tb, empcode_tb.LAST);
    found := false;
    -- figure out reason of descrepancy
    if (employee_index < 0) then
    found := true;
    reason := 'Unknown Employee-Swipe';
    else
    found := true;
    reason := 'Not Scheduled, Swipe-in';
    end if;
    if (found = true) then
    add_discrepancy (unit,unknown_tb, belongWork_tb, floatIn_tb, floatOut_tb,
    empcode_tb, employee_index,
    empschd_tb, -1, time_keeper_tb, timeKeeper_indx, reason);
    end if;
    end if;
    end if; -- end if time keeper match = 0
    timeKeeper_indx := timeKeeper_indx + 1;
    end loop; -- end while time keeper records unproccesed
    else
    utl_file.put_line (fip, 'In check time_keeper because empschd is NULL');
    if (time_keeper_tb.FIRST is not NULL) then
    utl_file.put_line (fip, 'In time keeper not null');
    for i in time_keeper_tb.FIRST ..time_keeper_tb.LAST
    loop
    if NOT((time_keeper_tb(i).startscan < start_date and
    time_keeper_tb(i).endscan < start_date) or
    (time_keeper_tb(i).startscan > end_date and
    time_keeper_tb(i).endscan > end_date)) then
    employee_index := empcode_find (time_keeper_tb(i).empcd,
    empcode_tb, empcode_tb.LAST);
    found := false;
    -- figure out reason of descrepancy
    if (employee_index < 0) then
    found := true;
    reason := 'Unknown Employee-Swipe';
    else
    found := true;
    reason := 'Not Scheduled, Swipe-in';
    end if;
    utl_file.put_line (fip, 'before if found true');
    if (found = true) then
    add_discrepancy (unit,unknown_tb, belongWork_tb, floatIn_tb, floatOut_tb,
    empcode_tb, employee_index,
    empschd_tb, -1, time_keeper_tb, timeKeeper_indx, reason);
    utl_file.put_line (fip, 'after add discrepancy');
    end if;
    end if;
    end loop;
    end if;
    end if;
    -- print out discrepancy data
    utl_file.put_line (fip, 'Unknown Employees');
    if (unknown_tb.FIRST is not NULL) then
    for j in unknown_tb.FIRST ..unknown_tb.LAST
    loop
    utl_file.put_line(fip, 'index: '||j|| ' empcode: '||unknown_tb(j).empcd ||
    ' skill: '||unknown_tb(j).skilltpe ||
    ' Home: '|| unknown_tb(j).hprdcode || ' Work: '||
    unknown_tb(j).wprdcode||' Start: '||
    to_char (unknown_tb(j).strtdate, 'MM/DD/YYYY HH:MI:SS AM') ||
    ' End: ' || to_char (unknown_tb(j).enddate, 'MM/DD/YYYY HH:MI:SS AM') ||
    ' Name: '|| unknown_tb(j).empfnme ||
    ' '||unknown_tb(j).empmint||' '|| unknown_tb(j).emplnme, TRUE);
    utl_file.put_line(fip,'time prod: '||unknown_tb(j).prodcode||' scan start '||
    to_char (unknown_tb(j).startscan, 'MM/DD/YYYY HH:MI:SS AM')||' scan end '||
    to_char (unknown_tb(j).endscan, 'MM/DD/YYYY HH:MI:SS AM')||' Original start '||
    to_char (unknown_tb(j).origstart, 'MM/DD/YYYY HH:MI:SS AM'), TRUE);
    utl_file.put_line(fip, 'Reason: '|| unknown_tb(j).reason,TRUE);
    utl_file.new_line(fip,1);
    end loop;
    end if;
    utl_file.put_line (fip, 'Employees Belong and Work in Unit');
    if (belongWork_tb.FIRST is not NULL) then
    for j in belongWork_tb.FIRST ..belongWork_tb.LAST
    loop
    utl_file.put_line(fip, 'index: '||j|| ' empcode: '||belongWork_tb(j).empcd ||
    ' skill: '||belongWork_tb(j).skilltpe ||
    ' Home: '|| belongWork_tb(j).hprdcode ||
    ' Work: '|| belongWork_tb(j).wprdcode||' Start: '||
    to_char (belongWork_tb(j).strtdate, 'MM/DD/YYYY HH:MI:SS AM') ||
    ' End: ' || to_char (belongWork_tb(j).enddate, 'MM/DD/YYYY HH:MI:SS AM') || ' Name: '||
    belongWork_tb(j).empfnme ||
    ' '||belongWork_tb(j).empmint||' '|| belongWork_tb(j).emplnme, TRUE);
    utl_file.put_line(fip,'time prod: '||belongWork_tb(j).prodcode||' scan start '||
    to_char (belongWork_tb(j).startscan, 'MM/DD/YYYY HH:MI:SS AM')||' scan end '||
    to_char (belongWork_tb(j).endscan, 'MM/DD/YYYY HH:MI:SS AM')||' Original start '||
    to_char (belongWork_tb(j).origstart, 'MM/DD/YYYY HH:MI:SS AM'), TRUE);
    utl_file.put_line(fip, 'Reason: '|| belongWork_tb(j).reason,TRUE);
    utl_file.new_line(fip,1);
    end loop;
    end if;
    utl_file.put_line (fip, 'Employees Floated into Unit');
    if (floatIn_tb.FIRST is not NULL) then
    for j in floatIn_tb.FIRST ..floatIn_tb.LAST
    loop
    utl_file.put_line(fip, 'index: '||j|| ' empcode: '||floatIn_tb(j).empcd ||
    ' skill: '|| floatIn_tb(j).skilltpe ||
    ' Home: '|| floatIn_tb(j).hprdcode ||
    ' Work: '|| floatIn_tb(j).wprdcode||' Start: '||
    to_char (floatIn_tb(j).strtdate, 'MM/DD/YYYY HH:MI:SS AM') ||
    ' End: ' || to_char (floatIn_tb(j).enddate, 'MM/DD/YYYY HH:MI:SS AM') || ' Name: '||
    floatIn_tb(j).empfnme ||
    ' '||floatIn_tb(j).empmint||' '|| floatIn_tb(j).emplnme, TRUE);
    utl_file.put_line(fip,'time prod: '||floatIn_tb(j).prodcode||' scan start '||
    to_char (floatIn_tb(j).startscan, 'MM/DD/YYYY HH:MI:SS AM')||' scan end '||
    to_char (floatIn_tb(j).endscan, 'MM/DD/YYYY HH:MI:SS AM')||' Original start '||
    to_char (floatIn_tb(j).origstart, 'MM/DD/YYYY HH:MI:SS AM'), TRUE);
    utl_file.put_line(fip, 'Reason: '|| floatIn_tb(j).reason,TRUE);
    utl_file.new_line(fip,1);
    end loop;
    end if;
    utl_file.put_line (fip, 'Employees Floated out of unit');
    if (floatOut_tb.FIRST is not NULL) then
    for j in floatOut_tb.FIRST ..floatOut_tb.LAST
    loop
    utl_file.put_line(fip, 'index: '||j|| ' empcode: '||floatOut_tb(j).empcd ||
    ' skill: '||floatOut_tb(j).skilltpe ||
    ' Home: '|| floatOut_tb(j).hprdcode ||
    ' Work: '|| floatOut_tb(j).wprdcode||' Start: '||
    to_char (floatOut_tb(j).strtdate, 'MM/DD/YYYY HH:MI:SS AM') ||
    ' End: ' || to_char (floatOut_tb(j).enddate, 'MM/DD/YYYY HH:MI:SS AM') || ' Name: '||
    floatOut_tb(j).empfnme ||
    ' '||floatOut_tb(j).empmint||' '|| floatOut_tb(j).emplnme, TRUE);
    utl_file.put_line(fip,'time prod: '||floatOut_tb(j).prodcode||' scan start '||
    to_char (floatOut_tb(j).startscan, 'MM/DD/YYYY HH:MI:SS AM')||' scan end '||
    to_char (floatOut_tb(j).endscan, 'MM/DD/YYYY HH:MI:SS AM')||' Original start '||
    to_char (floatOut_tb(j).origstart, 'MM/DD/YYYY HH:MI:SS AM'), TRUE);
    utl_file.put_line(fip, 'Reason: '|| floatOut_tb(j).reason,TRUE);
    utl_file.new_line(fip,1);
    end loop;
    end if;
    utl_file.fclose (fip);
    end discrepancy;
    procedure add_discrepancy (unit in prodcode.prodcode%type,
    unknown_tb in out discrepancyArray,
    belongWork_tb in out discrepancyArray,floatIn_tb in out discrepancyArray,
    floatOut_tb in out discrepancyArray,
    empcode_tb empcodeArray, empcdIndex pls_integer,
    empschd_tb empArray,schdIndex pls_integer,
    time_keeper_tb timeArray, timeIndex pls_integer, reason varchar2) as
    array_tb discrepancyArray; -- current array to add discrepancy to
    indx pls_integer; -- index of new record in current array
    selector pls_integer; -- flag indicates which array record will
    -- be added to. These are HBA Hard coded values
    -- 1 - The unknown array
    -- 2 - The belong and work in unit array
    -- 3 - The floated into this unit array
    -- 4 - The floated out of this unit array
    begin
    -- check if you have a valid employee, if not data goes into unknown_tb array
    if (empcdIndex <= 0) then
    array_tb := unknown_tb;
    selector := 1;
    -- if have no empschd record but do have time keeper, determine
    -- which array data goes into
    elsif (schdIndex <= 0 and timeIndex > 0) then
    if (unit = time_keeper_tb(timeIndex).prodcode and
    empcode_tb(empcdIndex).prodcode = unit) then
    array_tb := belongWork_tb;
    selector := 2;
    elsif (unit = time_keeper_tb(timeIndex).prodcode and
    empcode_tb(empcdIndex).prodcode != unit) then
    array_tb := floatIn_tb;
    selector := 3;
    else
    array_tb := floatOut_tb;
    selector := 4;
    end if;
    -- if have employee schedule record, determine which array data
    -- goes into. You should never be able to get past this point
    elsif (schdIndex > 0) then
    if (unit = empschd_tb(schdIndex).wprdcode and
    empschd_tb(schdIndex).hprdcode = unit) then
    array_tb := belongWork_tb;
    selector := 2;
    elsif (unit = empschd_tb(schdIndex).wprdcode and
    empschd_tb(schdIndex).hprdcode != unit) then
    array_tb := floatIn_tb;
    selector := 3;
    else
    array_tb := floatOut_tb;
    selector := 4;
    end if;
    end if;
    -- create and add new record to the correct array
    if (schdIndex > 0 or timeIndex > 0) then
    -- determine index for the new record being created.
    if (array_tb.LAST is NULL) then
    indx := 1;
    else
    indx := array_tb.LAST + 1;
    end if;
    if (schdIndex > 0) then
    array_tb(indx).empcd := empschd_tb(schdIndex).empcd;
    array_tb(indx).skilltpe := empschd_tb(schdIndex).skilltpe;
    array_tb(indx).hprdcode := empschd_tb(schdIndex).hprdcode;
    array_tb(indx).wprdcode := empschd_tb(schdIndex).wprdcode;
    array_tb(indx).strtdate := empschd_tb(schdIndex).strtdate;
    array_tb(indx).enddate := empschd_tb(schdIndex).enddate;
    array_tb(indx).empupdate := empschd_tb(schdIndex).lastupdate;
    else
    array_tb(indx).empcd := time_keeper_tb(timeIndex).empcd;
    if (empcdIndex > 0) then
    array_tb(indx).skilltpe := empcode_tb(empcdIndex).bskiltpe;
    array_tb(indx).hprdcode := empcode_tb(empcdIndex).prodcode;
    end if;
    end if;
    if (empcdIndex > 0) then
    array_tb(indx).empfnme := empcode_tb(empcdIndex).empfnme;
    array_tb(indx).empmint := empcode_tb(empcdIndex).empmint;
    array_tb(indx).emplnme := empcode_tb(empcdIndex).emplnme;
    end if;
    if (timeIndex > 0) then
    array_tb(indx).prodcode := time_keeper_tb(timeIndex).prodcode;
    array_tb(indx).startscan := time_keeper_tb(timeIndex).startscan;
    array_tb(indx).endscan := time_keeper_tb(timeIndex).endscan;
    array_tb(indx).origstart := time_keeper_tb(timeIndex).origstart;
    array_tb(indx).timeupdate := time_keeper_tb(timeIndex).lastupdate;
    end if;
    array_tb(indx).Reason := reason;
    -- after new record created then reassign array to correct output variable
    if (selector = 1) then
    unknown_tb := array_tb;
    elsif (selector = 2) then
    belongWork_tb := array_tb;
    elsif (selector = 3) then
    floatIn_tb := array_tb;
    elsif (selector = 4) then
    floatOut_tb := array_tb;
    end if;
    end if;
    end;
    function empcode_find (empcd empcode.empcode%type, emcdTable empcodeArray,
    maxIndex int) return int as
    low int; -- Array index of low side of current search
    high int; -- Array index of high side of current search
    mid int; -- Array index of current record being checked
    begin
    low := 1; -- Initialize to first index in array
    high := maxIndex; -- Initialize to last index in array
    while ( low <= high) loop
    mid := (low + high) / 2;
    if (empcd < emcdTable(mid).empcd) then
    high := mid - 1;
    elsif (empcd > emcdTable(mid).empcd) then
    low := mid + 1;
    else
    return mid;
    end if;
    end loop;
    return -1;
    end empcode_find;
    procedure discrepancy2 (unit in prodcode.prodcode%type,
    start_date date, end_date date,
    unknown_tab out discrepTabTyp, belongWork_tab out discrepTabTyp,
    floatIn_tab out discrepTabTyp, floatOut_tab out discrepTabTyp) as
    unknown_tb discrepancyArray;
    belongWork_tb discrepancyArray;
    floatIn_tb discrepancyArray;
    floatOut_tb discrepancyArray;
    begin
    timeKeeper_package.discrepancy (unit, start_date, end_date, unknown_tb,
    belongWork_tb, floatIn_tb, floatOut_tb);
    if (unknown_tb.FIRST is not NULL) then
    unknown_tab := discrepTabTyp();
    for j in unknown_tb.FIRST ..unknown_tb.LAST
    loop
    unknown_tab.extend;
    unknown_tab(j) := discrepancyType (unknown_tb(j).empcd, unknown_tb(j).skilltpe,
    unknown_tb(j).hprdcode, unknown_tb(j).wprdcode,
    unknown_tb(j).strtdate, unknown_tb(j).enddate,
    unknown_tb(j).empupdate,unknown_tb(j).empfnme,
    unknown_tb(j).empmint, unknown_tb(j).emplnme, unknown_tb(j).prodcode,
    unknown_tb(j).startscan, unknown_tb(j).endscan, unknown_tb(j).origstart,
    unknown_tb(j).reason, unknown_tb(j).timeupdate);
    end loop;
    end if;
    if (belongWork_tb.FIRST is not NULL) then
    belongWork_tab := discrepTabTyp();
    for j in belongWork_tb.FIRST ..belongWork_tb.LAST
    loop
    belongWork_tab.extend;
    belongWork_tab(j) := discrepancyType (belongWork_tb(j).empcd,belongWork_tb(j).skilltpe,
    belongWork_tb(j).hprdcode, belongWork_tb(j).wprdcode,
    belongWork_tb(j).strtdate, belongWork_tb(j).enddate,
    belongWork_tb(j).empupdate, belongWork_tb(j).empfnme,
    belongWork_tb(j).empmint, belongWork_tb(j).emplnme, belongWork_tb(j).prodcode,
    belongWork_tb(j).startscan, belongWork_tb(j).endscan, belongWork_tb(j).origstart,
    belongWork_tb(j).reason, belongWork_tb(j).timeupdate);
    end loop;
    end if;
    if (floatIn_tb.FIRST is not NULL) then
    floatIn_tab := discrepTabTyp();
    for j in floatIn_tb.FIRST ..floatIn_tb.LAST
    loop
    floatIn_tab.extend;
    floatIn_tab(j) := discrepancyType (floatIn_tb(j).empcd,
    floatIn_tb(j).skilltpe, floatIn_tb(j).hprdcode,
    floatIn_tb(j).wprdcode, floatIn_tb(j).strtdate, floatIn_tb(j).enddate,
    floatIn_tb(j).empupdate, floatIn_tb(j).empfnme,
    floatIn_tb(j).empmint, floatIn_tb(j).emplnme, floatIn_tb(j).prodcode,
    floatIn_tb(j).startscan, floatIn_tb(j).endscan, floatIn_tb(j).origstart,
    floatIn_tb(j).reason, floatIn_tb(j).timeupdate);
    end loop;
    end if;
    -- Copy float out table data to output array
    if (floatOut_tb.FIRST is not NULL) then
    floatOut_tab := discrepTabTyp();
    for j in floatOut_tb.FIRST ..floatOut_tb.LAST
    loop
    floatOut_tab.extend;
    floatOut_tab(j) := discrepancyType (floatOut_tb(j).empcd, floatOut_tb(j).skilltpe,
    floatOut_tb(j).hprdcode, floatOut_tb(j).wprdcode,
    floatOut_tb(j).strtdate, floatOut_tb(j).enddate,
    floatOut_tb(j).empupdate, floatOut_tb(j).empfnme,
    floatOut_tb(j).empmint, floatOut_tb(j).emplnme, floatOut_tb(j).prodcode,
    floatOut_tb(j).startscan, floatOut_tb(j).endscan, floatOut_tb(j).origstart,
    floatOut_tb(j).reason, floatOut_tb(j).timeupdate);
    end loop;
    end if;
    end;
    end timeKeeper_package;
    GRANT EXECUTE ON TIMEKEEPER_PACKAGE TO public;
    CREATE PUBLIC SYNONYM TIMEKEEPER_PACKAGE FOR TIMEKEEPER_PACKAGE;

    I figured out that when I upgraded from 9.2.03 to 9.2.0.8 that the problem went away. I think when I had it working earlier I may have been on 9.2.0.5

  • OCI-22303: type "MDSYS

    I am trying to select data from a table (while using TOAD) called HR_LOCATIONS_ALL (this is a seeded Oracle HRMS table) and get a message OCI-22303: type "MDSYS.
    I don't get the same error when selecting data using SQL *Plus.
    Does anyone have any idea why this is occuring and how to get rid of the message?
    Thanks in advance!

    Could you please verify that your database (as opposed to just sqlplus) is 10.2.0.1?
    For me, it works:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 21 13:07:07 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning and Data Mining options
    SQL> select wktext from cs_srs where srid = 41155;
    WKTEXT
    PROJCS["Texas 4205, Southern Zone (1927)", GEOGCS [ "NAD 27 (Continental US)", D
    ATUM ["NAD 27 (Continental US)", SPHEROID ["Clarke 1866", 6378206.4, 294.9786982
    ]], PRIMEM [ "Greenwich", 0.000000 ], UNIT ["Decimal Degree", 0.0174532925199433
    0]], PROJECTION ["Lambert Conformal Conic"], PARAMETER ["Standard_Parallel_1", 2
    6.166667], PARAMETER ["Standard_Parallel_2", 27.833333], PARAMETER ["Central_Mer
    idian", -98.500000], PARAMETER ["Latitude_Of_Origin", 25.666667], PARAMETER ["Fa
    lse_Easting", 2000000.0000], UNIT ["U.S. Foot", 0.3048006096012]]
    SQL> SELECT sdo_cs.find_proj_crs(41155, 'FALSE') epsg_srid from dual;
    EPSG_SRID
    SDO_SRID_LIST(32041)
    SQL> desc mdsys.sdo_srid_list;
    mdsys.sdo_srid_list VARRAY(1048576) OF NUMBER
    SQL>
    Do you run the Enterprise Edition?

  • After connection lost SetVector fails with OCI-22303: type not found

    Hi there,
    I use statelessConnectionPool and after application is loosing connection to oracle for short time, all folowing setVector calls will fail with
    SetVector fails with OCI-22303: type "DEMO"."PROPERTIES" not found
    however its there and was working fine before connection was lost,
    As far as i read about the getConection for statelessConnectionPool will reestablish connection if required to return valid connection handle, but somehow the setVector does not work.
    Any idea?
    Thanks in advance
    Andrew

    Hi,
    I want to reconnect to same instance, I think i missed tnsnames part, did not knew its required, so i should add to client tnsnames or server the FAILOVER_MODE part?
    like this example:
    PAYROLL =
    (DESCRIPTION =
    (ADDRESS =
    (COMMUNITY = TCP.world)
    (PROTOCOL = TCP)
    (HOST = VSERVER)
    (PORT = 1521)
    (CONNECT_DATA =
    (SID = HR)
    (FAILOVER_MODE =
    (TYPE = SELECT)
    (METHOD = BASIC)
    (RETRIES = 20)
    (DELAY = 15)
    strange thing that connection seams to be valid only in complains about type not found, or maybe connections are not valid only i cant see it, does the not valid connections in the pool are reconnected or make new when i call GetConnection? or i should terminate connections on "end of comm channel error" so when db is reachable again it will reestablish new connections?
    Andrew

  • OCI 22303 exception - Pass object to type Record in oracle procedure

    Recently i had my first encounter with ODP.NET and Oracle. I'm developing a a datalayer that can access a stored procedure on an Oracle database.
    The problem i'm having is the following:
    I'm using this method to pass my parameters to the procedure: http://www.codeproject.com/KB/cs/CustomObject_Oracle.aspx
    I have also attempted this approach:
    http://developergeeks.com/article/48/3-steps-to-implement-oracle-udt-in-odpnet
    I always get the message (litteraly):
    Oracle.DataAccess.Client.OracleException: OCI-22303: type &quote;PAC$WEBSHOP_PROCS&quot;.&quot;CUSTOMER_IN_RECTYPE&quot; not found.
    It sounds weird to me, but what are the &quotes doing here in the error message I see?
    Some code i use:
    OracleParameter objParam = new OracleParameter
    OracleDbType = OracleDbType.Object,
    Direction = ParameterDirection.Input,
    ParameterName = "PAC$WEBSHOP_PROCS.P_CUSTOMER_IN",
    UdtTypeName = "PAC$WEBSHOP_PROCS.WEBSHOP_PROCS.CUSTOMER_IN_RECTYPE",
    Value = card
    The information i have about the Oracle procedure:
    CREATE OR REPLACE PACKAGE PAC$WEBSHOP_PROCS IS
    TYPE CUSTOMER_IN_RECTYPE IS RECORD
    (CUS_STO_IDENTIFIER NUMBER(2)
    ,CUS_IDENTIFIER NUMBER(6)
    ,CH_IDENTIFIER NUMBER(2)
    ,CH_CARD_VERSION NUMBER(1)
    PROCEDURE PRC$WS_VALIDATE_CARD
    (P_CUSTOMER_IN IN PAC$WEBSHOP_PROCS.CUSTOMER_IN_RECTYPE
    ,P_RETURN_CODE IN OUT NUMBER
    Any help to cover my problem would be greatly appreciated.
    Thx
    Edited by: 836497 on 14-feb-2011 4:36

    The only way to call it as is would be via an anonymous plsql block, where you create the record type inside the block. Interacting with the block via ODP would be limited to scalar values.
    Here's a PLSQL example just to demonstrate. Here, v1 and v2 are bind variables of scalar type, which you'd setup/bind via ODP instead of the SQL prompt as I did, but I thought this might keep things simpler for the example.
    The other choice would be to write a wrapper procedure that takes type OBJECT that you can call from ODP, and inside that procedure convert them to/from RECORD and call the original procedure.
    Hope it helps,
    Greg
    SQL> drop package somepack;
    Package dropped.
    SQL> create package somepack as
      2  type somerectype is record(n1 number);
      3  function somefunc (v1 somerectype) return somerectype;
      4  end;
      5  /
    Package created.
    SQL>
    SQL> create package body somepack as
      2  function somefunc (v1 somerectype) return somerectype is
      3   begin
      4    return v1;
      5   end;
      6  end;
      7  /
    Package body created.
    SQL>
    SQL>
    SQL> var v1 number;
    SQL> exec :v1 := 5;
    PL/SQL procedure successfully completed.
    SQL> var v2 number;
    SQL>
    SQL>
    SQL> declare
      2   localvar1 somepack.somerectype;
      3   localvar2 somepack.somerectype;
      4  begin
      5     localvar1.n1 := :v1;
      6     localvar2 := somepack.somefunc(localvar1);
      7     :v2 := localvar2.n1;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL>  print v2;
            V2
             5
    SQL>

  • OCI-22303 in by OCITypeByName

    Hi,
    I am getting an error OCI-22303 when trying to use OCITypeByName method.
    Basically I am trying to use publish-subscribe notification mode to get get notification whenever a new message comes in the queue.
    I am able to register my callback function with the oracle queue and whenever a new message is coming to the queue its my callback function is being invoked by oracle
    but the problem is ,in that callback function when I am trying to dequeue the message it gives error on OCITypeByName method(ie OCI-22303).
    Same code inside callback function is working fine when I am directly calling the callback function ie(not invoked by oracle).
    Could you help me out what is the reason behind it?
    Oracle version :8.1.6
    In queue table payload is object type.
    I have tried this with oracle8.1.7's catexp.sql also but it dint work
    Please help me out
    rajeev

    Hi Rajiv,
    Could you please provide more details?
    Specifically, I would like to see how your
    callback looks.
    And you mentioned that if you directly called
    the callback function, then OCITypeByName
    worked. I am assuming you called this callback in some OCI program. So, I would also like to see the OCI program.
    And one other thing. Did you make sure you had the same user session in both the cases?
    thx,
    Ravi

  • EXP-00090:cannot pin type"SYSTEM"."REPCAT$_OBJECT_NULL_VECTOR"

    Hi,
    Can any one help please? We got this error from our full export script this morning. The script had been running successfully for several months, nothing has changed, the database is 10.1.0.3.0 and the export command which runs in a cronjob is:
    exp system/systempwd grants=Y full=Y file=exp.dmp buffer=409600 statistics=none
    I've tried to do some research on the error message but did not get anything helpful. The export terminated successfully with warnings.
    thank you.

    Pl post the complete error message from the export log. See if these MOS Docs can help
    797319.1 - EXP-90 EXP-56 OCI-22303 Obtained During User Export When the Type is Invalid
    133056.1 - EXP-90 EXP-56 OCI-22303 warning while exporting SYS schema
    294543.1 - Export Aborts with EXP-0 and OCI-22303 (type "SYS"."AQ$_EVENT_MESSAGE" not found)
    HTH
    Srini

  • Type not found error

    Hi, my problem is "OCI-22303: type not found".
    I have a package in a database, say, MY_PCKDG.aa_number
    Then I'm trying
    std::vector<int> var;
    var.push_back(12);
    setVector(stmt, index, var, "MY_PCKDG.AA_NUMBER"); //here it fails saying the type was not found
    How to find the type? I have tried the type name alone, both uppercase and non-uppercase, and <package name>.<type name>, both all uppercase and non-uppercase.. Any suggestions?
    --Andrew                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Fernando . Thanks for the response. I am getting this error when I am trying to create a risk. Attached is the snapshot of the error. I have tried stuff like deleting the cache, checked SICF to see if Web Dyn Pro is active etc

  • Odd issue when using UDT (user defined type)

    Hi all,
    11g.
    I ran into an odd issue when using UDT, I have these 4 schemas: USER_1, USER_2, USER_A, USER_B.
    Both USER_1 and USER_2 have an UDT (actually a nested table):
    CREATE OR REPLACE TYPE TAB_NUMBERS AS TABLE OF NUMBER(10)USER_A has a synonym points to the type in USER_1:
    create or replace synonym TAB_NUMBERS for USER_1.TAB_NUMBERS;USER_B has a synonym points to the type in USER_2:
    create or replace synonym TAB_NUMBERS for USER_2.TAB_NUMBERS;Both USER_A and USER_B have a procedure which uses the synonym:
    CREATE OR REPLACE PROCEDURE proc_test (p1 in tab_numbers)
    IS
    BEGIN
      NULL;
    END;And in the C# code:
    OracleConnection conn = new OracleConnection("data source=mh;user id=USER_A;password=...");
    OracleCommand cmd = new OracleCommand();
    cmd.Connection = conn;
    cmd.CommandText = "proc_test";
    cmd.CommandType = CommandType.StoredProcedure;
    OracleParameter op = new OracleParameter();
    op.ParameterName = "p1";
    op.Direction = ParameterDirection.Input;
    op.OracleDbType = OracleDbType.Object;
    op.UdtTypeName = "TAB_NUMBERS";
    Nested_Tab_Mapping_To_Object nt = new Nested_Tab_Mapping_To_Object();
    nt.container = new decimal[] { 1, 2 };
    op.Value = nt;
    ......This code works fine, but it raises an error when I change the connection string from USER_A to USER_B, the error says:
    OCI-22303: type ""."TAB_NUMBERS" not foundInterestingly, if I change op.UdtTypeName = "TAB_NUMBERS"; to op.UdtTypeName = "USER_2.TAB_NUMBERS", the error is gone, and everything works fine.
    Anyone has any clues?
    Thanks in advance.

    Erase and reformat the ext HD. Then, redo the SuperDuper! backup.

  • Problem with setVector & Setdatabufferarray

    I am using occi c++ api interface
    The type is a table of number index by binary integer.
    I am trying to use "type created inside a package" to pass as a last argument to setVector() , which will be my OUT parameter. But the error I am getting is "OCI-22303: type ""."......" type not found. But the type is there inside the package under the same schema. These things gets worse, if i create similar datatype directly under schema (instead of package) , as then I get error "PLS-00306: wrong number or types of arguments in call to <my SP name>"
    I have a workaround in using "setdatabufferarray" But here I can't use STL. I want to use STL, as I wil be accessing huge amount of data say more than 3000 numbers/varchars at a time.
    Pls suggest a solution. I have been trying this for more than 2 days now..:-(

    Hi Dinesh,
    The following worked for me:
    string retVal = "";
    vector<Number> c1(10);
    string sqlStmt = "BEGIN MY_PROC(:1); END;";
    stmt = conn->createStatement (sqlStmt);
    try
    stmt->registerOutParam(1, OCCIVECTOR, c1.size(),"NUM_TAB","SCOTT");
    stmt->executeUpdate();
    getVector(stmt,1,c1);
    catch(SQLException ex)
    retVal = ex.getMessage();
    cout << retVal;
    The type and stored procedure:
    create type num_tab as table of number ;
    create or replace procedure my_proc(parm1 out num_tab) as
    dummy_tab num_tab;
    begin
    dummy_tab := num_tab(1,2,3,4);
    parm1:=dummy_tab;
    end;
    Did I get your question correctly ?
    Regards,
    Sumit

  • Full database export hangs (Oracle9i rel2)

    I recently migrated successfully from oracle8i rel 8.0. to oracle9i release 2,But now am not able to do a full database export.has anyone experienced this and whats the remedy?.
    the text i get is listed below.
    Microsoft Windows [Version 5.2.3790]
    (C) Copyright 1985-2003 Microsoft Corp.
    C:\Documents and Settings\Administrator>exp system/manager@ORCL file=C:\orclbk\p
    oll.dmp full=y
    Export: Release 9.2.0.1.0 - Production on Tue Aug 9 18:36:13 2005
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export the entire database ...
    . exporting tablespace definitions
    . exporting profiles
    . exporting user definitions
    . exporting roles
    . exporting resource costs
    . exporting rollback segment definitions
    . exporting database links
    . exporting sequence numbers
    . exporting directory aliases
    . exporting context namespaces
    . exporting foreign function library names
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions
    EXP-00090: cannot pin type "OE"."CUSTOMER_TYP"
    EXP-00056: ORACLE error 22303 encountered
    OCI-22303: type "OE"."CUSTOMER_TYP" not found
    EXP-00056: ORACLE error 24323 encountered
    ORA-24323: value not allowed
    EXP-00000: Export terminated unsuccessfully
    C:\Documents and Settings\Administrator>

    You have to run the export with the SYS user. This error may arise on any plattform ranging form 9.0.1 to 10.2.0.
    C:\>exp "'sys/oracle as sysdba'" full=y

  • Database instance crashes when running expdp

    Hi,
    I have oracle 10.2.0.4 running on AIX.
    when i try to run expdp as below...
    expdp system/pwd directory=DATA_PUMP_DIR2 tables=TOAD_PLAN_TABLE dumpfile=test.dmp
    i get an error as..
    UDE-00008: operation generated ORACLE error 22303
    OCI-22303: type "SYS"."KU$_STATUS1020" not found
    and the database instance crashes.
    I tried increasing the shared_memory_pool, checking the read, write permissions on the directory. but every single time i run the expdp, the instance crashes.
    But when i try to run the exp for the same table, it runs fine.
    Can someone help me resolve this so i can use the expdp feature.
    Thanks.
    Philip.

    I could not find anything proper w.r.t the datapump failure.
    is there a package or something i need to install in the database for the expdp to work.
    or do i have to install any libraries for the datapump to work.
    Thanks.

  • TYPE OR TABLE DEPENDENCY OF OBJECT TYPE (ORA-2303)

    제품 : SQL*PLUS
    작성날짜 : 2004-05-20
    ==================================================
    TYPE OR TABLE DEPENDENCY OF OBJECT TYPE (ORA-2303)
    ==================================================
    PURPOSE
    Type이나 table의 dependency가 있는 type을 drop하거나 replace하고자
    하면 ORA-02303 error가 난다. 이 error의 원인을 알아보도록 한다.
    Explanation
    Object의 attribute나 method를 수정하기 위해서는 object type을 drop하고 재생성
    해야 한다. Type이나 table의 dependency가 있는 type을 drop하거나 replace하고자
    하면 ORA-02303 error가 난다. Object type은 type (nested table 또는 VARRAY)
    또는 object table로써 구체적으로 표현된다. 만약 data의 보존이 필요하다면
    temporary table에 manual하게 옮겨놓아야 한다.
    SQL Reference guide에 의하면 DROP TYPE FORCE 옵션은 recommend하지 않는다.
    왜냐하면 이 옵션을 쓰게 되면 복구가 불가능하고 dependency가 있던 table들은
    access하지 못하는 결과를 초래한다.
    Example
    아래의 query 1, 2, 3은 dependency을 확인하는 query문이다.
    1. Find nested tables
    select owner, parent_table_name, parent_table_column
    from dba_nested_tables
    where (table_type_owner, table_type_name) in
    (select owner, type_name
    from dba_coll_types
    where elem_type_owner = '<typeOwner>'
    and elem_type_name = '<typeName>');
    2. Find VARRAYs
    select owner, parent_table_name, parent_table_column
    from dba_varrays
    where (type_owner, type_name) in
    (select owner, type_name
    from dba_coll_types
    where elem_type_owner = '<typeOwner>'
    and elem_type_name = '<typeName');
    3. Find object tables
    select owner, table_name
    from dba_object_tables
    where table_type_owner = '<typeOwner>'
    and table_type = '<typeName>'
    and nested = 'NO';
    Example ) Logon as Scott
    /* Create an user defined object type */
    SQL> create type object_type as object (
    col1 number,
    col2 varchar2(20))
    Type created.
    /* Create nested table type */
    SQL> create type object_ntable as table of object_type
    Type created.
    /* Create varray type*/
    SQL> create type object_varray as varray(5) of object_type
    Type created.
    /* Create parent table with nested table and varray */
    SQL> create table master (
    col1 number primary key,
    col2_list object_ntable,
    col3_list object_varray)
    nested table col2_list store as master_col2
    Table created.
    /* Create object table */
    SQL> create table object_table of object_type (col1 primary key)
    object id primary key;
    Table created.
    ORA-2303 results if attempt to drop type with dependencies
    SQL> drop type object_type;
    drop type object_type
    ERROR at line 1:
    ORA-02303: cannot drop or replace a type with type or table dependents
    위의 queery 1,2,3을 이용하여 object type dependency을 확인한다.
    -- Find nested tables utilizing object type
    SQL> select owner, parent_table_name, parent_table_column
    from dba_nested_tables
    where (table_type_owner, table_type_name) in
    (select owner, type_name
    from dba_coll_types
    where elem_type_owner = 'SCOTT'
    and elem_type_name = 'OBJECT_TYPE');
    OWNER PARENT_TABLE_NAME PARENT_TABLE_COLUMN
    SCOTT MASTER COL2_LIST
    -- Find VARRAYs utilizing object type
    SQL> select owner, parent_table_name, parent_table_column
    from dba_varrays
    where (type_owner, type_name) in
    (select owner, type_name
    from dba_coll_types
    where elem_type_owner = 'SCOTT'
    and elem_type_name = 'OBJECT_TYPE');
    OWNER PARENT_TABLE_NAME PARENT_TABLE_COLUMN
    SCOTT MASTER COL3_LIST
    -- Find object tables
    SQL> select owner, table_name
    from dba_object_tables
    where table_type_owner = 'SCOTT'
    and table_type = 'OBJECT_TYPE'
    and nested = 'NO';
    OWNER TABLE_NAME
    SCOTT OBJECT_TABLE
    참고)
    bulletin : 11576 처럼 utility을 이용하는 방법이 있다.
    우리는 여기서 주의하여야 할 것은 script $ORACLE_HOME/rdbms/admin/utldtree.sql
    을 내가 보고자 하는 user에서 돌려야 한다는 것이다.
    $sqlplus scott/tiger
    SQL> @$ORACLE_HOME/rdbms/admin/utldtree.sql
    SQL> exec deptree_fill('TYPE','SCOTT','OBJECT_TYPE');
    PL/SQL procedure successfully completed.
    SQL> select * from ideptree;
    DEPENDENCIES
    TYPE SCOTT.OBJECT_TYPE
    TYPE SCOTT.OBJECT_NTABLE
    TABLE SCOTT.MASTER
    TYPE SCOTT.OBJECT_VARRAY
    TABLE SCOTT.MASTER
    TABLE SCOTT.MASTER_COL2
    TABLE SCOTT.OBJECT_TABLE
    Reference Documents
    Korean bulletin : 11576
    <Note:69661.1>

    Hi Carsten,
    Thanks for the sharp hint. It works.
    However, when I create a table using the schema, it gives me this error:
    varray DOC."LISTOFASSIGNEDNUMBER"."ASSIGNEDNUMBER"
    ERROR at line 14:
    ORA-02337: not an object type column
    Here is the script:
    CREATE TABLE CUSTOMMANIFEST (
    ID NUMBER PRIMARY KEY,
    DOC sys.XMLTYPE
    xmltype column doc
    XMLSCHEMA "http://www.abc.com/cm.xsd"
    element "CustomManifest"
    varray DOC."LISTOFMANIFESTPORTINFO"."MANIFESTPORTINFO"
    store as table MANIFESTPORTINFO_TABLE
    (primary key (NESTED_TABLE_ID, ARRAY_INDEX))
    organization index overflow
    varray DOC."LISTOFASSIGNEDNUMBER"."ASSIGNEDNUMBER"
    store as table ASSIGNEDNUMBER_TABLE
    (primary key (NESTED_TABLE_ID, ARRAY_INDEX))
    organization index overflow
    LISTOFASSIGNEDNUMBER itself is complexType and not sure where is the error....
    You may note there are more than two hierachy/levels...
    Thanks.

  • Oracle 11g SQL signon   - The scott/tiger routine...

    I just installed Oracle 11g.
    First, what is the ID/PW into SQL - it used to be scott/tiger. I changed it to what I wanted on install. However, when I logon and type scott then tiger its says
    account locked out. I tried scott and my own "created pw". It still didn't let me in. Is there an "easy" fix?
    I have to get this aspect going to get to first base. How do I get around this or FIX it????
    Walter Earl Roper
    University of Illinois
    [email protected]

    By default, most of the demo accounts are created but locked so that they are not security holes if they are inadvertently included in a production install. To unlock scott
    - Connect as SYS, i.e. from the command line (DOS prompt in Windows)
    sqlplus / as sysdba- Unlock the account
    SQL> ALTER USER scott ACCOUNT UNLOCK;Now, you should be able to log in as SCOTT. If you want to log in as HR, OE, or any of the other demo accounts, you'd repeat the procedure.
    Justin

  • OCI Performance Very Poor

    I've been experimenting with using
    OCI in the Proc Precompiler with
    some user defined object types and
    varrays. In fact, my code is
    essentially the RESET example for
    collections in Chap 18 of the "Pro C/C++
    Precompiler Programmer's Guide" with
    names changed. I tested this code
    alongside a similar test using traditional
    non object-oriented tables.
    The results so far have shown that
    the performance of the code which simply
    fetches and updates the data, is significantly better with the traditional
    method than the one using OCI. In fact,
    I cannot find a data configuration in
    which using varrays and object types
    even comes close to the speed on the
    traditional methods.
    Has anyone noticed performance hits or
    improvements using OCI, object types,
    or collections? It would seem odd that
    Oracle would spend so much effort to
    promote this technology if there was no
    performance improvement at all. In fact,
    I'm showing that using the collections and object types is 20 times slower! Yikes!
    Any feedback on this would be much appreciated.
    Thanks,
    Kristi Uthoff

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    Create a new profile as a test to check if your current profile is causing the problems.<br />
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]<br />
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins"<br />
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)<br />
    See http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox
    If it still happens with a new, unmodified, Firefox profile then maybe security software is causing the problems and you should check that.<br />
    You can also do a malware check.<br />
    See "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

Maybe you are looking for

  • How can I turn off the camera shutter sound on an iPhone 6 bought in the U.S.?

    I know some countries don't allow the camera shutter sound to be disabled, but I'm not sure if the U.S. is one of those countries. Is it? If not, can someone tell me how to disable it please?

  • Money market deposit with bonus rate : how to set up an manage ?

    case : bank deposit : max term  = 1 year If you stay in for the full year you received euribor 1 year - 0.03% fixed at the start If you get out after 3 months you received euribor 3 months - 0.15% fixed at the start If you get out after 6 months you

  • IM's from people not on my contacts

    Over the past week I have been receiving several IM's everyday from people I don't know. I really don't understand how this is possible as my security settings are set so that only people on my contacts lists can call or IM me.  Yes I have double che

  • Convert Varchar to Date

    Hi im trying to convert varchar to date. So, i used To_date ( cilumn, 'DD-MM-YYYY') , Since i have to order the out put in Decending Order i used the same convertion function with Order by clause. The problem is ... the out put is not ordered, <sql>

  • Delete PSA Through Process Chain

    Hi, I am working in NW04s. I have few questions related to the subject line. Few are for knowledge enhancement and other are task oriented. Background:  InfoPackages are created to load data (master and transaction, both full & delta) for InfoObjects