(ORA-00955) conflict of naming for index and constraint when you use a unique index (.. desc,.. CSA)

Hello

indexes and constraints are in different namespaces, so it should be possible to give them the same name.

In the following case that apparently does not work:

create unique index orders_year_show_uq
  on orders (year desc, show_orders asc);
 
 alter table orders
  add constraint orders_year_show_uq unique (year, show_order);

When I run these statement, I get a "SQL Error: ORA-00955: name is already used by an existing object". ""

If I clean and I execute the same instructions as above with the only difference on the 2 line, using "asc year" instead of "year desc":


  on orders (year asc, show_orders asc);

then it success.

I can't explain it, you have an idea?

Thanks in advance.

Kind regards

Giovanni

First of all, you have show_orders in index and show_order in the constraint. I'll assume that it's a typo. Second, when you create constraint without index enhance the specification Oracle seeks indexes existing on the same set of columns in ascending order. If this index does not exist (and it's your case, since one of your columns to index is in descending order), Oracle tries to create one with the same name as the constraint. That's why you get ORA-00955: name is already used by an existing object. In general, you can specify explicitly the index name to force the Oracle by using the existing index. But it will not help you. If you issue

ALTER table orders add unique constraint (year, show_orders) orders_year_show_uq using index orders_year_show_uq;

You will get the ORA-14196: specified index cannot be used to apply the constraint.

In any case, Oracle does not support using index DESC for PK/UK.

SY.

Tags: Database

Similar Questions

  • Lock on some of my icons, as well on my desktop and visible when you use Windows Explorer.

    I have these small yellow or gold (according to the colors of your screen) padlock superimposed on some of my icons on my desktop and visible when you use Windows Explorer and would would like to know how what they are, and how I can remove them.

    Hi Will,

    Thank you for keeping us posted.

    Glad to know that the problem has been resolved.

    I appreciate all your efforts really to try to solve this problem.

    Please do not hesitate to answer, in the case where you are facing in the future other problems with Windows.

    We will be happy to help you.

    Thank you.

  • How can I configure Messenger to record my conversations, record them and send them to a location I can read and save when you use Messenger on other computers than mine?

    How can I configure Messenger to record my conversations, record them and send them to a location I can read and save when you use Messenger on other computers than mine?

    original title: Live Messenger

    Hi Nicoliani,

    To start saving your Conversations in Windows Live Messenger

    1. connect to your window Live Messenger and click on 'Tools' or click on your display name.

    2. scroll down to "Options", a window should appear. When he does very well and click on "Messages".

    3. locate "historical Message". After that, check the box that says, "automatically keep a history of my conversations.

    4. below that you will see "save my conversations in this folder."

    5. to side of her you will see change, make sure that it is a file that you can access and watch later.

    6. If you are on a network, you can save it in a directory which you have access, or you can save it to a location and later mailed to yourself and access it later.

    Where chats are saved is given below.

    1. to access the Conversations go to the start bar and click My Documents. Then click on "my received files."

    2. There should be a folder with your name on it. Click the folder, then you will be in another folder called history. Continue

    3. by clicking on the folder, now you should see all your saved conversations.

    Hope this information is useful.

    Amrita M

    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • DB restoration and recovery when you use followed the change block

    Does anyone know of a document that explains the restoration of the database and recovery when you use the block and the incremental backups the track changes? I understand how to turn the OTC market, and how it can shorten the time to do an incremental backup. I need advice when choosing the frequency of backups of 1-0 and level level and how it affects my food options. I also need to decide if the level 1 backups update the copy of most recent data on the disk file.

    If the copy of the data on disk file is updated by each level 01:00 am I right to say that I can restore to point in time that this moment occurs after level 1 has been taken? If so, then maybe I don't have level 1 update the copy of the data file on disk. If I take a level 0 Sunday and daily level 1 Monday - Saturday, so I think I can restore to any point in time after the 0 level.

    A lot of documentation explains my backup options, but there is less material tell how my backup choice affects my food options.


    Thank you
    Bill

    BCT applies to backups only, there is no connection with the restoration.
    I think you are confused about the difference between

    (1) incremental of backups
    and
    (2) "normal incremental backups".

    In the first case (see http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmbckba.htm#CHDEHBFF), in the base implementation because an incremental backup is applied to a still image copies and you cannot go back to an earlier point in time – before the changes applied.

    'Normal' incremental backups are done after a full backup (level 0), you can return to the level 0 backup earlier.
    RMAN follows rules of detention, in the basic version of an incremental backup that is updated, you have a retention of redundancy policy 1. This means that a full backup (image of copies, which are updated by the incremental backups again and again) is available.
    Backup incremental 'Normal' in most cases after a few days recovery windows - a time window.

    Werner

  • Questions about privacy and security when you use Safari for Windows

    I have Itunes + Quick Time Player installed to download music and some time ago I had the opportunity to download Safari for Windows.  I used it a few times, just out of curiosity, and I noticed that it is much faster than IE7, so I plan to use it regularly, but before that, I have a few questions:

    -someone at - it tested (or uses) Safari for Windows, and what are your results?

    -What is save to use as Firefox or Opera, both recommended as alternative by our experts at the HijackThis forum?

    -the programs that I installed (Online Armor firewall, AVG 8.0 suite, MBAM with protection in real time enabled RogueRemover Pro with immune protection enabled, WinPatrol, SpywareBlaster) offer the same protection when you use Safari for browsing?

    Thanks a lot already for your answers, Advisor or thoughts on this issue.

    Mona.

    Inspiron 1501

    Win XP - SP3

    Message edited by mona7865 on 08/07/2008 06:19

  • ORA-13000: number of dimensions is out of reach when you use SDO_GEOM. RELATE

    Dear everybody

    I try to drive what polygons covering the same area to determine separate polygons. This is so I can then have a copy of a polygon in a new table and delete all the polygons in doubles in the current table.

    I ran as follows everything first to check something:
    SELECT SDO_GEOM.RELATE
       (A.geographical_coordinates,
        'DETERMINE',
        B.geographical_coordinates,
        0.05) relationship
     FROM MAP_INDEX A,
          MAP_INDEX B
    where A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL;
    but I got the error message:
    Error starting at line 1 in command:
    SELECT DISTINCT A.mi_prinx,
    SDO_GEOM.RELATE
       (A.geographical_coordinates,
        'EQUAL',
        B.geographical_coordinates,
        0.05)
     FROM MAP_INDEX A,
          MAP_INDEX B
    where A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL
    Error report:
    SQL Error: ORA-13000: dimension number is out of range
    ORA-06512: at "MDSYS.SDO_GEOM", line 70
    ORA-06512: at "MDSYS.SDO_GEOM", line 2647
    13000. 00000 -  "dimension number is out of range"
    *Cause:    The specified dimension is either smaller than 1 or greater than
               the number of dimensions encoded in the HHCODE.
    *Action:   Make sure that the dimension number is between 1 and the maximum
               number of dimensions encoded in the HHCODE.
    Then, I tried the following:
    SELECT DISTINCT A.mi_prinx,
    SDO_GEOM.RELATE
       (A.geographical_coordinates,
        'EQUAL',
        B.geographical_coordinates,
        0.05)
     FROM MAP_INDEX A,
          MAP_INDEX B
    where A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL
    which produces the following error message:
    Error starting at line 1 in command:
    SELECT 
    SDO_GEOM.RELATE
    (A.geographical_coordinates,
     'EQUAL',
     B.geographical_coordinates,
     0.05) relationship
      FROM MAP_INDEX A,
           MAP_INDEX B
    Error report:
    SQL Error: ORA-13050: unable to construct spatial object
    ORA-06512: at "MDSYS.SDO_3GL", line 4
    ORA-06512: at "MDSYS.MD2", line 771
    ORA-06512: at "MDSYS.SDO_GEOM", line 2622
    ORA-06512: at "MDSYS.SDO_GEOM", line 2649
    13050. 00000 -  "unable to construct spatial object"
    *Cause:    This is an internal error.
    *Action:   Contact Oracle Support Services.
    Does anyone have an idea as to what I might hurt? The original polygons have been created in MapInfo Professional 8 and I work at 10.2 g

    I think that Imust be something wrong. I looked in SDO_GEOM_VALIDATE but once again produce the same error as the first message. I already created a spatial index and inserted values in USER_SDO_GEOM_METADATA view.

    I was able to get the following to work, I was testing the examples online just to see if I could produce a result on an sdo function:
     SELECT NAME_OF_FEATURE, SDO_GEOM.SDO_AREA(GEOGRAPHICAL_COORDINATES,M.DIMINFO)
    FROM MAP_INDEX, user_sdo_geom_metadata M
    WHERE M.TABLE_NAME='MAP_INDEX' AND M.COLUMN_NAME='GEOGRAPHICAL_COORDINATES'
    AND geographical_coordinates is not null;
    When I drew my polygons in MapInfo, they are likely to be gone in part outside the dimension values inserted in USER_SDO_GEOM_METADATA limit. Who is likely to be the cause of my problems or something else?

    If this is the cause, is far from Oracle or MapInfo installation so that anything drawn outside the area of the dimension is cut off.

    Kind regards

    Tim

    Hi Tim,.

    Since Oracle Oracle 8.1.6 suggested the use of 4-digit SDO_GTYPE values, which encode the number of dimensions in geometry. Examples of 4-digit SDO_GTYPES 2001 for one point 2D, 3001 for a 3D point, 2002 for a 2D linestring, 3002 for 3D linestring, 2003 for a 2D polygon and 3003 for a 3D polygon... Compare these values to a single digit from 1 to a point, a linestring 2 and 3 for a polygon.

    My guess is that at least some of your data is loaded using SDO_GTYPE values to a single digit, and service Oracle does not know the dimensionality of the data (is a peak identified by 2, 3 or 4 numbers?). You can check this by a:

    Select distinct a.geographical_coordinates.sdo_gtype from MAP_INDEX;

    If all of the values returned are single-digit values, then you know that's the problem.

    You have a few options.

    You can have Oracle automatically correct data migration data:
    execute sdo_migrate.to_current ('MAP_INDEX', 'GEOGRAPHICAL_COORDINATES');

    This will not define only the SDO_GTYPE properly but will fix also to any ring rotation problems (ensures the outer rings is stored in the anti-clockwise and the inner rings is stored in a clockwise direction), it will set the control problems ring (ensure an outside ring is followed by its inner rings) and it will be appropiately set of values in the SDO_ELEM_INFO_ARRAY.

    After that, you should be good to go. However, if you use a tool to update the data, and it resets the information back, the problem will continue to torment you. You should check with your provider if this is the case.

    Another option is to modify the query for a different signature, which uses the SDO_GEOM_METADATA to get the dimensionality of the data. Rather than write the query that you have, you want to change it to:

    SELECT SDO_GEOM. RELATE
    (A.geographical_coordinates,
    C.DIMINFO,
    "DETERMINE."
    B.geographical_coordinates,
    Relationship C.DIMINFO)
    OF MAP_INDEX,.
    B MAP_INDEX,
    C USER_SDO_GEOM_METADATA
    WHERE A.geographical_coordinates is not NULL
    and B.geographical_coordinates is not NULL
    and C.TABLE_NAME = 'MAP_INDEX'
    and C.COLUMN_NAME = 'GEOGRAPHICAL_COORDINATES';

    So either of those who should solve the problem, you see, but none of those who are the best way to accomplish what you want to do.

    If I were you, I would follow the first set of directions (migrate your data), make sure that I have a spatial index on my table:
    Select index_name
    of user_sdo_index_info
    where table_name = 'MAP_INDEX ';

    If no row is returned, create the index:
    create index MAP_INDEX_SIDX on MAP_INDEX (GEOGRAPHICAL_COORDINATES)
    indexType is mdsys.spatial_index;

    You can use SDO_JOIN to perform a self-join:
    http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28400/sdo_operat.htm#BGEDJIBF
    using the SAME mask. Note the section on optimization of self-joins.

    If you don't have too much data, it could be a start to do what you want:

    create the table dups_rowids as
    Select / * + ordered * / a.rowid rowid1, b.rowid rowid2
    MAP_INDEX a,.
    MAP_INDEX B
    where (a.geographical_coordinates, b.geographical_coordinates) SDO_EQUALS = 'TRUE'
    and a.rowid <> b.rowid.

    create table nodup_rowid (noduprid VARCHAR2 (24));
    create table dup_rowid (duprid VARCHAR2 (24));

    Set serveroutput on;
    declare
    Modou varchar2 (24);
    rowidb varchar2 (24);
    rowidt varchar2 (24);
    is of type Ref cursor myCursor;
    acursor myCursor;
    cursor c1 is select rowid1, rowid2 from dups_rowids;
    Start
    for r c1 loop
    Modou: = r.rowid1;
    rowidb: = r.rowid2;
    rowidt: = NULL;

    Open acursor for ' select duprid in the dup_rowid where duprid =: modou ' using modou;
    extract the acursor in rowidt;
    If rowidt is null
    then
    immediately execute "insert into nodup_rowid values (: modou)" using modou;
    immediately execute "insert into dup_rowid values (: modou)" using modou;
    run immediately "committed."
    end if;
    close acursor;
    rowidt: = NULL;

    Open acursor for ' select duprid in the dup_rowid where duprid =: rowidb' using rowidb;
    extract the acursor in rowidt;
    If rowidt is null
    then
    run immediately ' insert into dup_rowid values (: rowidb) "using rowidb;
    run immediately "committed."
    end if;
    close acursor;
    end loop;
    end;
    /

    Your final table would then have the geometries of the original table, which had no match:

    create the table MAP_INDEX_NODUPS
    in select * from MAP_INDEX where rownum<>

    insert into MAP_INDEX_NODUPS
    (select *)
    of MAP_INDEX
    where ROWID not in
    (by selecting ROWID1 in DUPS_ROWIDS)) ;

    more alone geometries that were equal:
    insert into MAP_INDEX_NODUPS
    (select *)
    of MAP_INDEX
    where ROWID in
    (by selecting ROWID1 in NODUP_ROWID);

    I hope this helps.

  • Set connection error not reliable for a secure site when you use a standard account in Vista, but not administrator.

    I am trying to log on to the EZ Pass New York site, but I get this error of no reliable connection for the last days. More precisely, it is say no issuer channel was provided with the error code: sec_error_unknown_issuer. Previously, it worked fine. This only happens with the standard user accounts in Windows Vista for Firefox. It doesn't happen when I use the account administrator or IE on each account. What is happening and how to fix it? Appreciate any help you can offer.

    He himself seems to have resolved now. Beats me why.

  • Complete blocking of the PC that requires a difficult start to recover when you use Assistant scanner and camera when you use a peer-to-peer on a USB port connection.

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Hello Cavman35,

    Thank you for your message.  Please provide comments to a few questions so that we can better help you get this issue resolved.
    This happens every time that you use/start the Scanner Wizard and camera?  If not, is there something that seems to be in common whenever it 'hangs '?
    Have you ever been able to transfer data using this connection, or is this a new phenomenon?
    Has anything changed since you started facing this problem?  To include hardware, software or update change.
    In the meantime, you can try a clean boot in order to eliminate the possibility of a 3rd party applications interfere with the transfer.  Click HERE for instructions to boot.
    We can't wait to hear back on your part.
    See you soon

    Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • How to escape the quotes and commas when you use the command of the coil

    I am creating a file .cvs with data in my database. I call the function of coil and below select stmt

    ' Select ' ' ' | ID | '","' || name | '","' || Description | '","'

    I want everything to be separated by quotes and commas. Description data can have quotes and commas so how I get away from them in my queue code so that when I use SQL Loader data will get entries in the database correctly.

    Thank you!

    Hello

    If the field is closed, so there is nothing else you need to do for the column separator (en).

    To use the character encompassing ("") in the field, double it, the same way you use two single quotation marks to signify a single_quote into a SQL string literal:
    {code}
    ' SELECT ' ' ' | ID
    ||     '","'     || name
    ||     '","'     || REPLACE (description
    , '"'
    , '""'
    )
    ||     '"'
    FROM table_x;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    
  • Cannot use 'alt - n' for 'next' shortcut key when you use 'ctrl-f' to the search page.

    From the update to Firefox 25.0 'alt - n' and 'alt - p' shortcut keys no longer work when you navigate to a page with "ctrl-f". Is it possible to get these to work, or are there new keyboard shortcuts?

    Hello kilereren, here you will find all the shortcuts to search: https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly#w_search

  • Purple and black when you use any program, laptop is very slow

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas: my screen goes black purple and green when I open a program, that is to say when I go online a special writing of Web sites will be in purple, black and green? HO to fix this?

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Maybe your graphics card is damaged. You have another card to test? "A programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/

  • Photoshop Elements 5 freezes and restarts when you use Vista

    I have a little problem with Photoshop Elements 5. When I first start the program and click on 'File' system crashes. If I wait about 30 or 40 seconds, it retrieves all and then when to work them again together is very good. It's really very annoying when you start the program, and if someone else has had this problem and knows a difficulty, I would be very grateful.

    Already tried: -.

    Uninstalling and reinstalling

    Repair installation

    Unchecking Adobe Active File Monitor V5

    None of them worked. The problem seems to be related to the performance of Vista, everything worked fine on my old XP machine.

    Now, I use an Acer Aspire 5536 with Windows Vista installed as the operating system.

    Please make sure that you have installed the PES 5.0.2 patch

  • How to set the user name and password when you use the class for SOCKS5 Proxy?

    Hi all

    I use the proxy class for SOCKS5, so need to set the user name and password, I can't find where I put the value. If the API support.

    Thanks in advance!

    Exactly how to repeat the question five times ater, we told you the answer would erase anything? A: this isn't. This irritates just the hell out of people. Irritating the hell of those who's trying to help you is not rational behavior either.

    I have no idea on the support of third-party for transmission by proxy via NIO.

  • Configuration for VM cloning sysprep when you use vCenter device

    Hello

    According to the manual - and the ViewPlanner UI, for the layout section, we need to specify the location of the generated sysprep configuration.

    How is this work if we use the vCenter 'Linux' system device.  I copied the binaries of Microsoft sysprep for the/etc/vmware-vpx/sysprep/xp to the appropriate location in the path of the device.  But, these are the Windows binaries and I can't run myself on the Linux-based system to build the configuration.

    How can we on the subject in this case?  The layout makes UI * no * allow us to move forward if the sysprep is not specified.  Perhaps, there might be an option to move forward and make the command sysprep "manually" once clones are created?

    Thank you

    Vinod

    I don't think that you must copy sysprep for the device files, it should already be there.

    You must create a user of VC interface customization specification, not in the camera. In the user guide to see Planner, there are steps on how to do it. I also found another reference:

    http://pubs.VMware.com/vSphere-4-ESX-vCenter/index.jsp#deploy_vms_from_templates_and_clones/t_create_a_customization_specification_for_windows.html

  • Firefox will freeze and crash when you use google from the google Web site search

    Every time I use google, which is often because it is my home page, unless the thing I want to look for is the first couple of auto-recherches that appear when I type, automatic search stops and if I press enter or click the search icon that Firefox crashes and I have to stop it, and then try again. However, I have no problem when I try with Firefox in private browsing.

    -> Cache and delete Cookies

    -> Clear Cache network

    -> Reload webpages and ignore the cache.

    • Hold SHIFT and click reload.
    • Press 'Ctrl + F5' or 'Ctrl + Shift + R' (Windows, Linux)
    • Press 'Cmd + Shift + R' (MAC)

    Check and tell if its working.

Maybe you are looking for