Enable constraint issue

i want to enable a constraint but got error no such constraint.
but when i select it from user_constraints it is available for that table.
thanks
SQL> select constraint_name from user_constraints where table_name='tbl_RefundCredit';
CONSTRAINT_NAME
SYS_C0016751
SQL> ALTER TABLE tbl_RefundCredit enable CONSTRAINT SYS_C0016751;
ALTER TABLE tbl_RefundCredit enable CONSTRAINT SYS_C0016751
ERROR at line 1:
ORA-02430: cannot enable constraint (SYS_C0016751) - no such constraint

kindly put the constraint name inside single quote or double quote
then try
dont mind i dont have the s/w .. so you have test it...

Similar Messages

  • Issue with enabling constraint

    Hi,
    I am trying to enable a constraint on a table using below statement.
    alter table <table_name> enable constraint <constraint_name>;
    But this statement is hanging for ever....
    Can you please help me on this issue.
    Can I use NOVALIDATE? pls let me know how to use it.
    Thanks.

    plz try this ..
    alter table <table_name> modify constraint <constraint_name>  enable NOVALIDATE;

  • ENABLE CONSTRAINT

    Hello All,
    version details :
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    OS :
    SunOS 107 5.10 Generic_125100-10 sun4u sparc SUNW,Sun-Fire-V890
    Issue :
    I have executed a PLSQL which enables all the disabled constraints in a schema....
    Enabling one constraint is taking 15 hours...this step has not take this much time previously...
    There is no blocking session in V$lock....
    The object is locked by only the current session in v$locked_object...
    I know killing and reexecuting the step might solve the issue but i want to know for sure what is blocking it before killing it......'
    Alert log shows no sign execute for redo switch.......
    the hanging statement is below,
    ALTER TABLE UC_ADDRESS_INFO_TX ENABLE CONSTRAINT FK_ADDR_INFO_ROLE_MAP_CD
    Thanks in advance
    Vijay G

    No it`s not because the same table .. the process is below,
    i take an export of production DB, I do structure import ,then i disable the constraints ,then import few required tables alone for the application then i enable the constraints and then i do an analyze . The whole process takes 5 hours now it`s been fifteen hours.
    I have done individual enable before but why is this taking time... i am going to change this into enable novalidate sort but i wnated to know why it is hanging before i do any changes.......
    Regret for the inconvenience,
    Thanks ,
    Vijay G

  • Does Oracle re-enable an already enabled constraint

    Hi All,
    If my constraints are already enabled and I issue the following enable command:
    alter table <table_name> enable constraint <constraint_name>;
    Will oracle re-enable this already enabled constraint - i.e go through the table data validating each column/columns(as teh case may be) againist the constraint rules, or it will simply do nothing since the constraint is ok?
    Thanks.

    At leats if they previsouly were enabled with novalidate Oracle WILL DEFINTELY CHECK THEM. Example:
    Connected to Oracle Database 11g Release 11.2.0.1.0
    Connected as gints
    SQL> create table t(a number);
    Table created
    SQL> insert into t values (null);
    1 row inserted
    SQL> alter table t add constraint a_nn check(a IS NOT NULL) enable novalidate;
    Table altered
    SQL> alter table t enable constraint a_nn;
    alter table t enable constraint a_nn
    ORA-02293: cannot validate (GINTS.A_NN) - check constraint violated
    SQL> Gints Plivna
    http://www.gplivna.eu

  • Any report to identify Time Constraint issues?

    Hello,
    Is there a report that I can run to get the employees and Infotype records with time constraint issues? So until last week, we had not turned on the PC-UI switch in T77S0 table. So the way it worked was, if in history there were 2 records with time gaps for Infotype with time constraint = 1, then it still allowed us to create new records. Now with the switch turned on, it gives an error. Once the historic records are corrected, it allows us to proceed. This is freaking out a lot of data specialists, and we were wondering if we can proactively identify the employees with these historic data inconsistencies and be able to correct them. Please let me know.
    Thanks,
    Nakul

    Found it: RPUSCNTC
    Thanks,
    Nakul

  • Problem in enabling constraint - after disabling and truncation of table .

    Hello Friends,
    I have a table called DRR_TABLES that has list of table names . The requirement is to truncate the tables present in DRR_TABLES except KEY_IDS table and table_name like '%TYPE%' table.
    written a procedure . successfullly truncating the tables from DRR_TABLES but while enabling constraints after truncation , I am getting problem in enabling constraints .
    ERROR at line 1:
    ORA-02270: no matching unique or primary key for this column-list
    ORA-06512: at "schema123.TRUNCATE_DRR_TABLES ", line 49
    ORA-06512: at line 1
    Heres is the code .
    PROCEDURE TRUNCATE_DRR_TABLES is
    x varchar2(200);
    v_tablecount number := 0;
    cursor c is select TABLE_NAME from DRR_TABLES where population_source='PUBLISHING' and TABLE_NAME != 'KEY_IDS' and TABLE_NAME NOT LIKE '%TYPE%';
    BEGIN
    DBMS_OUTPUT.PUT_LINE (' TRUNCATING DRR TABLES ...........');
    OPEN c ;
    LOOP
    FETCH c INTO x ;
    EXIT WHEN c%NOTFOUND;
    for c1 in (select table_name, constraint_name from user_constraints where TABLE_NAME = x and status ='ENABLED' ORDER BY CONSTRAINT_TYPE DESC )
    loop
    begin
    execute immediate ('alter table '||c1.table_name||' disable constraint '||c1.constraint_name|| ' cascade');
    NULL;
    end;
    end loop;
    EXECUTE IMMEDIATE 'TRUNCATE TABLE ' || x ;
    v_tablecount := v_tablecount + 1 ;
    DBMS_OUTPUT.PUT_LINE('TABLE TRUNCATED :'|| x );
    END LOOP ;
    DBMS_OUTPUT.PUT_LINE (' TOTAL TABLES TRUNCATED ' || v_tablecount );
    CLOSE c;
    OPEN c ;
    LOOP
    FETCH c INTO x ;
    EXIT WHEN c%NOTFOUND;
    for c2 in (select table_name, constraint_name from user_constraints where TABLE_NAME = x and status = 'DISABLED' ORDER BY CONSTRAINT_TYPE)
    loop
    begin
    execute immediate ('alter table '||c2.table_name||' enable constraint '||c2.constraint_name);
    NULL;
    end;
    end loop;
    END LOOP ;
    CLOSE c ;
    END TRUNCATE_DRR_TABLES ;
    LINE 49 is the line corresponding to enable constraint statement.
    Edited by: kumar73 on 3 Sep, 2012 11:44 PM

    It is such a pity that a user having 321 posts till date is unaware of basics of Posting a Question.
    1. You need to provide us with your Oracle version
    select * from v$version;2. You need to understand and get accustomed to using tags before and after Code or SQL's for better readability.
    3. You need to provide us with the Table Structure and the Constraints Definition.
    There are many things that looks like Bad Coding practices:
    <font face="Times New Roman" size=2>
    1. Avoid RBAR (Loops).
    2. Implement Bulk Collect.
    3. Why do you need to disable the constraints before truncating? Are you kind of handling the Referential Integrity Constraints?
    4. Duplicate checking of Disabled Constraints.
    5. When the procedure is being executed at Production Environment, are you going to Monitor the DBMS_OUTPUT? Why not Log the Statements into a LOG Table?
    6. Why use a TableCount variable? Would the TableCount Variable be not equal to the Number of Records returned by Cursor C?
    7. What is the need to use a NULL statement after every Execute Immediate?
    8. What is the Need to surround each execute Immediate with Begin .. End block?
    9. Where is your Exception handling Block? Forgot to write?
    </font>
    What has been your effort in finding which Constraint/Table is causing you the trouble?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Stuck at "about to enable constraints..."

    Hi, I am new to Oracle,pls help me:
    I am importing a dump file into the dbs using IMP on oracle 10g. The import process stopped at
    about to enable constraints...
    for the whole day. would u pls tell me what is the reason...
    thanks in advance

    Hi all,
    it stucks again. "about to enable constraints...".
    the log file looks like:
    IMP-00002: failed to open EXPDAT.DMP for read
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    . importing XXX's objects into XXX
    IMP-00008: unrecognized statement in the export file:
    . . importing table "AAAAAA" .. rows imported
    . . importing table "BBBBBB" .. rows imported
    . . . . .

  • ALTER TABLE ENABLE CONSTRAINT FK is very slow

    Hello,
    The following enable constraint command takes around (15min to be completed)
    ALTER TABLE table_name ENABLE CONSTRAINT fk_constraint_name ;table_name: (~133 Millions rows)
    Any idea why it takes long to be completed? and what could be done to improve the performance?
    Thanks in advance

    Enabling a foreign means the database has to check the existence of each value in the child table column against the key in the parent table. Now you say,
    The following enable constraint command takes around (15min to be completed)
    table_name: (~133 Millions rows)In other words, ithe database is validating about ten million rows a minute. That doesn't seem too shabby. So what would you consider to be a reasonable amount of time to accomplish this task?
    Bear in mind the golden rule of tuning: ye cannae break the laws of physics. Acting on large volumes of data must necessarily take some time. You must be realistic.
    Also, why is it a problem? This is the sort of task which ought to be undertaken only occasionally. If you're doing it often enough that fifteen nminutes is unacceptably long perhaps you should reconsider why you're disabling the constraint. See whether there's another way to achieve whatever it is you're doing. After all, the most effective way to reduce something's elapsed time is to avoid doing that thing at all.
    Cheers, APC

  • Enable constraints into exceptions return no matching rowids

    with reference to http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/general005.htm
    Whether I'm using
    Method 1 ALTER TABLE country add
    (CONSTRAINT country_pk PRIMARY KEY (country_code)
    USING INDEX STORAGE (initial 5K) EXCEPTIONS INTO exceptions);
    OR
    Method 2
    ALTER TABLE country enable constraint country_pk EXCEPTIONS INTO exceptions;
    select * from country where rowid in (select rowid from exceptions);
    there's still no matching rowid, why is this so?
    My purpose is to find out which records is causing the constraint failure.
    thanks

    You have to careful with your query:
    select * from country where rowid in (select rowid from exceptions);But the corresponding column in the "EXCEPTIONS" table is called "ROW_ID".
    So it probably should be:
    select * from country where rowid in (select row_id from exceptions);Otherwise you're selecting the actual rowid from the exceptions table which is not what you're looking for.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle:
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Estinamted time for enabling constraints

    Just curious, does any one know how long it would take for enabling one disabled constraint on a 166gb table? The table has 34 columns and 2 primary keys.
    i did a "alter table <table_name> enable constraint <constraint_name>" and this statement has been running for 50 mins now.
    Thanks

    969224 wrote:
    Just curious, does any one know how long it would take for enabling one disabled constraint on a 166gb table? The table has 34 columns and 2 primary keys.
    i did a "alter table <table_name> enable constraint <constraint_name>" and this statement has been running for 50 mins now.
    Thanksenabling CONSTRAINT will take longer than disabling the same constraint.
    The exact answer is that "It depends".

  • Enabling Constraints

    Hi All,
    Some generic conceptual questions.
    Oracle Database Version: 11.1.0.7
    1) Is there any time difference between enabling constraint on a Non-partitioned table and enabling constraint on a partitioned table, both tables having same no. of records?
    2) Suppose, we have 3 tables A, B and C.
    B and C have FK on Table A. After loading data I want to enable constraints on table B and C. Can I do that in parallel? Or do I have to wait for one table to enable constraint and then start enabling FK constraint for the second table? Is there some locking mechanism, which enables lock on Table A while enabling FK on table B is happening?
    Thanks,
    Ishan
    Edited by: Ishan on May 12, 2012 3:54 PM

    >
    Hi,
    1) Is there any time difference between enabling constraint on a Non-partitioned table and
    enabling constraint on a partitioned table, both tables having same no. of records? http://docs.oracle.com/cd/B10501_01/server.920/a96521/partiti.htm
    =====================
    Partitions and subpartitions of a table or index all share the same logical attributes. For example, all partitions (or subpartitions) in a table share the same column and constraint definitions, and all partitions (or subpartitions) of an index share the same index options. They can, however, have different physical attributes (such as TABLESPACE).
    ======================
    2) Suppose, we have 3 tables A, B and C.
    B and C have FK on Table A. After loading data I want to enable constraints on table B and C.
    Can I do that in parallel? Or do I have to wait for one table to enable constraint and then start
    enabling FK constraint for the second table? Is there some locking mechanism, which enables
    lock on Table A while enabling FK on table B is happening?Why in parallel? AFAICS from the docco above, enabling CONSTRAINTs is a "binary" thing for all partitions - it's
    either enabled or it's not.
    Are you enabling this on a production server while updates are taking place? You might wish to consider
    looking at DEFERRABLE? But, you use the term "loading" so this isn't prod?
    Googling "enable constraint partitioned table" and "constraint deferrable oracle partitioned table" gave several
    interesting pages which may be of interest, but I don't know enough about your case to help further.
    HTH all the same,
    Paul...
    IshanEdited by: Paulie on 12-May-2012 20:42

  • Enable constraints in parallel

    Hi,
    I am in the process of seeding up import.
    In our Datawarehouse environment enabling constrainta during import takes lot of time..To improve the performance of this step, i created constraints script seperately added parallelism in all commands (eg: alter table x1 add constraint xc1 .....enable parallel 4;)
    i changed degree os paralllelism of each table to 4 , i included following command at the start of the script.
    alter session force paralllel ddl parallel 4;
    Still constraints are not being enabled in parallel.
    How can i make these constraints enable step uses paralllelism.
    Is there is any other way to improve enable constraint performence during import.
    We are on 10.2.0.4 ...sun solaris 10 and we are using data pump.
    Thanks
    Pramod

    To speed up the import use exclude=statistics parameter
    see this link for enabling index
    http://www.asktherealtom.ch/?p=214

  • HT5927 Using apple configurator with supervised devises, enabling iCloud/ find my iOS device (after being supervised), backing up that supervised / find my iPhone enabled image, --issue; unable to apply back up to any iOS device (including the orign. devi

    Senario:
    Need to manage 500 Enterprise iPads
    Requirements;
    1) Trackable via Find my iOS device  (we have 500 iPads and with the 100 device limit per iCloud account for Find my iOS device limit we have 5+ iCloud accounts).
    2) Individually named iPads for locating and sending commands to wipe, lost mode, etc.. on map per Find my iOS device (we uniquely name them in Apple Configurator either by using the "sequensetially numbering feature", or by creating individual back ups (yes, 450) with the name specified in the image).
    3) Find my iOS device feature enabled in base Prepared or Supervised image (using one of our 5+ iCloud accounts) (image can be created during prepared stage, or in supervised stage) - tried both and have the same issue - which I am getting to...
    4) VPP codes for paid apps (all VPP codes purchased with generic account which is the Apple Admin account for VPP purchases). Apple Configurator is set up under a different/ unique Apple account (i.e. not VPP admin account) and not logged into iTunes for any purchases/ services).
    Issue: Can not do any following senarios;
    A)
         1) configure master iOS 7 iPad with iCloud account with Find my iOS feature enabled in Prepare stage (added during preparing stage)
         2) configure master iOS 7 iPad with iCloud account with Find my iOS feature enabled in Supervised stage (added after supervising, and then backing up that supervised and iOS Find my iOS device enabled)
    B) 1) Apply master image to any Supervised iPad (under senario step A) or senario step B)), including the (Supervised or/ Prepared iPad that was used to create the maset iOS 7 image
    Result = fail with Apple generic code "4" ; This is obviously due to Find my iOS device feature enabled during image capture.
    According to Apple (see Apple Config. Help) the 'Activation lock' (new feature in iOS 7) will not be enabled on a supervised device when an iCloud account with "Find my iDevice" is enabled. Their "help files" seem to imply after the device is Supervised, and a person (presumably and end user) adds thier own iCloud account with Find my iOS device enabled the activation lock is not enabled and erasing/ reconfiguring with Apple Configurator will not cause reimaging probhlems such as requiring the end user's credentials to reconfigure the device using Apple Configurator (i.e. you won't need the end user's credentials).
    Needed: To be able to configure Supervised iPads with iCloud account (Enterprised owned iCloud account) configured on the basse image, which has Find my iOS device enabled, and to be able to apply that base image to all Enterprise iPads without generic apple error code 4 issue.

    Hi all
    I am trying to replicate these steps in my environment but I am having trouble getting an iCloud backup restored to a supervised device. Can someone clarify the steps? The parts I am unsure on are:
    1) Do you Prepare in Configurator with all the institution owned apps? Or do you install them after restoring the iCloud backup?
    2) After entering the personal AppleID to restore the iCloud backup, the setup wizard prompts for the Institution/Configurator AppleID, there is an option to 'Skip Now'. Do you enter in the password for the institution account? or do you skip that step?
    3) What exactly is on the screen in the 'mini setup assistant' after the restore when you Refresh with Configurator?
    Any help would be greatly appreciated!

  • Use of DEFAULT tablespace while re-enabling constraint

    Using 8.1.7.2.
    While trying to re-enable a constraint on a table, we hit a ORA-01630. According to the error message, Oracle was trying to use the DEFAULT tablespace (USERS) instead of the TEMPORARY tablespace (TEMP) to do the work.
    Why would Oracle use a tablespace other than TEMP to do work that needed temporary space?
    [email protected]

    What is the 'temporary_tablespace' value when you query user_users as this user?
    Oracle will use the tablespace that is specified as the users TEMPORARY_TABLESPACE for all sorts. If that tablespace does not exists, it uses SYSTEM.

  • Time Constraint issue

    I am getting the error below when I change the S-S (A002) relationship in po13
    "No time constraint exists for key 01001S 100003931001A   1 2009090499991231S 100020"
    When I go to OOIT to look for the time constraint I do see time constraint defined...
    S    1001   Relationships    A002   Reports (line to)    2       (ENTRY FROM OOIT)
    This issue occurs in our environment with SP16 service pack (ECC 6) but if I go to other environment which is still on SP4 (ECC 6) I don't get this error.
    Also, I noticed that when I try to create a new position, I am able to do so. But when I go to add A002 relationship (S-S)
    I get the error below.
    No time constraint exists for key 01001  000000001001B0021 2009092999991231S 100077
    Please help. Thanks for your help.
    Edited by: Vikas Mahajan on Sep 30, 2009 3:46 AM

    Hi
    Kindly let me know how did you fix this issue. I am also getting same error.
    When uploading costcentre (S to K  A011) through LSMW, i am getting the below error.
    " No time constraint exists for key 51001  000000001001B0111 2009080199991231S 600020"
    When i update manually, i am not getting the error. I am able to update.
    With regards
    K.Vijayaragahvan

Maybe you are looking for

  • Help needed in BPC 10 Member Formula

    Hello Experts, We are in BPC 10 NW SP 11. Facing below error in report for Ratios hierarchy after member formula is built. Formulas is related to ratio IIF([ACCOUNT_GL].[RE_IREV]=0, NULL, [ACCOUNT_GL].[RE_IAADJ]/[ACCOUNT_GL].[RE_IREV]);SOLVE_ORDER=10

  • Can't access the "delete from server" option in AOL mail setting.

    iPhone 4s, ios 5.1, Verizon customer. I have never had an issue until this phone. Any ideas why I can see the "delete from server" option, but I can't check it? It's really annoying to delete emails from my phone and then have to go back and delete f

  • Auto-refresh search result (for activities)

    Hi all, we've got a customer requirement to implement a auto-refresh function for the search result for activities, means, the search result table should automatically be updated every x minutes. In component BT126S_APPT, view layout ApptSQ.htm, I've

  • PM - Restric IQ02 to level of plant

    HI, I need restrict teh access to transaction IQ02 (with role) to level of "Plant" (SerData), but this transaction only restrict maintenance plant and planning plant. 1) A new authorization object has been created, for this field name (B_WERK) 2) The

  • Can't pair Apple Remote and MacBook Pro + Answer

    I had an issue pairing my Apple Remote with my MacBook Pro. The Apple manual says (on page 36): To pair your Apple Remote with your MacBook Pro: 1 Position the Apple Remote 3 to 4 inches from the IR receiver on your MacBook Pro. 2 Press and hold the