Renaming a spatial table.

Hi,
I would like to hear any suggestions or best practice to do this.,
I have a oracle spatial 10g, we have a table (with 35m rows-sdo_geometry =>current_table) and a row in the user sdo geom metadata table.
We are planning to add new table (similar to the content of the current one). Since our java apps has reference to this current_table , we do not want to modify the java apps to point to the new_table.
We are planning to rename the current_table => as backup_table, and changes in the user sdo geom meta data table.
Similarly, rename the new_table as current_table, (with similar change in the user sdogeom metadata).
(the table do not have any other relationship with other table)
Whether this renaming is OK, or it will bring any other issue ? any thoughts
thanks,
vadivelan. p

Hi,
It is difficult to see what the second table contains but what you are suggesting will work. I do not know why you cannot amend the Java to look at the new table or any other similar table via some meta data.
I have one suggestion for my best practice which is that if it works and you understand it then that is best practice.
There are many ways to crack a nut.
Regards.
Ivan

Similar Messages

  • More than one SDO_GEOMETRY columns in one Oracle 8i spatial table

    I have a spatial table as follows:
    CREATE TABLE TEST(
    ID VARCHAR2(255) NOT NULL,
    POINT MDSYS.SDO_GEOMETRY,
    LINE MDSYS.SDO_GEOMETRY,
    POLYGON MDSYS.SDO_GEOMETRY,
    PRIMARY KEY(ID));
    Is it a good practice to have more than one SDO_GEOMETRY columns
    in one spatial table? What are the drawbacks if any to have a
    spatial with more than one layer?

    I have one question about more than one SDO_GEOMETRY columns
    in one table in Oracle 8.1.7. When I wanted to create two
    spatial indices for this table, every time I got some error.
    Can anyone tell me how to figure it out?
    Thanks very much,
    Fan Fan,
    You need to insert metadata record before creating spatial
    indices.
    Try the following:
    REM USER_SDO_GEOM_METADATA :
    REM insert a row for the geom layer for TEST TEST2 tables
    REM
    INSERT INTO USER_SDO_GEOM_METADATA
    ( TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
    VALUES ('TEST', 'POINT', MDSYS.SDO_DIM_ARRAY
    (MDSYS.SDO_DIM_ELEMENT('LON', -180,
    180, .000005),MDSYS.SDO_DIM_ELEMENT('LAT', -90, 90, .000005)),
    NULL);
    INSERT INTO USER_SDO_GEOM_METADATA
    ( TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
    VALUES ('TEST', 'LINE', MDSYS.SDO_DIM_ARRAY
    (MDSYS.SDO_DIM_ELEMENT('LON', -180,
    180, .000005),MDSYS.SDO_DIM_ELEMENT('LAT', -90, 90, .000005)),
    NULL);
    INSERT INTO USER_SDO_GEOM_METADATA
    ( TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
    VALUES ('TEST', 'POLYGON', MDSYS.SDO_DIM_ARRAY
    (MDSYS.SDO_DIM_ELEMENT('LON', -180,
    180, .000005),MDSYS.SDO_DIM_ELEMENT('LAT', -90, 90, .000005)),
    NULL);
    REM create a spatial index based on TRAFFIC.GEOM
    REM
    REM
    CREATE INDEX TEST_G_POINT_IDX ON TEST(POINT) INDEXTYPE IS
    MDSYS.SPATIAL_INDEX;
    CREATE INDEX TEST_G_LINE_IDX ON TEST(LINE) INDEXTYPE IS
    MDSYS.SPATIAL_INDEX;
    CREATE INDEX TEST_G_POLYGON_IDX ON TEST(POLYGON) INDEXTYPE IS
    MDSYS.SPATIAL_INDEX;

  • Error while updating spatial table

    Hi,
    When i try to update a spatial table with the following syntax i get the below error,
    UPDATE tab1 SET MP = 1, AT = 3,
    RDATE = TO_DATE('30:04:2001:16:04:08', 'DD:MM:YYYY:HH24:MI:SS'),
    ODATE = TO_DATE('30:12:1899:00:00:00', 'DD:MM:YYYY:HH24:MI:SS'),
    REP = 1
    WHERE ID = 7
    ERROR at line 1:
    ORA-29877: failed in the execution of the ODCIINDEXUPDATE routine
    ORA-00600: internal error code, arguments: [kcbgtcr_1], [], [], [], [], [],
    Any idea why is this happening??
    Thanks
    Shiva
    null

    Hi Dan,
    we are using oracle 8.1.6.3 on Solaris 8.
    Table description is as follows.
    ID NOT NULL NUMBER(10)
    ROUTE_NUMBER NOT NULL VARCHAR2(255)
    MP NUMBER(8,3)
    GEOM MDSYS.SDO_GEOMETRY
    AT NUMBER(10)
    RDATE DATE
    CDATE DATE
    ODATE DATE
    REPORT NUMBER(10)
    CLEAR NUMBER(10)
    OFFER NUMBER(10)
    X NUMBER(8,6)
    Y NUMBER(8,6)
    This table has a valid entry in the user_sdo_geom_metadata table. And the spatial index is valid.
    Thanks
    Shiva

  • Spatial tables in Data warehouse database or separate?

    Hi all,
    I have a question from a customer who's asking what the recommendation is of storage of the spatial tables and the warehouse tables.
    Should they reside on the same database for best performance or doesn't it matter where the spatial tables are located.
    Is there any official recommednation from Oracle on this?
    Best regards,
    Hakan

    Hi Hakan,
    it's not easy to give a quick answer here.
    a) you want to compare warehouse tables with spatial tables
    To answer this very well you should define what is a warehouse table and what is a spatial table. In this forum you will get for spatial tables the definition "A spatial table is a table with one or more columns of type SDO_GEOMETRY". How do you define a spatial table and how do you define a warehouse table?
    b) you ask for performance
    Performance is not depending only on table type. Performance is depending on a lot of steps. For example on the work which has to be done to answer the question, can data read from buffer cache or must they be read from physical devices, execution plan .....
    I don't know if there is a official statement from Oracle which is usefull to answer your query.
    Can you ask a little bit particular please?
    In my experience there it is not adviseable to store tables in different databases (instances) when I have to query it together. If you split the tables in different instances, the execution has much more overhead because you have to talk to 2 instances and it will very hard for the optimizer to find the best execution plan.
    Regards
    U. Martin

  • How to perform DML Operations on Spatial Table Using ADF

    Hi
    I have an urgent requirement. I have a table with Spatial column. I have generated Business components based on Spatial Table.
    Now I have to perform Create,Read,Update and Delete operations using ADF Business Components on Spatial Table.
    I have written custom create(),read(),update() and delete() methods in my Application Module and i have to implement those methods.
    Can any one help me out how to acheive above four functionalities using ADF Business Components.
    Thanks in Advance

    HI,
    see this example.
    u can do like this.
    DATA: BEGIN OF seats OCCURS 0,
            carrid   TYPE sflight-carrid,
            connid   TYPE sflight-connid,
            seatsocc TYPE sflight-seatsocc,
          END OF seats.
    DATA seats_tab LIKE HASHED TABLE OF seats
                   WITH UNIQUE KEY carrid connid with header line.
    SELECT carrid connid seatsocc
           FROM sflight
           INTO table seats.
    loop at seats.
      COLLECT seats INTO seats_tab.
    endloop.
    LOOP AT seats_tab.
    write:/ seats_tab-carrid,seats_tab-connid,seats_tab-seatsocc.
    ENDLOOP.
    rgds,
    bharat.

  • Creating spatial index on spatial table

    Hi there. Just a quick query on creating spatial indexes on spatial tables. I have a table called System_Sessions which has the following four fields and types:
    USER_ID NUMBER(10)
    SESSION_ID NUMBER(10)
    SESSION_BOUNDARY MDSYS.SDO_GEOMETRY (polygon)
    START_POINT MDSYS.SDO_GEOMETRY (point)
    I am inserting one row per user session into this table. I also need to retrieve the session ids of previous sessions involving a particular user based on the session's start point. The query i am running is an sdo_within_distance query which looks as follows:
    Select session_id from joeweaker.system_sessions where user_id = 1003 and SDO_WITHIN_DISTANCE(start_point,
    (MDSYS.SDO_GEOMETRY(2001, 8265, MDSYS.SDO_POINT_TYPE
    (-105.0,40.0, NULL),NULL, NULL)), 'DISTANCE = 10000')='TRUE';
    However I encounter the following error whenever I attempt to execute this query:
    ORA-13226: interface not supported without a spatial index
    ORA-06512: at "MDSYS.MD", line 1723
    ORA-06512: at "MDSYS.MDERR", line 8
    ORA-06512: at "MDSYS.SDO_3GL", line 255
    I know I haven't built the spatial index on the table so I was hoping that somebody might show me how to do this. Thnaks a lot, Joe

    Thnaks a lot Dan for the prompt reply. I have done as you advised and everything appears to be fine. However I have a second table called Session_Interest_Areas which appears as follows:
    USER_ID----NUMBER(10)
    SESSION_ID----NUMBER(10)
    AREA_ID----NUMBER(10)
    AREA_BOUNDARY----MDSYS.SDO_GEOMETRY
    I inserted the necessary detail into the user_sdo_geom_metadata table and then attempted to create the index as follows (exactly the same format as my other spatial tables:
    create index session_interest_areas_idx on
    session_interest_areas (area_boundary)
    indextype is mdsys.spatial_index;
    When I execute this query I get the following stream of error messages:
    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 spatial index: [mdrcrtxfergm]
    ORA-13249: Error in spatial index: [mdpridxtxfergm]
    ORA-13200: internal error [ROWID:AAAHocAAJAAAAC8AAA] in spatial indexing.
    ORA-13206: internal error [] while creating the spatial index
    ORA-13373: Element of type Extent is not supported for Geodetic data
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    Why does this give me an error when the same approach worked fine for my other spatial tables? Is it something to do with the SRID? Also the index appears to have been created so I presume it has been created incorrectly. Thanks for your time, Joe

  • SQL plus and  Spatial tables

    I have some spatial tables in 10g. I can use 'select query' on non spatial attributes but if try
    select * or
    select geom then my SQL plus gives error ::
    Program Error - sqlplusw.exe has generated errors and will be closed by Windows. You will need to restart the program. An error log is being created.
    <Cancel>
    But I am able to use isqlplus without any errors.
    Earlier SQL plus used to work fine. I don't understand what happened to it in between.
    How can I bring my SQL plus working again.

    I created a copy for a spatial table using.
    create table copy as select * from original, and it was successful .
    Other than that I haven't done anything other than select queries.

  • Does CDC work on spatial tables?

    I'm trying to prototype using change data capture on some spatial tables. I'm able to create the cdc tables and subsribe, etc. with no errors. But when I go to try and update a record in my spatial table I keep getting the following errors:
    ERROR at line 1:
    ORA-31495: error in synchronous change table on "FULL"."GEONAME_FEATURE"
    ORA-01733: virtual column not allowed here
    My non-spatial tables that I set up the same way work fine for updates and inserts.
    The spatial CDC table and the base spatial table look the same. Is there something about Spatial that prohibits it from being used with change data capture?

    This might be related to bug 3561140 - we are working with the appropriate folks in Oracle to try to resolve it. If you can post your view definition then we can try to ensure this is fixed at the same time (a small test case would be appreciated).

  • Spatial Tables and Remote Queries

    Hi Experts,
    Can anyone explain me when and where to use Spatial Tables and Remote Queries with some examples.
    Thanks in advance.

    Hi,
    there are some nice demos from Andrejus:
    http://andrejusb.blogspot.com/search/label/Spatial
    Hope it helps,
    Friedhold

  • Can I rename a exisiting table name ???

    Dear All,
    Can I rename a exisiting table name ???.
    Thanks You!!
    Regards
    Venkat

    u cannot rename a table. only you can copy the table you want to one with a name of your wish.
    go to se11.
       enter the table name(source)
           press (control+F5)
    enter the target table name.
    regards,
    srinivas
    <b>*reward points for useful answers*</b>

  • Bug driver 10g on Spatial tables with MapX

    I have migrated from 9i to 10g with spatial tables.
    I have the message "Error creating buffer" when I call the function SearchWithinDistance of MapX5, in VB6.
    The function works properly with database 9i or database 10g and driver 9 but gives the error with database 9i or database 10g and driver version 10. All other functions work well...
    Anyone can help ? Thanks

    Hi David,
    I had never heard of this bug before. Hopefully this info regarding a workaround will be what you need:
    This problem affects any REF or ADT ("user-defined" types) with NOT NULL.
    The workaround is to drop the NOT NULL constraint before exporting and adding it after importing.

  • Clone oracle spatial tables

    i want to clone spatial tables from database 11g r2 to another one ?
    i exported tables of my user using toad
    export ---> export utility wizard ---> export tables--> select all tables from my User
    and i imported it into my new User in new DB
    but the styles, themes, base map & tile layer not found when i opened mapbuilder
    also the view "USER_SDO_THEMES" is empty
    i tried to export all database from my old machine and import it into my new machine by toad export ---> export utility wizard ---> export this DataBase
    but i couldn't import it into my new machine as the oracle home was changed at new machine
    I need urgent help
    any help in resolving this would be greatly appreciated.
    thanks.

    MapViewer related questions are best posted on the MapViewer forum:
    MapViewer
    Have a look at this blog for an answer to your question:
    http://oracle-maps.blogspot.com/2009/04/how-to-exportimport-themes-styles-maps.html

  • Access attributes for a non spatial table from mapViewer JavaScript API

    I have a non spatial table that contains bridge attributes that are identified by a unique bridge number. There is a spatial table containing the bridge location and bridge no. I have tried to add both tables as a JDBC theme but there is no attribute data:
    var baseQuery="select b.obj, b.bridge_no, b.travel_direction_code, cway_code "+
    ", m.design_load_code DESIGN_LOAD "+
    " from bridge b LEFT OUTER JOIN BRIDGE_MISCELLANEOUS m on b.id= m.bridge_id where b.road_no ='" + roadNo+"'";
    var theme = '<themes><theme name="JDBC_THEME_BRIDGE" >' +
    '<jdbc_query ' +
    'datasource="wms" '+
    'jdbc_srid="28355" ' +
    'spatial_column="obj" '+
    'asis="true" ' +
    'render_style="M.BRIDGE_BW">' + baseQuery +
    '</jdbc_query></theme></themes>' ;
    bridgeTheme = new MVThemeBasedFOI('bridgeTheme1',theme);
    This displays the bridges ok but there is no attribute data it seems like the query only returns the spatial object. Is there another way to access the attributes?

    add the hidden_info tag to the theme def as in:
    var theme = "<theme name='JDBC_THEME' fetch_size='200'>" +
    "<jdbc_query spatial_column='geom' jdbc_srid='8307' " +
    "render_style='m.star' datasource='mvdemo'>select geom, id, name from test_points" +
    "<hidden_info>"+
    " <field column=\"NAME\" name=\"My name\"/>"+
    " <field column=\"ID\" />"+
    "</hidden_info>"+
    "</jdbc_query></theme>" ;

  • Location of spatial tables and warehouse tables - recommendations

    Hi all,
    I have a question from a customer who's asking what the recommendation is of storage of the spatial tables and the warehouse tables.
    Should they reside on the same database for best performance or doesn't it matter where the spatial tables are located.
    Is there any official recommednation from Oracle on this?
    Best regards,
    Hakan

    Hello Mohan ,
    Table TOBJ store the authorization data in R/3 System .
    For further info refer thread :
    What does TOBJ table contain??
    Regards ,
    Santosh

  • Unloading spatial tables

    What is the easiest, most foolproof way of unloading (exporting) spatial tables?
    The goal is to export the table, indices and any other related and required objects so this can be imported into a completely different instance of Oracle.

    Thanks for the reply, Dan.
    We have hired a contractor to work on an editing application for us, so we needed to send them our tables. They claimed that they needed an export of the MDSYS schema, which we have discovered cannot be exported. I did not think they needed an export of MDSYS, and this information verifies this claim.
    R Clement
    Alaska Department of Natural Resources
    To view a very fast Internet Map Service based on Oracle Spatial, see:
    http://mapper.landrecords.info

Maybe you are looking for