Oracle 11g: problem with disable primary key

Hello
I have this problem:

I performed "EXECUTE IMMEDIATE"ALTER TABLE your table of KEY PRIMARY DISABLE";"

This operation returns an error
but when I did 'insert into table... ". »... Oracle returned ora-0001.

The operations are in the same stored procedure, so in the same session.

Database: Oracle 11.2.0.2

How is that possible?
All solutions?

Thanks in advance.

Best regards.
Alessandro Zenoni

Try to add 'DROP INDEX' to your disable command.

not tested

alter table xy disable primary key drop index

Tags: Database

Similar Questions

  • Problem with the primary key and indexes

    Hi all

    I'm looking a mess on one of our main tables.
    One of the developers here added an index on 3 columns in the table, thinking that it would speed up (not noticing that it had not a PK).

    Subsequently another developer has noticed there do not have a primary on key. So they added a touch of primry on the single column.

    The problem is that now the index created on 3 columns is bein used as the primary key index. As when the primary key is created a new index was not created.

    Is there anyway to get rid of this index/change it correct?

    This table is related to many many other tables, so when we tried to remove the index we could not due to the primary key and foreign key violations with other tables.

    Thanks in advance

    Oracle, as you found, is quite capable to use a column enformce multi index a single column primary key, as long as the pk column is the leader in the index. This should not cause performance issues for a search of PK and if the three indexed columns are often selected only may benefit from these types of queries.

    The only way to change that now, would be to drop all CF, drop and add the PK constraint and then add all the FK constraints. A long time and potentially dangerous (if you miss to add back of the FKs) endeavour. Certainly not worth the risk in my opinion.

    John

  • Problems with the primary key of the query string

    Moving from asp to php, to work with David Power's book: The Essential Guide to Dreamweaver CS4 with CSS, AJAX, and PHP.  Recycling of my brain, so starting from scratch in the learning process.

    Everything was going perfectly until I tried to add the primary key of a record in a query string.  I compared my code with the example code for the book, and everything matches.  When previewing the page in my browser and hover over the link which must pass the main code on the next page, the query string does not appear correctly.  It shows user_id = but no figure shows, as it is supposed to.  www.webpage.com/update_user.php?user_id=

    Here is my code: (Please note, <>have been removed, as I was unable to find a way view the code in the correct way here (copy/paste was doesn't work do not, nor insert syntax))

    ? PHP {?}

    ? PHP echo $row_listUser ['family_name'];? PHP echo $row_listUser ["FirstName"];?

    ? PHP echo $row_listUser ['username'];?       ? PHP echo $row_listUser ["admin_priv"];?

    a href = "update_user.php? user_id =? php echo $row_listUser ['user_id'];?" "Edit / has

    a href = "delete_user.php? user_id =? php echo $row_listUser ['user_id'];?" ' Delete / has

    ? PHP} while ($row_listUser = mysql_fetch_assoc ($listUser));?

    Any ideas that could help me understand why this part does not in particular would be greatly appreciated.  Writing to the database worked perfectly, I see that there are numbers in the database as user_id, and it is defined as my primary key in the configuration database.  Such a simple process that is causing me headaches!

    Thank you

    You have the code to request a copy in your folder:

    $query_listUser = 'SELECT user_id, username, first_name, family_name, admin_priv from users ORDER BY family_name ASC';

    $listUser = mysql_query ($query_listUser, $connSCFDIR) or die (mysql_error ());

    $row_listUser = mysql_fetch_assoc ($listUser);

    $totalRows_listUser = mysql_num_rows ($listUser);

    $query_listUser = 'SELECT username, first_name, family_name, admin_priv from users ORDER BY family_name ASC';

    $listUser = mysql_query ($query_listUser, $connSCFDIR) or die (mysql_error ());

    $row_listUser = mysql_fetch_assoc ($listUser);

    The $listUser table will contain the results of the second query, which does not include the field user_id. delete the redundant code.

  • Problem with the primary key

    Hi all
    I have a table with the same data repeat 2 times. I mean that the lines are depating twice. so now, I create a primary key for the table. He throws me an error saying voilation key primary. I'll give you the clear script.

    create table employee)
    ID VARCHAR2 (4 BYTE) NOT NULL,
    First name VARCHAR2 (10 BYTE),
    VARCHAR2 (10 BYTE) last_name,
    START_DATE DATE,
    End_date DATE,
    Number (8.2) of salary.
    City VARCHAR2 (10 BYTE),
    Description VARCHAR2 (15 BYTE)
    )


    insert into employee values ('01', 'Jason', 'Martin', to_date('19960725','YYYYMMDD'), to_date('20060725','YYYYMMDD'), 1234.56, 'Toronto', 'Program');
    insert into employee values ('02', "Alison", "Mathews', to_date('19760321','YYYYMMDD'), to_date('19860221','YYYYMMDD'), 6661.78, 'Vancouver', 'Tester');
    insert into employee values ('03', 'James', 'Smith', to_date('19781212','YYYYMMDD'), to_date('19900315','YYYYMMDD'), 6544.78, 'Vancouver', 'Tester');
    insert into employee values ('04', 'Celia', 'Rice', to_date('19821024','YYYYMMDD'), to_date('19990421','YYYYMMDD'), 2344.78, "Vancouver", "Manager");
    insert into employee values ('05', 'Robert', 'Black', to_date('19840115','YYYYMMDD'), to_date('19980808','YYYYMMDD'), 2334.78, 'Vancouver', 'Tester');
    insert into employee values ('07', 'David', 'Larry', to_date('19901231','YYYYMMDD'), to_date('19980212','YYYYMMDD'), 7897.78, 'New York', 'Manager');
    insert into employee values ('06', 'Linda', 'Green', to_date('19870730','YYYYMMDD'), to_date('19960104','YYYYMMDD'), 4322.78, 'New York', 'Tester');
    insert into employee values ('08', 'James', 'Cat', to_date('19960917','YYYYMMDD'), to_date('20020415','YYYYMMDD'), 1232.78, 'Vancouver', 'Tester')
    insert into employee values ('07', 'David', 'Larry', to_date('19901231','YYYYMMDD'), to_date('19980212','YYYYMMDD'), 7897.78, 'New York', 'Manager');
    insert into employee values ('06', 'Linda', 'Green', to_date('19870730','YYYYMMDD'), to_date('19960104','YYYYMMDD'), 4322.78, 'New York', 'Tester');


    The table is now with 10 columns

    ID FIRST_NAME LAST_NAME START_DAT END_DATE SALARY CITY DESCRIPTION
    ---- ---------- ---------- --------- --------- ---------- ---------- ---------------
    Jason Martin 25 July 96 01 25 July 06 1234.56 Toronto programmer
    02 Alison Mathews 21 March 76 February 21, 86 6661.78 Vancouver Tester
    03 James Smith December 12, 78 March 15, 90 6544.78 Vancouver Tester
    04 Celia rice 24 October 82 21 April 99 2344.78 Vancouver Manager
    Robert Black 05 January 15, 84 8 August 98 2334.78 Vancouver Tester
    Linda Green 06 July 30, 87 January 4, 96 4322.78 tester of New York
    Manager of New York 07 David Larry 31 December 90 February 12, 98 7897.78
    08 James Cat 17-AUG-96 April 15 02 1232.78 ester of Vancouver


    Create a primary key for the table

    "Employee to ALTER TABLE PRIMARY KEY (ID, First_Name, Last_Name, start_date, end_date,
    Salary, city, Description); »

    I get error voilation primary key

    IS IT POSSIBLE TO CREATE THE KEY PRIMARY ON THE TABLE WITH ON THE DELETION OF THE DATA?
    Is IT POSSIBLE CREATING PRIMARY KEY USING 'GROUP BY' FUNCTION or OTHER FUNCTIONS?

    Published by: user11872870 on September 23, 2010 17:41

    Primary key columns cannot contain NULL values. If you tried to create a primary key constraint, you will get an error like this:

    ERROR at line 1:
    ORA-01449: column contains NULL values: cannot alter to NOT NULL
    

    However, you can add a unique constraint by doing something like the following:

    ALTER TABLE test ADD CONSTRAINT test_unq UNIQUE (column1, column2);
    

    I still wonder why you take the approach you take. I have a vague feeling that're missing us the key pieces of information to recommend the correct solution.

  • Another user changed the row with a primary key oracle.jbo.Key]

    I see many discussions about this error, but still cannot understand the difficulty that I need in my scenario.

    I am an Oracle Developer and completely new to ADF, please bear with me.

    I use JDeveloper 11.1.1.9.0

    My scenario:

    Creates an object editable view (UVO) with sub selects in the query, which is from several db tables.

    Creating a table using the UVO

    When I try to update a field in the table, and then click the validate, I get the error message:

    Another user changed the row with a primary key oracle.jbo.Key]

    Can someone explain in what scenarios I see this error and how do I solve this problem?

    Try the viewObject execution after validation and reQueryOnCommit set to true

    For details see - binary: a reason more for "Houston-25014: another user has modified the line containing oracle.jbo.Key primary key '

    Ashish

  • IAM has a problem with my product key

    IAM has a problem with my product key

    Hello, Arm883,

    Product key for which the application: Windows, Office

    Windows: Select Windows version from the drop-down list and repost the question.

    http://answers.Microsoft.com/en-us/Windows/Forum?tab=answered

    Office: Select desktop from the drop-down and repost the question.

    http://answers.Microsoft.com/en-us/Office/Forum/office_install?TM=1372280499137

    Or, a response back with what software is the product key and we can move to the correct forum.

    Thank you.

  • Problems with the product key

    I have a mac book pro which has a partition with windows 7 pro (I SOUL, in the way that you need to restore the computer whenever you need to use the window). I installed fusion 3 for both systems without having to restart. I deleted the partition and tried to reinstalled the window. now, I have a problem with the product key, what can I do?

    Hi Lumareli,
     
    What is the error you get when you enter the product key?
     
    If you have difficulties to activate Windows 7, open the Windows Wizard of Activation in Windows 7 to use the phone and activate Windows:
     
    Try this and wait for a real person and explain what happened:

    a. Click Start, then in the Find box type slui.exe 4
    b. press enter on your keyboard.
    c. Select your country.
    d. Select the telephone activation option, then call and hold to a real person.
     
    Aziz Nadeem - Microsoft Support

    [If this post was helpful, please click the button "Vote as helpful" (green triangle). If it can help solve your problem, click on the button 'Propose as answer' or 'mark as answer '. [By proposing / marking a post as answer or useful you help others find the answer more quickly.]

  • I have problem with the escape key

    I have the problem with the ESC key... is sometimes from time to time I press my ESC key on my labtop that he would open to the top of my Start menu... there at - it a config that I can turn it off?  Sometimes I play computer game it just annoying someone help please (I'm using Windows vista)

    Hi techon,.

    Welcome to the Microsoft answers site!

    Make sure that you not press CTRL when ESC is crossed.

    Please note the keys CTRL + ESC will bring up Start menu.

    You know, keyboard shortcuts
    http://Windows.Microsoft.com/en-us/Windows-Vista/keyboard-shortcuts

    If the problem persists, you can follow the steps mentioned in the link below:

    Troubleshoot wired keyboards that do not or only the erroneous characters category

    http://support.Microsoft.com/kb/258826

    If the problem persists, please consult the manufacturer of the laptop computer for more information.

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

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

  • Problems with the shortcut keys, suggestions?

    I have an Asus computer is a portable computer, N56VM. I have problems with my shortcut keys. I can use is no longer the fn + key that usually let me adjust the back of my bright keyboard commands, or my volume (mute, raise/lower the volume), however, my brightness on the monitor shortcuts keyboard still works, and so did my black screen key. Oh, and also, my toggle mouse shortcut is not no longer works. I was looking at the forums, and I upgraded my bios and also reinstalled my ATKPI files and still nothing. I think the problem might have to do with the mechanics of the system, but I am not sure. Any suggestions?

    Hello

    Welcome to the Microsoft community where you can find all the answers related to windows.

    According to the description provided, its looks that you are facing a problem with the system hotkeys, this problem could arise Hotkey readers or the parameters of the system.

    I suggest you day chipset drives and driver hotkey from the manufactures Web site and check if it helps.

    http://www.ASUS.com/notebooks/Multimedia_Entertainment/N56VM/#download

    Note: If the problem persists then I advise you to get in touch with the computer manufacture for further assistance and check if it helps.

    http://support.ASUS.com/ServiceHome.aspx?SLanguage=en

    If you need Windows guru, do not hesitate to post your questions and we will be happy to help you.

  • Problem with the product key of windows 8

    I have problem with my product key of victory 8. I installed it in front of my laptop and it is normal until something goes wrong with my laptop. I decided to reinstall my win 8, and when I put the product key, it does not work. What should I do?

    (1) If you encounter problems with activation, try to reboot / restart your PC a couple of times.
    (2) if it is a new installation of Windows 8 / 8.1 try options refresh or Reset.
    If the two options above do not solve the problem of activation, then try activating the phone.

    How to activate Windows 8 by phone

    Press the Windows key + x then click Run, then type: slui.exe 4
    (Another method: press Windows + r and then type: slui.exe 4)

    Then press the ENTER"" key.

    Select your "country" in the list.

    Choose the option "activate phone".

    Stay on the phone * do not select/press any option * and wait for a person to help you.

    Clearly state your problem to the support person.

    ================= Alternatives ===================================

    Microsoft - U.S. support
    http://support.Microsoft.com/contactus/?PID=17655&TID=100109454

    Microsoft - UK support
    http://support.Microsoft.com/contactus/?ln=en-GB

    How and when to contact Microsoft and support Customer Service:
    http://support.Microsoft.com/kb/295539
    Clearly explain your problem to the support person and they will transfer you to the activation service

    How to contact a Microsoft Product Activation Center by phone:
    http://support.Microsoft.com/kb/950929

    To get a list of telephone numbers see method #1

    J W Stuart: http://www.pagestart.com

  • Update line programmatically with Composite primary keys

    Hi all

    I use JDeveloper 11.1.2.4.0,I want to update the program with two primary keys PK1_ID and PK2_ID line

    When I have a primary key I can do it by:

    /////////////////////////////////////////////////////

    Key = new key (new Object() {empid});

    Employees1ViewImpl vo = (Employees1ViewImpl) this.getEmployees1View1 ();

    Locate the line using key reference in the View object.

    Line k = vo.getRow (key);

    using this method, we can set the new FirstName

    k.setAttribute ("FirstName", "Vero");

    this.getDBTransaction () .commit ();

    ///////////////////////////////

    Is it possible to use the same code with more of primary key?




    Kind regards

    The key class contains an array of attributes that identify the line you're looking for. In your case, the key has two attributes

    Key = new key (new Object() {pkId1, pkId2});

    the rest of the method works as what.

    Timo

  • Problem with the arrow keys in the editor

    Hi, I have problem with the arrow keys in the editor. I don't use arrow in the editor to the bottom and select list (list of table fields, for example). Arrow in the result window or navigator to work normally.
    In the editor, I have problem with SHIFT + left arrow also key.
    Someone at-similar problem? (Developer SQL 1.5.5 with patch)
    Thanks for your reply, Petr

    Could be the old and known problem with accelerators, try:

    Preferences - accelerators - load - default setting

    Hope that helps,
    K.

  • exp/imp with sequential primary key table.

    Hello

    I have a general question about EXP/IMP a table with primary key sequence. I need exp rows in this table of 11g DB and their imp to 9i DB. This table is the same on 11g and 9i. Table 11g is updated daily. I want to import lines which are the only new records to 9i to expedite the process. As this main table of the key is sequential, I intend to export with where table_key > N, N is the max of last importing table_key and then proceed to import on this dump file. Don't you see any problem doing it this way?
    Your expertise is greatly appreciated!

    Hello

    I have no problem at all.
    If you do not forget to use the 9i export tool, then you should be OK
    Also a full table export and import with ignore = Yes will ignore the records that violate the primary key and import only new records.
    However, it is not a very clean way to do it.

    Success!
    FJFranken

  • Satellite L850 - 1 H 4 - a strange problem with the FN key

    Hello

    I have a strange problem on my laptop. When I uninstall my PVAT my start "FN" key works, when I install it it s not working not properly. Its market not only the volume key (F9 and F10) without pressing the "Fn", if I want to press F9 or F10 I have to press FN + F9, even with the rest of the buttons.

    When I install PVAT I have to press FN, so I can use my F keys (e.g. F3 to search on the browser tool, alt + f4 - I have to press Fn + alt + f4), and I can't use real functions like mute, disable Touchpad etc. Use the volume keys only. Y at - it a problem if I run my computer without PVAT, this may affect its performance?

    Where could be the problem and can I fix it? I'm with Windows7 x 64, but the laptop was with no OS when I bought it. And there is a problem with this version, I bought its impossible to install the Pakc3 Service, it s with SP1, can be the problem? I put t know what to do... perhaps I run the laptop without PVAT, sounds good, because the buttons work fine without it, but I don't know if it interacts with something else.

    Thanks in advance!

    Its possible to use the function buttons by pressing another button without the use of the fn or FN.
    This option can be changed in the BIOS.

    Go to the BIOS by pressing F2.
    In the BIOS, choose Advanced-> system configuration Options
    Here you should find the option that allows to change the special function keys which allows you to use the function FN or without button Fn button

    By the way: this theme has already spoken here in the forum several times. therefore recommend that you use the advanced search to Forums before posting new thread

  • Oracle 11g compatibility with oracle 10g and 9i?


    Hi all



    I have a few questions about the compatibility of 11g.



    Client Oracle 11g is compatible with oracle 10g client that is already installed on the desktop computer?


    If any changes to do so and where?



    Is oracle 11g oracle 10 g/9i on the same server where are installed the 10 g/9i compatible?


    Concerning

    If the question you ask yourself is 'Can I have multiple versions of the Oracle installed on the same client computer' or "Can I have several versions of the database Oracle installed on the same machine", the answer is Yes. As long as you install each version in another House of Oracle, and we are talking about versions 8.1.5 and upward, you can have as many different versions of the client and the database on the same machine as you wish. Of course, you are still subject to the support of operating system compatibility (e.g. Oracle 9.2 did not had been supported on Windows 2008, so do not expect to work).

    The only problem you may have would be with components that are not compatible with several House. This mainly affects third-party Windows drivers (drivers third party ODBC, etc.) who do not know how to work with multiple Oracle homes and end up using which version of the client Oracle happens to appear first in the path.

    Justin

Maybe you are looking for

  • where can I find tools to get blocked downloads

    advised opening Tools, go to except security-type in "Download now etc but no icon for me to open 'Tools' on the window of Firefox.» How to "Tools"? Another window of Firefox browser?

  • Audio driver update posted

    The update is dated September 14, 2009, and is supposed to provide the audio volume slightly increased.

  • Palm E2 data loss

    Help! I loat my PALM E2 and tried to sync my desktop with a new E2 I had and she deleted the office somehow.  Is it possible to recover what was in the calendar before my mishap.  Thank you!

  • How to get rid of scam the system of PC power speed optimizer

    This program showed on my computer recently.  I did some research and it seems to be something that I don't need that drives me to pay for his service (clean registry problems) or there malware.  I followed the instructions to ininstall this (click o

  • Connect to Internet after reinstalling

    I had to reinstall XP Pro to my mesh recovery disk. (blue screen of death) Is no longer an icon in the network window, so I can't set up or connect to Internet even activate XP again. How can I fix?