Alter type in 8.1.7

hi everyone.
i'm using the alter type statement as seen in ora92 help to work with my types written and implemented in an 8.1.7 database and its retrieving an missing or invalid option error everytime. is there some difference between 8i and 9i statements I should be aware off before trying to alter types?
Merci.-

There's quite a lot of difference between the 8i syntax and the 9i syntax. So you may want to compare the docs closely.
Cheers, APC

Similar Messages

  • Alter type to increase varray size

    I have the following:
    CREATE OR REPLACE TYPE idvarray is varray(10) of INTEGER
    CREATE TABLE event_availability_map
    , event_id_list          idvarray
    I would like to increase the size of idvarray, how can I do this?

    Stephen,
    With pre-10g releases, you can declare the varray to be of a large size to accomodate future growth. Oracle allocates storage based on actually used sizes.
    With 10g release, you can issue 'alter type' statement to raise the varray size limit (http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10799/adobjcol.htm#sthref310).
    Regards,
    Geoff

  • ALTER TYPE MODIFY ATTRIBUTE cascade including table data

    Hi,
    does anybody know, why I get "ORA-00932: inconsistent datatypes: expected REF TYPE1_T got REF TYPE1_T"
    after ALTER TYPE MODIFY ATTRIBUTE cascade including table data when the altered type contains a nested table of type REFs.
    according to the documentation this should work? This works when the type contains a nested table of types!
    ORACLE Version: 9i EE 9.2.0.3.0 64 bit
    OS: HP-UX 11
    -- create type1
    CREATE OR REPLACE
    TYPE TYPE1_T AS OBJECT
    T1COL1 NUMBER,
    T1COL2 VARCHAR2(35),
    TYPE2REF REF TYPE2_T
    -- create coll of type1 refs
    CREATE OR REPLACE
    type TYPE1COLL_T IS TABLE OF REF TYPE1_T
    -- create type2
    CREATE OR REPLACE
    TYPE TYPE2_T AS OBJECT
    T2COL1 NUMBER,
    TYPE1COLL TYPE1COLL_T
    -- create table of type1_t
    CREATE TABLE TYPE1_OTB OF TYPE1_T
    -- create table of type2_t
    CREATE TABLE TYPE2_OTB OF TYPE2_T
    nested table type1coll store as type1coll_ntb
    -- populate type1_otb
    INSERT INTO type1_otb
    VALUES(1, 'ABCDEF',NULL);
    -- populate type2_otb
    INSERT INTO type2_otb
    VALUES(1,TYPE1COLL_T());
    select * from type1_otb;
    T1COL1 T1COL2
    TYPE2REF
    1 ABCDEF
    select * from type2_otb;
    T2COL1
    TYPE1COLL
    1
    TYPE1COLL_T()
    ALTER TYPE type1_t MODIFY ATTRIBUTE t1col2 varchar2(50) cascade including table data;
    Type altered.
    select * from type1_otb;
    T1COL1 T1COL2
    TYPE2REF
    1 ABCDEF
    select * from type2_otb;
    select * from type2_otb
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected REF TYPE1_T got REF TYPE1_T

    Hi John,
    I am also facing the same problem after executing the command
    SQL> alter type product_object modify attribute (NAME VARCHAR2(80)) cascade;
    with the following error
    ORA-00932: inconsistent datatypes: expected REF WOLFOBJECTS.EMPLOYEE_OBJECT got
    WOLFOBJECTS.EMPLOYEE_OBJECT
    Could you please suggest any alternate or workaround for this issue?
    Thanks
    Sara

  • EA 2.1  desc of altered type doesnt display correct result

    In SQL developer I created a type:
    CREATE TYPE d AS VARRAY(10) OF NUMBER(5,2);
    TYPE D compiled
    And then a table based on the type
    CREATE TABLE e (kx d);
    CREATE TABLE succeeded.
    Then i altered the type:
    ALTER TYPE d MODIFY ELEMENT TYPE NUMBER(7,3)
    CASCADE NOT INCLUDING TABLE DATA;
    ALTER TYPE d succeeded.
    When i then describe type D in SQL Developer i get a strange result:
    desc d
    user type definition
    TYPE d AS VARRAY(10) OF NUMBER(5,2)
    ALTER TYPE d MODIFY ELEMENT TYPE NUMBER(7,3)
    CASCADE NOT INCLUDING TABLE DATA d VARRAY(10) OF NUMBER(7,3)
    in SQL Plus i get :
    d VARRAY(10) OF NUMBER(7,3)
    kind regards
    Jeroen van Geelen

    This is not an EA2 issue nor indeed deemed to be a bug.
    We had a bug logged initial on being able to support describing Types in the SQL Worksheet and then on making this the same as in SQL*Plus. The bug dates back to the initial days of SQL Developer. The outcome and subsequent closure of the bug is to support more detail, as you have seen, in SQL Developer, than that provided in SQL*Plus, with the conclusion that the DDL is deemed more beneficial than the result given by SQL*Plus.
    Sue Harper
    PM

  • Alter type to add a member function

    Hello,
    I have Oracle 9i r2 and I really nedd to add a member function into an Object that is associated to other.
    My Object spec is this:
    TYPE CM_CTRL_CM AS OBJECT
    lo_Ent_CM CM_Ent_CM,
    member function IniEntCM(self in out CM_Ctrl_CM) return integer
    I do this to add a member function:
    alter type CM_Ctrl_CM add member function FijDatCM(ao_DatCM in CM_DatCM) return integer cascade ;
    And as the result I get the nex the Object Spec:
    TYPE CM_CTRL_CM AS OBJECT
    lo_Ent_CM CM_Ent_CM,
    member function IniEntCM(self in out CM_Ctrl_CM) return integer
    alter type CM_Ctrl_CM add member function FjDatCM(ao_DatCM in CM_DatCM) return integer cascade
    As you can see, all the alter type statement is added at the end of my Object Spec wich cause a compilation error and the object get invalid.
    I need to know how to add a member function. It's very important for the my project successfull.
    Thanks.
    Luis Silva

    And as the result I get the nex the Object Spec:
    TYPE CM_CTRL_CM AS OBJECT
    lo_Ent_CM CM_Ent_CM,
    member function IniEntCM(self in out CM_Ctrl_CM) return integer
    alter type CM_Ctrl_CM add member function FjDatCM(ao_DatCM in CM_DatCM) >> return integer cascade
    /**************************************************************************************/Fnord. What is this supposed to mean?
    Let me introduce you to a very technical skill known only to the illuminati: cut'n'paste. Using this skill you will be able to transmit information across great differences.
    To use cut'n'paste:
    (1) Open a reply to this message.
    (2) Run your code in SQL*Plus.
    (3) Highlight the code and the feedback and use the editor command to cut the code.
    (4) Return to the forum and use the editor command to paste the result.
    (5) Post
    See what you've posted obviously is not from SQL*Plus. Maybe it's some other IDE. But we're stupid. If you show us output from SQL*Plus we can diagnose the problem otherwise we're flying blind.
    Oh, and please include the code for CM_Ent_CM, as we can't run your SQL without it.
    Cheers, APC

  • About the syntax of the ALTER TYPE.

    Hi, everybody:
    1. Would you teach me, the syntax of the alter type statement to modify one user-define constructor of the type, the type has been used to a table or a subtype?
    2. Would you teach me, the syntax of the alter type statement to add one user-define constructor?

    Here are the docs for it:
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_43a.htm#2057830
    Tom Best

  • Alter types object in oracle 8.0.6

    Hi ,
    I have one type object having name 'reftype' which is depend on preticular table
    Now I have to modify this type defination without deleting its depend object or table .
    I have tried to alter or add new attribute method but its giving below error ..
    "ORA - 02303 cannot drop or replace a type with type or table dependent(s)"
    Can some one help me?
    Thanks & Regards,
    Shrirang Mokashi

    EXECUTE IMMEDIATE was new in 8i. In prior versions, you might use the DBMS_SQL supplied package instead.

  • Alter Type declared in package

    Hello all!
    I have a package that contains a locally defined type and I would like to modify the type to contain additional columns depending on the conditions.
    So I have within the package spec ....
    TYPE BaseRecType IS RECORD (
    , item1 varchar2(10)
    , item2 varchar2(10)
    , item3 varchar2(10)
    and depending on the method called would like to add other columns/attributes to the BaseRecType ...
    procedure A() {
    -> add attribute -> item4 varchar2(20);
    procedure b() {
    -> add attribute -> item4 number;
    I'm not sure if what I am attempting is possible, but your help is greatly appreciated.
    Thanks,
    Shawn

    Thanks for the quick response. Both of the suggestions below have been considered and may end up being the final solution, but this requires changes to multiple applications and as such can be pretty invasive. So before that step is taken I would like to know definitively that what I would like to do is not possible.

  • Alter type

    Hi,
    I have a table which is using p_t data type.
    create type p_t as varray(4) of varchar2(10);
    create table abc(
    name varchar2(200),
    password p_t,
    add varchar(500));
    and some data is also present in this table. My query is - I have to change the size of type p_t of varray from 4 to 15.There is no change of varchar2(10) size.
    kindly let me know the command for this and also is there any effect of dependent table ABC after changing the varray size?
    Thanks & Regards

    Hi,
    As per suggwstion I did the same steps as follow but it didnt work out.
    1. export the table data.
    2. drop the table and type.
    3. Recreate the type(with new array length) and table .
    4. import the table.
    while doing 4th step got the error as mention below.
    IMP-00061: Warning: Object type "HPMUSER"."HISTORY_NT" already exists with a different identifier
    "CREATE TYPE "HISTORY_NT" TIMESTAMP '2009-06-06:15:13:24' OID '6BABD71680BE7"
    "119E04400144F1F6BCA' AS VARRAY(11) OF varchar(255);"
    IMP-00063: Warning: Skipping table "HPMUSER"."USERS" because object type "HPMUSER"."HISTORY_NT" cannot be created or has different identifier
    Import terminated successfully with warnings.
    Kindly let me know. How can I do this change on 9i DB.
    Regards

  • Typekit is altering type weights even though they are listed as the same weight

    Hi!
    I am using Typekit's Lato font in Muse (2014.3.0.11760)
    'Lato Black' on the homepage is visually different to the exact same font on another page.
    Homepage - using Lato Black for 'Exhibition Displays'
    Other page 'Lato Black' for 'Exhibition Displays' also.
    I have tried copying and pasting the exact same state button to different pages but the weight becomes heavier each time.

    Hi Gary,
    Check the formatting of the text frame for all states, particularly the Active state. If you have set specific formating for the Active state (e.g., a different font weight -- either directly or using the Bold button) AND the text frame or its containing button has a hyperlink to a page, then the appearance will vary if the text frame appears on the linked page (because it will automatically be put in the active state).
    If that does not explain what you are seeing, please post the site URL for me to investigate further. If the site isn't live yet, you could always publish it to a temporary Business Catalyst site.
    Thanks,
    Abhishek

  • OS X and classic creator and type codes

    Is there anyway, within the native os to change type and creator codes?
    Why would I want to? Here's an example:
    I get a .zip from a customer. Because I have Stuffit installed it takes ownership of the archive. That would be fine except I've noticed different results using stuffit vs. BomaArchive helper. As in they don't unzip with the same amount of files.
    I used to use Super Get info to change them, but that's not a possiblity now. And if Apple didn't hide Boma so deep in the OS I might be able to just make an alias and drop them on it. Won't find on a search for "Boma", both visible and invisible.
    Thanks for any help. I'm just trying to find another way to make my OS do what I want it to, not what some app develper or OS creator deems should happen.
    Remember... think different?

    You can easily change any document's default application by selecting the document icon, press COMMAND-I to open the Get Info window. In the section labeled Open With select the desired default app from the drop down menu. If you want all similar documents opened by the default app, then click on the Change All button.
    Alternatively download the freeware preference pane RCDefaultApp from www.versiontracker.com.
    BTW, not pointing a finger at you, but keep in mind that even morons "think different."
    Thanks for your ideas, and more, thanks for the jab at the slogan Apple used to use to differentiate itself, and it's consumers from other, less user friendly OS's.
    But your solution doesn't help me. I'm well aware of changing the assigned app through the get info window, and that there are other utilities as, if not more adept at this function. My problem is that, if I have to solve my problem this way, instead of gaining knowledge about what effect type and creator codes have in OS X and how to change and deal with them, I find it hard to impossible to track down the location of the app BomaArchiveHelper. It never appears in the "Open with" pop up, and therefore I need to know the location in order to navigate to it to tell OS X to use it. And being that I see different results when unzipping depending on which app was used to create the zip, I don't want to set it as default.
    So, my questions stand.
    How do you view and alter type and creator codes in OS X, and where exactly is BomaArchiveHelper located.
    G4 MDD Dual 1.25 Mac OS X (10.3.9)

  • [vbs] [js] [CS2]  Can it alter the size of an only page?

    Can it personalize the size of an only page in InDesign through script?
    Example:
    I have four pages in the document.
    The size of the document is W = "612 pt" and H = "792 pt".
    Can I alter only the size of page three? Example: W = "300 pt" and H = "450 pt"
    Does InDesign allow to do this alteration type through script?
    Thanks

    no - you can't
    but there is a plugin - http://www.dtptools.com/product.asp?id=pcid
    robin
    www.adobescripts.com

  • Accessing object payload type attributes by index?

    Plz help
    Using object type in queues enforce some limitations to altering object type. You can use only ALTER TYPE and use alteration that only "expand" properties. It'is possible to change column type from VARCHAR2(10) to VARCHAR2(20) but not vice versa. Also it's impossible to drop object attribute or re-create object type. While storing object source in svn it's uncomfortable to view object source as sequence of ALTER TYPE commands. So, it seems that solution can be usage XMLTYPE as object payload type. But this raise another problem.
    With object type I can use dequeue with BROWSE option that allows to cut by object attribute value. But how to browse by specific attribute value in case of XMLTYPE as object payload type?
    The second question is how to index specific attribute both in object type and in XMLTYPE? I will have a large queue and need quick lookup by specific object attributes.
    The only possibility I see is to index CORR_ID column. It will work good for one attribute. But what to do if I will need index several attributes? Compose them as string? It will lead to data denormalization...

    Thanx for your answer
    The goal was to create a queues with possibility to store processed data for some period of time for tracking purposes. RETENTION_TIME settings allows to do that. Moreover, it can be changed dynamically. This is exactly what our customer requires. Queues with configurable history keeping setting.
    We already have self realized queues based on usual heap tables. In these tables we don't work with object type. As result we can directly index any attribute (column) and have quick access to it. Requirements to make configurable how long processed data saved are pushes to partitioned tables with administrative scripts that will drop old partitions by end user request. This solution seemed to me much more complex in realization then simple change of the RETENTION_TIME parameter via DBMS_AQADM. But after that I found this issue with quick access to attributes...
    And yes, I'm aware about XQuery for XML. But without any index on column it will lead to full scan with additional XQuery expression calculation for each value.

  • (8I) COLLECTION TYPE 변경 방법

    제품 : SQL*PLUS
    작성날짜 : 1999-05-12
    COLLECTION TYPE 변경 방법
    =========================
    collection type은 attribute나 column의 데이타 타입으로
    사용된다. 이전에 정의한 collection type의 property를 변경해야
    하는 경우가 종종 발생하게 되는데 그 작업이 간단하지 않다.
    ALTER TYPE문은 spec이나 body를 재컴파일하거나, member를 추가
    하는 경우에는 사용할 수 있지만 현재 collection의 property를
    바꿀수는 없다. 만약 변경하려한다면 다음 에러가 날 것이다.
    ORA-22319: type attribute information altered in ALTER TYPE
    collection의 property 를 변경하기 위해서는 collection을 drop
    한 후, 다시 만들어야 하는데 참조하는 오브젝트가 존재하는 경우
    dependency 문제로 인해 collection type을 drop 할 수도 없다.
    ORA-02303: cannot drop or replace a type with type
    or table dependents
    즉, Oracle 8i 이전에는 collection의 attribute를 변경하려면
    parent table과 collection type을 모두 drop한 후, 재생성
    해야만 했다.
    그러나 Oracle 8i new feature인 ALTER TABLE DROP COLUM문을
    이용하여 parent table을 drop하지 않고도 collection type의
    attribute를 변경할 수 있게 되었다.
    다음은 parent table을 drop하지 않고 collection (nested table)을
    변경하는 예제이다.
    SQL> /* object type 선언 */
    SQL> create type object_type as object (
    col1 number,
    col2 varchar2(20));
    SQL> /* nested table type 선언*/
    SQL> create type object_ntable as table of object_type;
    SQL> /* parent table 생성 */
    SQL> create table master (
    col1 number primary key,
    col2_list object_ntable)
    nested table col2_list store as master_col2;
    SQL> insert into master values (1,
    object_ntable(object_type(1,'1'),
    object_type(1,'2'),
    object_type(1,'3')));
    SQL> insert into master values (2,
    object_ntable(object_type(2,'1'),
    object_type(2,'2'),
    object_type(2,'3')));
    SQL> commit;
    1. 기존에 저장된 collection data를 임시 table에 저장.
    SQL> create table temp_detail as
    select m.col1 "MASTER_COL1", n.col1, n.col2
    from master m, table(m.col2_list) n;
    SQL> select * from temp_detail;
    MASTER_COL1 COL1 COL2
    1 1 1
    1 1 2
    1 1 3
    2 2 1
    2 2 2
    2 2 3
    2. parent table의 nested table column을 drop 하기
    3. nested table type을 drop하기.
    4. object type을 drop하기.
    SQL> alter table master drop column col2_list;
    SQL> drop type object_ntable;
    SQL> drop type object_type;
    5. attribute을 변경한 object type을 재생성하기
    6. nested table type을 재생성하기.
    SQL> create type object_type as object (
    col1 number,
    col2 varchar2(30));
    SQL> create type object_ntable as table of object_type;
    7. parent table에 nested table column을 추가하기.
    SQL> alter table master add (col2_list object_ntable)
    nested table col2_list store as master_col2;
    8. 임시 테이블에 저장했던 data를 nested table에 저장하기.
    SQL> update master m
    set col2_list = (cast(multiset(
    select col1, col2
    from temp_detail
    where master_col1 = m.col1)
    as object_ntable))
    where col1 in
    (select distinct master_col1 from temp_detail);
    SQL> select * from master;
    COL1
    COL2_LIST(COL1, COL2)
    1
    OBJECT_NTABLE(OBJECT_TYPE(1, '1'), OBJECT_TYPE(1, '2'), OBJECT_TYPE(1, '3'))
    2
    OBJECT_NTABLE(OBJECT_TYPE(2, '1'), OBJECT_TYPE(2, '2'), OBJECT_TYPE(2, '3'))
    * TABLE(), DROP COLUMN 절은 Oracle 8i new features 이다.

    each member of the insert must be a collection, hope this eample helps;
    CREATE OR REPLACE PROCEDURE fast_way IS
    TYPE parent_rec IS RECORD (
    part_num dbms_sql.number_table,
    part_name dbms_sql.varchar2_table);
    p_rec parent_rec;
    CURSOR c IS
    SELECT part_num, part_name
    FROM parent;
    l_done BOOLEAN;
    BEGIN
    OPEN c;
    LOOP
    FETCH c BULK COLLECT INTO p_rec.part_num, p_rec.part_name
    LIMIT 500;
    l_done := c%notfound;
    FORALL i IN 1 .. p_rec.part_num.COUNT
    INSERT INTO child
    (part_num, part_name)
    VALUES
    (p_rec.part_num(i), p_rec.part_name(i));
    EXIT WHEN (l_done);
    END LOOP;
    COMMIT;
    CLOSE c;
    END fast_way;
    /

  • Sql Devloper 4.0.0.13 - problems with displaying user data types

    Hi,
    I have installed new version of sqldeveloper and have discovered some problems with displaying user data types. The data that is described as VARCHAR2 are displayed with ‘???’.
    The problem persist in table view, script output and exported files.
    My type is described as follows:
    create or replace TYPE "DPTY_ADRESA" AS OBJECT
      ID_DPSF_OPCINE                                         NUMBER,
      ID_DPSF_MJESTA                                        NUMBER,
      OPCINA                                            VARCHAR2(100),
      MJESTO                                            VARCHAR2(100),
      ULICA                                 VARCHAR2(200),
      BROJ                                   VARCHAR2(20),
      SPRAT                VARCHAR2(20),
      OSTALO                             VARCHAR2(100),
      CONSTRUCTOR FUNCTION dpty_adresa RETURN SELF AS RESULT
    add MEMBER FUNCTION dajAdresu RETURN VARCHAR2 cascade;
    when make select column from table that contains this type I get next results:
    CASE 1:
    SQLDeveloper Version 3.2.20.09; Build MAIN-09.87; JDK 1.6.0_43; Windows 7 64 bit
    Select:
    select id, adresalokacija
    from dptr_saglasnosti
    where id = 1;
    Result:
            ID ADRESALOKACIJA
             1 COMP.DPTY_ADRESA(124,4913,'TRAIK','TURBE','BABANA','3452','0',NULL)
    END CASE 1;
    CASE 2:
    SQLDeveloper Version 4.0.0.13; Build MAIN-13.80; JDK 1.7.0_40; Windows 7 64 bit
    Select1:
    select id, adresalokacija
    from dptr_saglasnosti
    where id = 1;
    Result1:
    ID ADRESALOKACIJA
             1 COMP.DPTY_ADRESA(124,4913,'???','???','???','???','???',NULL)    
    But if I select one element it is displayed normal.
    Select2:
    select id, a.adresalokacija.opcina
    from dptr_saglasnosti a
    where id = 1;
    Result2:
    ID ADRESALOKACIJA.OPCINA
             1 TRAVNIK                  
    END CASE 2;
    I have tried this scenario on three different pc with same output.
    Pleas help me to get rid of the '???' in result.
    Best Regards,
    Omer

      I tried on SQLDeveloper Version 4.0.0.13; Build MAIN-13.80; JDK 1.7.0_45; Windows 7 64 bit; NLS setting is default
    all data can show,No ??? in result
    Test step as following:
    create or replace TYPE "DPTY_ADRESA" AS OBJECT
      ID_DPSF_OPCINE                                         NUMBER,
      ID_DPSF_MJESTA                                        NUMBER,
      OPCINA                                            VARCHAR2(100),
      MJESTO                                            VARCHAR2(100),
      ULICA                                 VARCHAR2(200),
      BROJ                                   VARCHAR2(20),
      SPRAT                VARCHAR2(20),
      OSTALO                             VARCHAR2(100),
      CONSTRUCTOR FUNCTION dpty_adresa RETURN SELF AS RESULT
    alter TYPE "DPTY_ADRESA" add MEMBER FUNCTION dajAdresu RETURN VARCHAR2 cascade;
    CREATE TABLE dptr_saglasnosti (
    adresalokacija        DPTY_ADRESA,
      id    number);
      INSERT INTO dptr_saglasnosti VALUES (
      DPTY_ADRESA (65,225,'Vrinda Mills', '1-800-555-4412','sss','aaaa','eeeee','attta'),1 );
    select id, adresalokacija from dptr_saglasnosti where id = 1;
    ID ADRESALOKACIJA
    1    HRCP.DPTY_ADRESA(65,225,'Vrinda Mills','1-800-555-4412','sss','aaaa','eeeee','attta')

Maybe you are looking for

  • Ipod Not Working - Battery Issue?

    I have read some about the battery life of an Ipod not being that long. And you have to send it in to be replaced. Is that true? If so, how do you know when the issue is the battery and not something else. I havea problem with my Ipod that is9 months

  • Caching issue in Web proxy 4.0.13

    I have the following settings in the obj.conf but i still see my http requests go back to the origin server. I have the Web proxy installed on Solaris 10 # more obj.conf # You can edit this file, but comments and formatting changes # might be lost wh

  • MM-SUS for the extended classic scenario

    Hi, I have done SUS-MM for the classic scenario. Did anyone implement SUS-MM  for the extended classic scenario ? Did you face any problem or will it be same as 'classic' scenario ? Please help Thanks Pranav

  • Lightroom crashed while dragging a photo in Book module

    I was creating a book in Lightroom 5. While dragging a photo within the book Lightroom quit. An error window popped up and I sent the message per instruction. The message that came back stated Lightroom could not repair the problem. The screen is now

  • I need your assistance​? Verizon won't port old phone number over to my new FIOS

    Need your help on resolving this issue with Verizon.  I switched from COX cable. Had Verizon FIOS triple play installed at my house about 3 days ago.  I signed up online for Verizon FIOS and selected a new telephone number because I was told online t