Grant on table with Nested Column.

Hi,
I looked for an answer to this issue, but I couldn't find it. So, here it is. I am trying to grant select on a table with nested column to a different user and still the select won't work. Here is an example.
FIRST_USER@TST > create type test_object as object(ref01 varchar2(3));
2 /
Type created.
FIRST_USER@TST > create type test_type is table of test_object;
2 /
Type created.
"afiedt.buf" 3 lines, 100 characters
1 create table table1 (x varchar2(1), y test_type)
2* nested table y store as type1_nt return as value
FIRST_USER@TST > /
Table created.
FIRST_USER@TST > grant select on table1 to SECOND_USER;
Grant succeeded.
SECOND_USER @TST > select * from FIRST_USER.table1;
select * from FIRST_USER.table1
ERROR at line 1:
ORA-01031: insufficient privileges
I am sure I am missing something. I may have to give the grant a different way maybe? Please help.
Thank you.

See http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14260/adobjmng.htm#sthref786.
You need to grant execute to the appropriate user on the underlying type.

Similar Messages

  • Table with frozen columns

    In a recent project I've had the need of a Java Swing table with frozen columns.
    After a long research at the Swing forum at java.sun.org and google I found out that
    1. Currently there is no proper Open Source solution
    2. All the postings at sun are good concepts, but far away from solutions
    3. The only (for me )acceptable commercial solution is the JCTable from Quest (formerly KGroup)
    Since I want to have full control over the source code of the table, I decided to collect all the tips from this forums and write my own table.
    Here is the my first result:
    http://jroller.com/resources/kriede/CoolTable.java
    The main idea is to have two tables, one for the locked columns (=fixed columns = frozen columns) and one for the scrollable columns. With all the tips from this forum it was more or less a puzzle to make it work pretty. The next task will be to provide a JTable-like interface, meaning to write delegate/adapter methods to the API of the two nested JTable instances.

    The FixedColumnExample from the link that you provided doesn't work with JDK 1.3 or higher.
    Anyway, putting a seperate table for the fixed columns into the row header is the first step to solve the problem of fixed columns.
    The next problem is to synchonize the scrolling behaviour of the two tables. The FixedColumnExample tries to do it by overwriting the valueChange method (maybe this was working with JDK 1.8), but with JDK 1.2 or higher it is recommended to use ChangeListeners. That's what I am doing, as also described here: http://www.chka.de/swing/components/JScrollPane-bugfix.html.
    Another problem is navigation with the tab or arrow keys: The default actions for those events move the selection only within one JTable. It would be nicer, if e.g. the tab key moves the selection within one row across both, the fixed and the scrollable columns.
    Those problems and some more are solved in the CoolTable sample:
    http://jroller.com/resources/kriede/CoolTable.java
    Please try it out and send comments.

  • Error while importing a table with BLOB column

    Hi,
    I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "CMM_PARTY_DOC" ("PDOC_DOC_ID" VARCHAR2(10), "PDOC_PTY_ID" VAR"
    "CHAR2(10), "PDOC_DOCDTL_ID" VARCHAR2(10), "PDOC_DOC_DESC" VARCHAR2(100), "P"
    "DOC_DOC_DTL_DESC" VARCHAR2(100), "PDOC_RCVD_YN" VARCHAR2(1), "PDOC_UPLOAD_D"
    "ATA" BLOB, "PDOC_UPD_USER" VARCHAR2(10), "PDOC_UPD_DATE" DATE, "PDOC_CRE_US"
    "ER" VARCHAR2(10) NOT NULL ENABLE, "PDOC_CRE_DATE" DATE NOT NULL ENABLE) PC"
    "TFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS"
    " 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_AGIMSAPPOLOLIVE030"
    "4" LOGGING NOCOMPRESS LOB ("PDOC_UPLOAD_DATA") STORE AS (TABLESPACE "TS_AG"
    "IMSAPPOLOLIVE0304" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE L"
    "OGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEF"
    "AULT))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TS_AGIMSAPPOLOLIVE0304' does not exist
    I used the import command as follows :
    imp <user/pwd@conn> file=<dmpfile.dmp> fromuser=<fromuser> touser=<touser> log=<logfile.log>
    What can I do so that this table gets imported correctly?
    Also tell me "whether the BLOB is stored in different tablespace than the default tablespace of the user?"
    Thanks in advance.

    Hello,
    U can either
    1) create a tablespace with the same name in destination where you are trying to import.
    2) get the ddl of the table, modify the tablespace name to reflect the existing tablespace name in destination and run the ddl in the destination database, and run your import command with option ignore=y--> which will ignore all the create errors.
    Regards,
    Vinay

  • HOW TO CREATE A TABLE WITH 800 COLUMNS?

    I have to create a table with 800 columns.I know the create statement to create a table but it will take more time.
    So tell me the other method.

    If you really think that you have to store 800 values for a given entity, it would be a wise idea if you store you information in columnar fashion. Make a main table and a attribute table, keep the primary identifier in the  main table and store other attributes in the attribute table where you can keep the primary key of the first table as foreign key (not necessary) to maintain the relationship.
    eg.
    emp_id
    emp_name
    dob
    city
    state
    country
    pincode
    1
    Mr X
    01/01/1990
    ABC
    ZXC
    MMM
    12345
    Can be stored as
    Main Table
    emp_id
    emp_name
    1
    Mr X
    Attribute Table
    attr_id
    emp_id
    attr_nam
    attr_value
    1
    1
    dob
    01/01/1990
    2
    1
    city
    ABC
    3
    1
    state
    ZXC
    4
    1
    country
    MMM
    5
    1
    pincode
    12345
    Creating table with large number of columns is bad design as suggested by other Gurus.
    Thanks

  • How to create a table with editable column values.

    Hi everyone,
    I think this is very simple but i'm not able to find how to do this. This is my requirement. I need to create a table with n columns and 1 row initially. user should be able to enter data into this table and click of a button should insert data into the data base table. Also there should be a button at the bottom of the table to add 1 row to the table.
    I know how to do the insert to database, but can anyone please let me know how to create a table that allows user to enter data and how to create a add 1 row button?
    Thanks in Advance!

    Raghu,
    Go through the ToolBox tutorial Create Page & Advanced table section of OAF Guide.
    Step 1 - You require to create EO & a VO based on this EO. This EO will be of DataBase table where you want to insert the data.
    Step 2 - Create a Advanced table region. (Refer this Adavanced table section for more on this)
    Step 3 - Attach this VO in the BC4J component of Adavanced Table region.
    Regards,
    Gyan

  • How to read/write a binary file from/to a table with BLOB column

    I have create a table with a column of data type BLOB.
    I can read/write an IMAGE file from/to the column of the table using:
    READ_IMAGE_FILE
    WRITE_IMAGE_FILE
    How can I do the same for other binary files, e.g. aaaa.zip?

    There is a package procedure dbms_lob.readblobfromfile to read BLOB's from file.
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#sthref3583
    To write a BLOB to file you can use a Java procedure (pre Oracle 9i R2) or utl_file.put_raw (there is no dbms_lob.writelobtofile).
    http://asktom.oracle.com/pls/ask/f?p=4950:8:1559124855641433424::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6379798216275

  • Convert a table with one column to panelList with outputText

    Hi,
    I have a table with one column, I would like to change it to use panelList to present it instead. What will be the syntax for panelList?
    <af:table value="#{bindings.ItasUiRuleParamsVO2.collectionModel}"
    var="row"
    rows="#{bindings.ItasUiRuleParamsVO2.rangeSize}"
    emptyText="#{bindings.ItasUiRuleParamsVO2.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.ItasUiRuleParamsVO2.rangeSize}"
    rowBandingInterval="0"
    selectedRowKeys="#{bindings.ItasUiRuleParamsVO2.collectionModel.selectedRow}"
    selectionListener="#{bindings.ItasUiRuleParamsVO2.collectionModel.makeCurrent}"
    rowSelection="single" id="t2"
    partialTriggers="::t1">
    <af:column sortProperty="RuleName" sortable="true"
    headerText="#{bindings.ItasUiRuleParamsVO2.hints.RuleName.label}"
    id="c11">
    <af:outputText value="#{row.RuleName}"
    id="ot11"/>
    </af:column>
    </af:table>
    I tried this:
    <af:panelList id="pl1">
    <af:forEach items="#{bindings.ItasUiRuleParamsVO2.collectionModel}">
    <af:outputText value="#{item.RuleName}" id="ot14"/>
    </af:forEach>
    </af:panelList>
    but the error say:
    javax.servlet.jsp.JspException: "items" must point to a List or array
         at org.apache.myfaces.trinidadinternal.taglib.ForEachTag.doStartTag(ForEachTag.java:136)
    Any ideas?
    Thanks
    -Mina

    <af:forEach items="#{bindings.ItasUiRuleParamsVO2.collectionModel}" var="row">
    <af:outputText value="#{row.RuleName}" />
    </af:forEach>
    and make sure the table binding is still in place in your pagedef (or binding tab)

  • Error inserting a row into a table with identity column using cfgrid on change

    I got an error on trying to insert a row into a table with identity column using cfgrid on change see below
    also i would like to use cfstoreproc instead of cfquery but which argument i need to pass and how to use it usually i use stored procedure
    update table (xxx,xxx,xxx)
    values (uu,uuu,uu)
         My component
    <!--- Edit a Media Type  --->
        <cffunction name="cfn_MediaType_Update" access="remote">
            <cfargument name="gridaction" type="string" required="yes">
            <cfargument name="gridrow" type="struct" required="yes">
            <cfargument name="gridchanged" type="struct" required="yes">
            <!--- Local variables --->
            <cfset var colname="">
            <cfset var value="">
            <!--- Process gridaction --->
            <cfswitch expression="#ARGUMENTS.gridaction#">
                <!--- Process updates --->
                <cfcase value="U">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                    <cfquery datasource="#application.dsn#">
                    UPDATE SP.MediaType
                    SET #colname# = '#value#'
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <!--- Process deletes --->
                <cfcase value="D">
                    <!--- Perform actual delete --->
                    <cfquery datasource="#application.dsn#">
                    update SP.MediaType
                    set Deleted=1
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <cfcase value="I">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                   <cfquery datasource="#application.dsn#">
                    insert into  SP.MediaType (#colname#)
                    Values ('#value#')              
                    </cfquery>
                </cfcase>
            </cfswitch>
        </cffunction>
    my table
    mediatype:
    mediatypeid primary key,identity
    mediatypename
    my code is
    <cfform method="post" name="GridExampleForm">
            <cfgrid format="html" name="grid_Tables2" pagesize="3"  selectmode="edit" width="800px" 
            delete="yes"
            insert="yes"
                  bind="cfc:sp3.testing.MediaType.cfn_MediaType_All
                                                                ({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
                  onchange="cfc:sp3.testing.MediaType.cfn_MediaType_Update({cfgridaction},
                                                {cfgridrow},
                                                {cfgridchanged})">
                <cfgridcolumn name="MediaTypeID" header="ID"  display="no"/>
                <cfgridcolumn name="MediaTypeName" header="Media Type" />
            </cfgrid>
    </cfform>
    on insert I get the following error message ajax logging error message
    http: Error invoking xxxxxxx/MediaType.cfc : Element '' is undefined in a CFML structure referenced as part of an expression.
    {"gridaction":"I","gridrow":{"MEDIATYPEID":"","MEDIATYPENAME":"uuuuuu","CFGRIDROWINDEX":4} ,"gridchanged":{}}
    Thanks

    Is this with the Travel database or another database?
    If it's another database then make sure your columns
    allow nulls. To check this in the Server Navigator, expand
    your DataSource down to the column.
    Select the column and view the Is Nullable property
    in the Property Sheet
    If still no luck, check out a tutorial, like Performing Inserts, ...
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    John

  • Dynamic Table with two columns

    Hi!
    i have to create a Dynamic Table with two columns having 5-5 links each with some text...... three links r based on certain conditions....they r visible only if condition is true...
    if the links r not visible in this case another links take it's place & fill the cell.
    links/text is coming from database.
    i am using Struts with JSP IDE netbeans
    Please help me
    BuntyIndia

    i wanna do something like this
    <div class="box_d box_margin_right">
              <ul class="anchor-bullet">
              <c:forEach items="${data.faqList}" var="item" varStatus="status"
                        begin="0" end="${data.faqListSize/2-1}">
                        <li>${item}</li>
                   </c:forEach>
              </ul>
              </div>
              <div class="box_d">
              <ul class="anchor-bullet">
              <c:forEach items="${data.faqList}" var="item" varStatus="status"
                        begin="${data.faqListSize/2}" end="${data.faqListSize}">
                        <li>${item}</li>
                   </c:forEach>
              </ul>
              </div>
    wanna divide table in two columns....if one link got off due to condition other one take it's position...
    I have created a textorderedlist
    Bunty

  • Import tables with nested table : ORA-00600

    In Oracle 9.2
    Create object, type as table, and table with nested table (store as syms_ntab) are successfully.
    Also its export.
    In process of import on another server (also 9.2, 'fromuser=one touser=two') shows errors:
    . . importing table "SYMS_NTAB"
    IMP-00058: ORACLE error 600 encountered
    ORA-00600: internal error code, arguments: [kokeeafi1], [2], [2], [], [], [], [], []
    IMP-00075: Warning: The nested table may contain partial rows or duplicate rows
    But for all that table is created and error occur on phase inserting strings.
    What is this?
    In Oracle 8.0.5 i perform similar operation without error.

    From Oracle error messages and codes manual:
    ORA-00600 internal error code, arguments: [string], [string], [string], [string], [string], [string], [string], [string]
    Cause: This is the generic internal error number for Oracle program exceptions. It indicates that a process has encountered a low-level, unexpected condition. Causes of this message include:
    * timeouts
    * file corruption
    * failed data checks in memory
    * hardware, memory, or I/O errors
    * incorrectly restored files
    The first argument is the internal message number. Other arguments are various numbers, names, and character strings. The numbers may change meanings between different versions of Oracle.
    Action: Report this error to Oracle Support Services after gathering the following information:
    * events that led up to the error
    * the operations that were attempted that led to the error
    * the conditions of the operating system and databases at the time of the error
    * any unusual circumstances that occurred before receiving the ORA-00600 message
    * contents of any trace files generated by the error
    * the relevant portions of the Alter files
    Note: The cause of this message may manifest itself as different errors at different times. Be aware of the history of errors that occurred before this internal error.

  • Partition exchange error on table with nested table

    On Oracle 11.2.0.1, I have a partitioned table with some partitions that need to be 'archived' (in terms of moving partitions to an 'archive' table).
    I have a source table like:
    CREATE TABLE IS_PODACI245
      ID_OBJEKTA_IDENTIFIKACIJA  NUMBER(10),
      ID_OBJEKTA                 NUMBER(20),
      DATUM                      TIMESTAMP(6)       NOT NULL,
      TZ                         NUMBER(3),
      DATA1                      NUMBER(10),
      DATA2                      NUMBER(6),
      DATA3                      NUMBER(10),
      DATA4                      NUMBER,
      DATA5                      T_NTCIP_CLIMATE_TABLE
    NESTED TABLE DATA5 STORE AS IS_PODACI245_STORE_TABLE
    TABLESPACE DATA
    PARTITION BY RANGE (DATUM)
      PARTITION P_201107 VALUES LESS THAN (TIMESTAMP' 2011-08-01 00:00:00')
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA, 
      PARTITION P_MAXVALUE VALUES LESS THAN (MAXVALUE)
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE INDEX IDX_IS_PODACI245_KOMPLEKS ON IS_PODACI245
    (ID_OBJEKTA_IDENTIFIKACIJA, ID_OBJEKTA, DATUM)
      TABLESPACE DATA
    LOCAL ( 
      PARTITION P_201107
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA, 
      PARTITION P_MAXVALUE
        LOGGING
        NOCOMPRESS
        TABLESPACE DATA
    NOPARALLEL;
    CREATE OR REPLACE TYPE t_ntcip_climate_table as table of t_ntcip_climate_fmt;
    CREATE OR REPLACE TYPE t_ntcip_climate_FMT as object
    (  dev_index number(6)
    ,   dev_description varchar2(512)
    ,   dev_type number(10)
    ,   dev_status number(10)
    ,   dev_mfr_status varchar2(512)
    ,   dev_active number(3)
    ,   dev_test_activation number(10)
    /I would like to make exchange partition using stage table, and everything is going fine on all tables, but only on a few of them (listed source is one of them, and they're only tables with nested tables wihin), where I get an error.. but sometimes ;)
    on a statement like:
    ALTER TABLE IS_PODACI245_ARH EXCHANGE PARTITION P_201106  WITH TABLE IS_PODACI245_STAGE EXCLUDING INDEXES  WITHOUT VALIDATION;I got an error:
    ORA-00001: unique constraint (TXV.SYS_C0032911) violated
    it's an unique index between parent and nested table.
    what could cause that problem?

    Dear,
    I suppose that the unique constraint
    ORA-00001: unique constraint (TXV.SYS_C0032911) violatedis the one you 've created on the nested table IS_PODACI245_STORE_TABLE
    If so, why not disable that constraint and try again.
    I have never exchanged such a kind of partitioned table having a nested table in it. But, I could imagine that the cloned non partitioned table IS_PODACI245_STAGE should at least be the exact image of the partitioned table IS_PODACI245_ARH (of course without the partition part) but with the nested table part and including all indexes
    In addition, if you have a parent/child relationship between your partitioned tables, then there is a chronological order of exchange starting by the child and then finishing by the parent
    see the following link for more information about this order of exchange (and comment 2 for an example also)
    http://jonathanlewis.wordpress.com/2006/12/10/drop-parent-partition/#more-65
    Hope this helps
    Mohamed Houri

  • Sparse table with many columns

    Hi,
    I have a table that contains around 800 columns. The table is a sparse table such that many rows
    contain up to 50 populated columns (The others contain NULL).
    My questions are:
    1. Table that contains many columns can cause a performance problem? Is there an alternative option to
    hold table with many columns efficiently?
    2. Does a row that contains NULL values consume storage space?
    Thanks
    dyahav

    [NULLs Indicate Absence of Value|http://download-west.oracle.com/docs/cd/B14117_01/server.101/b10743/schema.htm#sthref725]
    A null is the absence of a value in a column of a row. Nulls indicate missing, unknown, or inapplicable data. A null should not be used to imply any other value, such as zero. A column allows nulls unless a NOT NULL or PRIMARY KEY integrity constraint has been defined for the column, in which case no row can be inserted without a value for that column.
    Nulls are stored in the database if they fall between columns with data values. In these cases they require 1 byte to store the length of the column (zero).
    Trailing nulls in a row require no storage because a new row header signals that the remaining columns in the previous row are null. For example, if the last three columns of a table are null, no information is stored for those columns. In tables with many columns, the columns more likely to contain nulls should be defined last to conserve disk space.
    Most comparisons between nulls and other values are by definition neither true nor false, but unknown. To identify nulls in SQL, use the IS NULL predicate. Use the SQL function NVL to convert nulls to non-null values.
    Nulls are not indexed, except when the cluster key column value is null or the index is a bitmap index.>
    My guess for efficiently storing this information would be to take any columns that are almost always null and place them at the end of the table definition so they don't consume any space.
    HTH!

  • Replicate Table with spatial columns

    I'd like to know how to
    replicate (updatable snapshot) a table
    with spatial columns.
    when i try to create a master repobject
    i've got ORA-23318 error.
    What can i do?
    null

    Hi Vincent,
    Oracle does not support replication of object in 8.1.6 or 8.1.7. I believe replication support is expected for the version after.
    Sorry,
    Dan

  • Exporting Table with CLOB Columns

    Hello All,
    I am trying to export table with clob columns with no luck. It errors saying EXP-00011TABLE do not exist.
    I can query the table and the owner is same as what i am exporting it from.
    Please let me know.

    An 8.0.6 client definitely changes things. Other posters have already posted links to information on what versions of exp and imp can be used to move data between versions.
    I will just add that if you were using a client to do the export then if the client version is less than the target database version you can upgrade the client or better yet if possilbe use the target database export utility to perform the export.
    I will not criticize the existance of an 8.0.6 system as we had a parent company dump a brand new 8.0.3 application on us less than two years ago. We have since been allowed to update the database and pro*c modules to 9.2.0.6.
    If the target database is really 8.0.3 then I suggest you consider using dbms_metadata to generate the DDL, if needed, and SQLPlus to extact the data into delimited files that you can then reload via sqlldr. This would allow you to move the data with some potential adjustments for any 10g only features in the code.
    HTH -- Mark D Powell --

  • Bsp table with editable columns

    Hi,
    I want to create a table with some columns and include check box.
    Is it possible?
    I want to do this
    Table :
    Date   Time    Checkbox   Checkbox
    Also how can i make the columns editable ?
    Thank you

    hello,
    The basic idea would be use ITERATOR class reference in your 'Tavleview' HTMLB element
    Iterator class should user interface 'IF_HTMLB_TABLEVIEW_ITERATOR', here you can modify column properties (GET_COLUMN_DEFINITIONS method) and cell properties (RENDER_CELL_START)
    For your need:
    RENDER_CELL_START method, example coding would be:
    CASE p_column_key.
         WHEN 'Column name'.
        p_replacement_bee = cl_htmlb_checkbox=>factory(
                            id       = p_cell_id
                            _checked = p_cell_binding
                            disabled = 'X' ).
      ENDCASE.
    Thanks

Maybe you are looking for

  • Macbook pro 17" 3g battery status indicator stuck on 100%

    Battery status indicator stuck on 100% Worked normaly until today resetting smc does not help Battery Information:   Model Information:   Serial Number:          9G95201YS4M0A   Manufacturer:          DP   Device name:          bq20z951   Pack Lot Co

  • Unplayed podcasts not marked with dot at top level list

    Hello, Since I recently upgraded to iTunes 11.2, I've been having all kinds of trouble with podcasts.  Here's the most recent headache. Today, my "Podcasts" item in the side menu on the left says there are 6 unplayed episodes.  When I click on "Podca

  • Discoverer doesn't run the same query than TOAD

    Hi, I'm trying to make the following in Discoverer version 10.1.2: To display some records of a table using a condition and display the total of all of them of the same table. I'm trying to create a custom folder with the following query: SELECT PRST

  • Adobe Media PLayer Playlist

    Does anybody know the way of making a Playlist in Adobe Media Player 1.1 using my favorite videos? Is it possible from the AMP interface? I wish to reproduce several clips automatically in a stablished order. Thank you very much. B. Chavez

  • Set JTable to be uneditable?

    I create JTable using DefaultTableModel. I want user can only view the data but cannot edit value in each cell. How can I do that ?