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?

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

  • 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: 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

  • 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.

  • 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

  • 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

  • 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.

  • EA3 export table with SDO types

    Hi!
    I've tried export table from user (not mdsys) with mdsys.sdo_geometry column (build 1.5.0.53.04, tools export wizard, all checks except storage).
    got in log:
    SEVERE 40 0 oracle.dbtools.db.DBUtil
    ORA-31603: объект "SDO_ELEM_INFO_ARRAY" с типом TYPE не найден в схеме "MDSYS" ORA-06512: на "SYS.DBMS_SYS_ERROR", line 105 ORA-06512: на "SYS.DBMS_METADATA", line 2805 ORA-06512: на "SYS.DBMS_METADATA", line 4333 ORA-06512: на line 1
    SEVERE 41 641 oracle.dbtools.db.DBUtil ORA-31603: объект "SDO_GEOMETRY" с типом TYPE не найден в схеме "MDSYS" ORA-06512: на "SYS.DBMS_SYS_ERROR", line 105 ORA-06512: на "SYS.DBMS_METADATA", line 2805 ORA-06512: на "SYS.DBMS_METADATA", line 4333 ORA-06512: на line 1
    SEVERE 42 94 oracle.dbtools.db.DBUtil ORA-31603: объект "SDO_ORDINATE_ARRAY" с типом TYPE не найден в схеме "MDSYS" ORA-06512: на "SYS.DBMS_SYS_ERROR", line 105 ORA-06512: на "SYS.DBMS_METADATA", line 2805 ORA-06512: на "SYS.DBMS_METADATA", line 4333 ORA-06512: на line 1
    SEVERE 43 3093 oracle.dbtools.raptor.ddl.DDLGenerator getDDL - null
    In SQL script i've got some strange result (see bold):
    -- File created - среда-Апрель-09-2008
    DROP TABLE "TEST" cascade constraints;
    DROP SEQUENCE "MDRS_C0A4$";
    -- DDL for Sequence MDRS_C0A4$
    CREATE SEQUENCE "MDRS_C0A4$" MINVALUE 1 MAXVALUE 999999999999999999999999999 INCREMENT BY 1 START WITH 101 CACHE 100 ORDER NOCYCLE ;
    -- DDL for Type SDO_ELEM_INFO_ARRAY
    -- Unable to Render DDL with DBMS_METADATA using internal generator.
    CREATE TYPE SDO_ELEM_INFO_ARRAY
    AS VARRAY (1048576) of NUMBER
    GRANT EXECUTE ON "SDO_ELEM_INFO_ARRAY" TO PUBLIC WITH GRANT OPTION;
    GRANT EXECUTE ON "SDO_ELEM_INFO_ARRAY" TO PUBLIC WITH GRANT OPTION;
    -- DDL for Type SDO_GEOMETRY
    -- Unable to Render DDL with DBMS_METADATA using internal generator.
    CREATE TYPE MDSYS.SDO_GEOMETRY;
    CREATE TYPE SDO_GEOMETRY AS OBJECT
    ( SDO_GTYPE NUMBER,
    SDO_SRID NUMBER,
    SDO_POINT SDO_POINT_TYPE,
    SDO_ELEM_INFO SDO_ELEM_INFO_ARRAY,
    SDO_ORDINATES SDO_ORDINATE_ARRAY,
    MEMBER FUNCTION GET_GTYPE RETURN NUMBER DETERMINISTIC,
    MEMBER FUNCTION GET_DIMS RETURN NUMBER DETERMINISTIC,
    MEMBER FUNCTION GET_LRS_DIM RETURN NUMBER DETERMINISTIC,
    MEMBER FUNCTION GET_WKB RETURN BLOB DETERMINISTIC,
    MEMBER FUNCTION GET_WKT RETURN CLOB DETERMINISTIC,
    MEMBER FUNCTION ST_CoordDim RETURN SMALLINT DETERMINISTIC,
    MEMBER FUNCTION ST_IsValid RETURN INTEGER DETERMINISTIC,
    CONSTRUCTOR FUNCTION SDO_GEOMETRY(wkt IN CLOB, asrid IN INTEGER DEFAULT NULL)
    RETURN SELF AS RESULT,
    CONSTRUCTOR FUNCTION SDO_GEOMETRY(wkt IN VARCHAR2, asrid IN INTEGER DEFAULT NULL)
    RETURN SELF AS RESULT,
    CONSTRUCTOR FUNCTION SDO_GEOMETRY(wkb IN BLOB, asrid IN INTEGER DEFAULT NULL)
    RETURN SELF AS RESULT
    GRANT EXECUTE ON "SDO_GEOMETRY" TO PUBLIC WITH GRANT OPTION;
    GRANT EXECUTE ON "SDO_GEOMETRY" TO PUBLIC WITH GRANT OPTION;
    -- DDL for Type SDO_ORDINATE_ARRAY
    -- Unable to Render DDL with DBMS_METADATA using internal generator.
    CREATE TYPE SDO_ORDINATE_ARRAY
    AS VARRAY(1048576) OF NUMBER
    GRANT EXECUTE ON "SDO_ORDINATE_ARRAY" TO PUBLIC WITH GRANT OPTION;
    GRANT EXECUTE ON "SDO_ORDINATE_ARRAY" TO PUBLIC WITH GRANT OPTION;
    -- DDL for Table TEST
    CREATE TABLE "TEST"
    (     "NUM" NUMBER,
         "GEOLOC" "SDO_GEOMETRY"
    -- Constraints for Table TEST
    ALTER TABLE "TEST" MODIFY ("NUM" NOT NULL ENABLE);
    ALTER TABLE "TEST" ADD PRIMARY KEY ("NUM") ENABLE;
    -- DDL for Index TEST_SX
    CREATE INDEX "TEST_SX" ON "TEST" ("GEOLOC")
    INDEXTYPE IS "MDSYS"."SPATIAL_INDEX" PARAMETERS ('SDO_INDX_DIMS=2 LAYER_GTYPE="COLLECTION"');
    -- DDL for Index SYS_C004552
    CREATE UNIQUE INDEX "SYS_C004552" ON "TEST" ("NUM")
    Why it create all grant twice?
    Why it try to recreate type SDO_GEOMETRY twice - once in MDSYS schema second in users schema?
    Why it recreate types SDO_ELEM_INFO_ARRAY and SDO_ORDINATE_ARRAY only once in user schema?

    Why it create all grant twice?
    Why it try to recreate type SDO_GEOMETRY twice - once in MDSYS schema second in users schema?
    Why it recreate types SDO_ELEM_INFO_ARRAY and SDO_ORDINATE_ARRAY only once in user schema?
    All of these seem to be an issue with the older internal ddl generator. While I will log a bug on this we do not actually own the code so I am not able to fix it. The easiest way to make this work correctly would be to fix your DBMS_METADATA to work for those other user objects...
    Try granting your export user SELECT_CATALOG_ROLE.
    Although I'm not sure why you are including the dependencies for that table as you know it's going to just get you the MDSYS objects, try unchecking the "Automatically Include Dependent Objects" option on the first page of wizzard.

  • Mapping spatial object type

    I need to map a table with a spatial column of type MDSYS.SDO_GEOMETRY using TopLink. This type is defined as:
    CREATE TYPE SDO_GEOMETRY AS OBJECT (
    SDO_GTYPE NUMBER,
    SDO_SRID NUMBER,
    SDO_POINT SDO_POINT_TYPE,
    SDO_ELEM_INFO MDSYS.SDO_ELEM_INFO_ARRAY,
    SDO_ORDINATES MDSYS.SDO_ORDINATE_ARRAY
    Has anyone done this before, or can someone tell me how to do this? Do I need to use ConversionManager or Structure Mapping or something else?

    Can I conclude from the lack of replies that this is rather complicated?

  • Designer and SDO_GEOMETRY object type

    I want to have tables with columns of object type MDSYS.SDO_GEOMETRY (Oracle Spatial's type) in Designer 9i and then generate these tables.
    So I created in Oracle Object Types branch object type called MDSYS.SDO_GEOMETRY without attributes, methods or source table.
    Then I created in Designer table with column named GEOMETRY which has Datatype property empty and Oracle Type property of value MDSYS.SDO_GEOMETRY.
    But when I generate this table I get these two messages:
    CDS-11349 Warning: The Oracle Object Type MDSYS.SDO_GEOMETRY cannot be generated.
    CDS-18025 Error: Table 'PRK_PRIMER_GEO_SDO' will not be created as Oracle Object Type 'MDSYS.SDO_GEOMETRY' is not created
    Object type MDSYS.SDO_GEOMETRY already exists in database for sure.
    What is wrong here?
    Regards
    Saso Celarc

    I think, Designer cannot handle SDO_GEOMETRY type.
    Workaround: use a other datatype/size not used in your schema ( such as varchar2(99) ), generate scripts and do a text substitution on them to SDO_GEOMETRY.

Maybe you are looking for

  • Driver Problem False Report ?

    Motherboard: F1A75-V PRO Processor:AMD A8-3870 APU with Radeon Graphics ( 4 Core Processor) RAM: Corsair 8 GB System drive : Samsung 128 GB SSD OS: Windows 8.1.1 All the 4 units of the above mentioned Processor shows defective drivers. If I try to re

  • Creating Folders in the Library for Channel Strip Settings?

    When I 'Save Channel Strip Setting As', the new setting appears in my Library of Channel Strip Settings, but I want to create a folder of 'Custom Settings' so I don't get bogged down with a bunch of free-floating settings in my Library.  How can I do

  • How to implement custom skin in JavaFX 2.0?

    To implement custom skin, I extend TextFieldSkin (in com.sun.javafx.scene.control.skin.*) class, but I don't know which methods to overwrite, anyone can provide some sample codes? Thanks!

  • Declared Web Dynpro method's javadoc not updating

    Hello all, I declared a method in a custom controller, and changed the Javadoc to something more meaningful than the usual "declared method.". Now I'm trying to call this method from another controller. That in itself works fine, but when using NWDS'

  • Nomad IIc and fm tu

    Hi there bad newbie here who dont wanna scroll thru hours and hours of posts to find one that answers my question.. soooo im hoping someone might email me the answer...or post it in here and i will come back and check.... I have a new nomad IIc.. and