Using table synonyms in Spatial 8.1.7 - ORA-13203 error

I'm using Oracle Spatial 8.1.7, and I'm encountering an "ORA-13203: failed to read USER_SDO_GEOM_METADATA" error when I try to run an SDO_RELATE query on a table that is a synonym of another table.
The table is called T_TRB1_BIN and the synonym is called S_TRB1_BIN. I can load T_TRB1_BIN just fine.
My USER_SDO_GEOM_METADATA view has a TABLE_NAME entry for T_TRB1_BIN. I tried changing it to S_TRB1_BIN, but to no avail.
So, am I correct in assuming that you cannot use synonyms on spatial tables if they are used in spatial queries? If so, does this apply to 9i as well?
Thank you.

I'm not 100% positive, but it looks like this does apply to 9i as well (synonym support doesn't work correctly, unless you use a synonym name equal to the table name).
Also, I believe this support has been added in 10i (but not 100% sure).

Similar Messages

  • Using database-link in view to get around ORA-01031 error

    I have been granted select rights on a users table. I am therefore able to select from his table. If however I try create a view against his table I run into the ORA-01031 problem. I have worked around this problem by creating a database-link to myself and then adding that to the view creation and it works. What are the downsides of using the database-link in this way?

    The only down side I have been able to identify is that a extra session is created and that the CPU has a little extra work due to the LOOP BACK that takes place. I need to ensure the network is not unnessesarly used and therefore will need to ensure that 127.0.0.1 (local host) is used in the database connection discription. e.g.
    create database link my_db_link connect to scott identified by tiger using '(description=(address=(protocol=tcp)(host=127.0.0.1) (Port = 1521) ) (connect_data= (sid=ora10g)))';

  • ORA-29855 - Error creating Spatial Index using a Stored Procedure

    Hi
    I am using Oracle 10gR2 database and I have written a stored procedure to create spatial index. But when i execute this function i get the following error message.
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in R-tree: [mdrcrtscrt]
    ORA-13231: failed to create index table [MDRT_217C1$] during R-tree creation
    ORA-13249: Stmt-Execute Failure: CREATE TABLE FGDABZ40.MDRT_217C1$ (NODE_ID NUMBER, NODE_LEVEL NUMBER, INFO BLOB) LOB (INFO) STORE AS (CACHE) NOLOGGING PCTFREE 2
    ORA-29400: data cartridge error
    ORA-01031: insufficient privileges
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    ORA-06512: at line 1
    ORA-06512: at "FGDABZ40.PKG_PSSDBE_APPLICATION", line 298
    ORA-06512: at line 17
    The tables that i am passing are registered in metadata and I am able to create indexes directly in sql plus. But when i try to create using this stored procedure, it fails.
    it should be possible to create indexes using a generic function. Has any faced a similar problem?
    regards
    sam

    Hi,
    I am having a same error on Oracle 10gR2 database. When I execute the same statement in sqlplus, it works. But it gives this error when I call the procedure which has this create spatial index statement.
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in R-tree: [mdrcrtscrt]
    ORA-13231: failed to create index table [MDRT_20CDA$] during R-tree creation
    ORA-13249: Stmt-Execute Failure: CREATE TABLE "SDOMGR".MDRT_20CDA$ (NODE_ID NUMBER, NODE_LEVEL NUMBER, INFO BLOB) LOB (INFO) STORE AS (CACHE) NOLOGGING PCTFREE 2
    ORA-29400: data cartridge error
    ORA-01031: i
    Any help will be appreciated.
    Thanks,
    Sri

  • Spatial Stored Proc Causing ORA-29902

    Good afternoon,
    I am getting an Oracle exception thrown when I try to run a spatial stored procedure.
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-13203: failed to read USER_SDO_GEOM_METADATA table
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 368
    ORA-06512: at line 1
    Prepared Statement:
    SELECT s.length,
    s.lki_segment_ext_id,
    sg.lki_segment_number,
    sg.geometry segment_geometry,
    h.highway_number || h.highway_letter highway,
    h.description highway_description
    FROM cis_lki_segment_node_ext sn,
    cis_lki_segment_ext s,
    cis_lki_segment_geometry_ext sg,
    cis_lki_highway_lki_segment hs,
    cis_lki_highway_ext h
    WHERE sn.lki_segment_node_ext_id = s.begin_lki_segment_node_ext_id
    AND s.lki_segment_ext_id = hs.lki_segment_ext_id
    AND hs.lki_highway_ext_id = h.lki_highway_ext_id
    AND sg.lki_segment_number = s.segment_number
    AND sn.version_id = in_lki_version_id
    AND sg.version_id = in_geometry_version_id
    AND hs.primary_highway_flag = 'Y'
    AND SDO_RELATE(sg.geometry, in_geometry, 'mask=ANYINTERACT querytype=WINDOW') = 'TRUE';
    I have been able to run this query successfully in a SQL window. The odd thing is that if I remove the "AND hs.primary_highway_flag = 'Y'" clause from the Procedure it then works fine.
    I have also tried a sub select of the table(s) in the FROM part and same results. works great in SQL not at all as a Procedure.
    I even swapped out the PRIMARY_HIGHWAY_FLAG with another string compare from the same table and the error message was the same.
    Does Spatial have some problems dealing with string parsing?
    Eric W

    No Vicky,
    We still have the same problem and our workaround was to return the value we were filtering on and handle it on the Java side.
    sgreener, (sorry I did not reply earlier I was pulled off onto another project)
    The in_geometry is passed into the procedure. It looks for features from a user defined area.
    Albert, I have had our in house Oracle guru look this over and he does not get it either. He has re-worked it a couple of times running it through explain plan and like I had said, as a sql statement it works great but when we plug it in as a stored proc then it does not work
    As for As for Oracle version we are currently using 9i (9.0.4)
    I am a GIS developer so I am quite familiar with how Geometry is/ can be handled while our Oracle guru, while an old hat at it is new to working with Spatial data. So in this case we are both at a loss.
    Eric W

  • How can I access a database remote without using dblink, synonyms,aliases?

    My store procedure access a remote tables using dblink, synonyms, alias, but by business company requirenments I nedd to use another data base access method. My PL/SQL statement looks like
    select c.cus_id, c.cus_name, p.bankaccno
    into v_cus_id, v_cus_name, v_bankaccno
    from customer c, payment@finantial p
    where c.cus_id = p.cus_id
    Are any method else to connect to several remote databases concurrently?
    If Yes, plase say me how is it, or tell me where do I obtain some examples, or any documentation.
    Edited by: user518321 on Apr 21, 2009 1:58 PM
    Ok, But I must not use any of these data base access method, metioned: dbliks, aliases, synonyms.
    Edited by: user518321 on Apr 21, 2009 2:05 PM
    Ok, It is enough for now, I am surprised for the response time and for their arguments, thanks a lot.
    Edited by: user518321 on Apr 21, 2009 2:50 PM

    If you want to access a table in a remote database using SQL, you will need a database link. It would be exceptionally odd for the business to require that you access a remote database and to prohibit the use of database links. What is the business reason for that combination?
    If you want to look into rather more esoteric solutions, you could load a JDBC driver for the remote database, write a Java stored procedure that queries the remote table using that JDBC driver, and then cobble together some PL/SQL that joins the two result sets. You won't be able to reference the remote table in SQL and the solution won't scale well as data volumes increase and you'll be writing a whole lot of code to manually join tables together, but it does avoid database links. Of course, whatever concerns lead to the ban on database links would probably apply to loading a JDBC driver into the database and writing Java stored procedures to access the remote database, but since you haven't explained the reasoning behind the restrictions, we're just guessing.
    Justin

  • Why we use Tables statement in case of using SELECT-OPTIONS:

    hi all,
    Why we use Tables statement in case of using the following coding in an ABAP program ...
    tables: vbak.
    SELECT-OPTIONS: s1 for vbak-vbeln.
    here if we dont provide the tables statement why it does not work ????
    pls answwer ....???

    Hi
    This statement is not allowed in classes and declares a data object table_wa as a table work area whose data type is adopted from the identically named structured data type table_wa from the ABAP Dictionary. table_wa must be defined as a flat structure in the ABAP Dictionary. You can specify database tables or Views for table_wa.
    Work table areas declared with TABLES are interface work areas and should only be declared in the global declaration section of a program for the following purpose:
    reward if usefull
    The statement TABLES is required for exchanging data between screen fields that were defined in a program screen when transferring from the ABAP Dictionary and the ABAP program. For the screen event PBO, the content of the table work area is transferred to identically named screen fields; for PAI, the system adopts the data from identically named screen fields.
    In executable programs, flat table work areas can be used for adopting data that were provided for the event GET table_wa from a linked logical database. TABLES is synonymous with the statement NODES for this purpose.
    Work table areas declared with TABLES behave like the data declared with the addition COMMON PART, meaning the data are used by the programs of a program group.
    Table work areas declared with TABLES can be declared in subroutines and
    function modules. However, this is not recommended. A table work area declared in a procedure is not local but belongs to the context of a framework program. The table work area can be viewed starting from the declaration in the framework program and lives as long as the framework program. In contrast to normal program-global data, the content of the table work areas declared in subroutines and function modules is stored temporarily when these subroutines and function modules are called. Value assignments that were made during runtime of the procedure are preserved until the procedure is completed. When exiting the procedure, the table work areas are filled with the contents that they contained when the procedure was called. Table work areas declared in procedures behave like global data to which the statement LOCAL is applied in the procedure.
    The form TABLES * is obsolete.

  • Using tables in another schema as source tables

    Let's say I have a schema called, say, FRED and FRED owns a table called CUSTOMERS.
    Now say for security reasons I cannot log in as FRED but I do have access to a user called READ_ONLY. READ_ONLY is granted SELECT privileges on CUSTOMERS (directly rather than through a role). So now I can log in as READ_ONLY and do a SELECT * FROM FRED.CUSTOMERS and it works. If I create a synonym then I can just do SELECT * FROM CUSTOMERS.
    My question is can OWB see this table if it is connecting as READ_ONLY? The table does not appear in the shuttle list of objects to capture under the Import Metadata wizard as it is not owned by READ_ONLY. Neither the select privs nor the synonym seem to enable me to get at the table definition. Is there any other way of getting at it? I can fudge it by creating a view but if I can get at the table itself then that would be the best answer as it removes a dependency for me.

    On the import wizard did you select the check box for using a synonym to look up objects? This should do what you want. Also you can use READ_ONLY as the authentication user and FRED as the schema as an alternative.
    Cheers
    David

  • How to use table maintenance view in module pool screen

    hi ,
    want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.

    You can simply call it via SM30.   Or you can call the table maintence view from any program(report or module pool) using a function module.
      call function 'VIEW_MAINTENANCE_CALL'
           exporting
                action                       = 'U'
                view_name                    = 'Z_Table_Name'
           exceptions
                client_reference             = 1
                foreign_lock                 = 2
                invalid_action               = 3
                no_clientindependent_auth    = 4
                no_database_function         = 5
                no_editor_function           = 6
                no_show_auth                 = 7
                no_tvdir_entry               = 8
                no_upd_auth                  = 9
                only_show_allowed            = 10
                system_failure               = 11
                unknown_field_in_dba_sellist = 12
                view_not_found               = 13
                others                       = 14.
    Regards,
    RIch Heilman

  • Derive found flag in SQL with where clause using TABLE(CAST function

    Dear All,
    Stored procedure listEmployees
    ==========================
    CREATE OR REPLACE TYPE STRING_ARRAY AS VARRAY(8000) OF VARCHAR2(15);
    empIdList STRING_ARRAY
    countriesList STRING_ARRAY
    SELECT EMP_ID, EMP_COUNTRY, EMP_NAME, FOUND_FLAG_
    FROM EMPLOYEE WHERE
    EMP_ID IN
    (SELECT * FROM TABLE(CAST(empIdList AS STRING_ARRAY))
    AND EMP_COUNTRY IN
    (SELECT * FROM TABLE(CAST(countriesList AS STRING_ARRAY))
    =================
    I have a stored procedure which lists the employees using above simple query.
    Here I am using table CAST function to find the list of employees in one go
    instead of looping through each and every employee
    Everything fine until requirements forced me to get the FOUND_FLAG as well.
    Now I wanted derive the FOUND_FLAG by using rownum, rowid, decode functions
    but I was not successful
    Can you please suggest if there is any intelligent way to say weather the
    row is found for given parameters in the where clause?
    If not I may have to loop through each set of empIdList, countriesList
    and find the values individually just to set a flag. In this approach I can’t use
    the TABLE CAST function which is efficient I suppose.
    Note that query STRING_ARRAY is an VARRAY. It is very big in size and this procedure
    suppose to handle large sets of data.
    Thanks In advance
    Regards
    Charan
    Edited by: kmcharan on 03-Dec-2009 09:55
    Edited by: kmcharan on 03-Dec-2009 09:55

    If your query returns results, you have found them... so your "FOUND" flag might be a constant,...

  • Using Table Control

    Hi Experts,
    I am working on module pool Program using " Table Control ".
    the below code is a part of program.
    "  Here i want insert new lines ( New values ). Please tell me that how to Do? "
    MODULE USER_COMMAND_0100 INPUT.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      CASE SAVE_OK.
        WHEN 'INSERT'.
       "  Here i want insert new lines ( New values ). Please tell me that how to Do? "
        WHEN 'TOGGLE'.
          LOOP AT EMPLOYE-COLS INTO COLS WHERE INDEX GT 2.
            IF  COLS-SCREEN-INPUT = '0'.
              COLS-SCREEN-INPUT = '1'.
            ELSEIF  COLS-SCREEN-INPUT = '1'.
              COLS-SCREEN-INPUT = '0'.
            ENDIF.
            MODIFY EMPLOYE-COLS FROM COLS INDEX SY-TABIX.
          ENDLOOP.
        WHEN 'DELETE'.
         READ TABLE EMPLOYE-COLS INTO COLS WITH KEY SCREEN-INPUT = '1'.
          IF SY-SUBRC = 0.
            LOOP AT ITAB INTO ZEMPLOYE WHERE EMPID = 'X'.
              DELETE ITAB.
            ENDLOOP.
          ENDIF.
      ENDCASE.
    ENDMODULE.   
    Its Urgent  
    Thank You.
    Basu

    Hi,
    WHEN 'INSERT'.
    " Here i want insert new lines ( New values ). Please tell me that how to Do? "
    <b>Append initial line to EMPLOYE.</b>
    Or
    Change the table control attribute for rows.
    Reward if helpful.

  • I prepare chronologies in word, and i am trying to do the same in pages using tables and cells. But somtimes i need a cell to wrap onto the next page but I can't work out how to do it - any suggestions would be greatly appreciated

    I prepare chronologies in word, and I am trying to do the same in pages using tables and cells. But sometimes I need a cell to wrap onto the next page because the contents are bigger than the page or the space left on the page,  but I can't work out how to do it - any suggestions would be greatly appreciated

    brendanfromsydney wrote:
    What are the different opinions on why pages should not achieve this?
    As far as I know, Apple is free to choose to offer this or that feature.
    They never said that they want to clone Word or even compete with it.
    Differences between tables in both worlds are numerous.
    In Pages (or Numbers)
    - we can't sort a single column
    - we can't sort by row
    - we can't insert or remove a single cell
    - a cell can't cross pages boundaries
    If I understand well these design choices match :
    ++-+-+-+-+-+-+-+-++
    Apple Human Interface Guidelines:
    Apply the 80 Percent Solution
    During the design process, if you discover problems with your product design, you might consider applying the 80 percent solution‚ that is, designing your software to meet the needs of at least 80 percent of your users. This type of design typically favors simpler, more elegant approaches to problems.
    If you try to design for the 20 percent of your target audience who are power users, your design may not be usable by the other 80 percent of users. Even though that smaller group of power users is likely to have good ideas for features, the majority of your user base may not think in the same way. Involving a broad range of users in your design process can help you find the 80 percent solution.
    +-+-+-+-+-+-+-+-+-++
    Yvan KOENIG (VALLAURIS, France) jeudi 9 juin 2011 16:03:52
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Order Query in SQ01 using Table Joins in CRM

    Hello Experts,
    I am trying to create a query using table joins in SQ01 in CRM because I need a report that will give me all transactions for a selected Business Partner.  I am unable to display any results when running my query.  I have found other threads which give a list of possible tables to join together, but the fields used in the joins were not described. 
    The tables I have joined in my query are as follows:
    CRMD_ORDERADM_H
    CRMD_ORDER_INDEX
    CRMD_PARTNER
    BUT_000
    I have used SE16 to try to search for additional tables to use for linking the Business Partner with a transaction, but I have been unsuccessful.
    Would anyone please give advice as how to proceed? 
    Reward points are available!
    Thank you in advance,
    David

    David
    The link with be the GUID.
    CRMD_ORDERADM_H = Document Header Table
    CRMD_ORDERADM_I = Document Line item Table
    CRMD_LINK = Lists various ‘link’ GUIDs, to
    access order Information
    The Table CRMD_ORDERADM_H will contain you transactions , once you find the GUID of your sales transaction in the table CRMD_ORDERADM_H.
    You then need to check the table CRMD_LINK.
    In this table you will then find a number in 11 = sales. This refers to the table CRMD_SALES. There are also links to many other tables ie Shipping, pricing, org etc.
    CRMM_BUT_SET0140 - for Sales Group, Sales Office, District
    CRMM_BUT_LNK0141 - for Sales Area data
    Transaction CRMD_BUS2000115 allows you to see all sales transactions for a BP. CRMD_BUS2000126 shows you activities for selected BP.
    Regards
    M

  • Custom Infotype - Using Table control in the screen.  IN OM

    Hi,
    I am having a requriement where in I need to create a custom infotype using table control in the screen. I have to create this in OM and I am using PPCI transaction to create the info type. I am able to create the infotype with fields but not table control. Please let me know if any one of you came across and help me with the process I need to follow.
    Thanks in advance.
    Venkat.

    Hello,
    After you create the info type throug PPCi, you can directly go to the Sceen module program created automatically while creating Info type and edit the screen.
    activate it after your changes.
    Regards,
    Srujan.

  • How can I use table control to enter data

    Hi all,
    I want to use table control to enter data, instead of using textboxes.
    So that the user can enter many data at once and just click the save button at the end of the work, only one click.
    How can I use the table control at this context?
    Thanks.
    Deniz.

    Hi deniz,
    go through it:
    /people/ravishankar.rajan/blog/2007/02/23/an-easier-way-of-displaying-and-editing-data-using-table-control
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/code%2bto%2bhandle%2bmultiple%2brecords%2bin%2bbdc%2btable%2bcontrol
    Regards,

  • How to use Table valued MSSQL  function in OBIEE

    Hi all,
    Can some one help me to understand how to use table valued function in OBIEE? I want to use a table valued function (MSSQL function, with some input parameter), in the physical layer to pull the data?
    I know for MSSQL Stored Procedure we can write as
    EXEC SP_NAME @Parameter = 'VLUEOF(NQ_SESSION.Variablename)'
    but now I have a table valued function in the query window I can get the data as
    select * from myfunction(parametervalue)
    In physical layer of OBIEE I have tried as
    select * from myfunction('VLUEOF(NQ_SESSION.Variablename)'), but I'm getting error as the NQ_SESSION variable doesn't have a value , but actually I have initialized the variable but still Im getting error.
    Can some one help me to solve this.
    Thanks,
    Mithun

    Follow this link and try yourself. let me know for issues
    Substring instr issue in obiee
    Appreciate if you mark
    Edited by: Srini VEERAVALLI on Feb 20, 2013 8:13 AM

Maybe you are looking for