Issue in adding not null constraint on 250 G  table with 50 million rows.

Guys,
I need to add not null constraint on 2 column of a table with 50 million rows and ~250 GB in size, These 2 columns are newly added and I have also update the value for each of these columns to not null for each row.
After that I am adding not null constraint on these 2 columns this is taking 1 hour to complete, Is there any way to speed up this, I don't want to use ENABLE NOVALIDATE option or rather I can't use that option.

user445775 wrote:
Guys,
I need to add not null constraint on 2 column of a table with 50 million rows and ~250 GB in size, These 2 columns are newly added and I have also update the value for each of these columns to not null for each row.
After that I am adding not null constraint on these 2 columns this is taking 1 hour to complete, Is there any way to speed up this, I don't want to use ENABLE NOVALIDATE option or rather I can't use that option.And what's wrong with it taking an hour? Presumably, this is a one time operation, and it doesn't really interfere with anything else.

Similar Messages

  • All_tab_columns says NULLABLE = 'Y' while there is a NOT NULL constraint

    Hi all,
    I created a table MANT (here is the script) :
    CREATE TABLE DMI.MANT
      MANT     NUMBER(7)                            NOT NULL,
      SPER     NUMBER(7)                            NOT NULL,
      RANT     VARCHAR2(10 BYTE)                    NOT NULL,
      ANT      VARCHAR2(200 BYTE),
      CMT      VARCHAR2(800 BYTE),
      PERIODE  VARCHAR2(200 BYTE),
      DU       DATE,
      USR      VARCHAR2(10 BYTE),
      DTE      DATE
    )Then I added a column called RSMF :
    ALTER TABLE DMI.MANT
    ADD (RSMF VARCHAR2(100 BYTE));and added a check constraint :
    ALTER TABLE DMI.MANT ADD
    CONSTRAINT RSMF_NOT_NULL
    CHECK (RSMF IS NOT NULL)
    ENABLE
    NOVALIDATEI had to add NOVALIDATE clause because all the records had a null value. So to validate the constraint I simply executed the following update
    update dmi.mant set rsmf = 'yy';and then validate the contraint with :
    ALTER TABLE DMI.MANT
    MODIFY CONSTRAINT RSMF_NOT_NULL
    VALIDATE;The problem comes when I query ALL_TAB_COLUMNS table...
    Select OWNER,TABLE_NAME,COLUMN_NAME,DATA_TYPE,DATA_LENGTH,NULLABLE
    from all_tab_columns
    where table_name = 'MANT'
       and owner = 'DMI'
       and COLUMN_NAME = 'RSMF';Why does the ALL_TAB_COLUMNS table gives for RSMF column a NULLABLE value equals to 'Y' while there is a validated check NOT NULL constraint on it ?
    It's annoying because I want to get all the NOT NULL columns in a given table and here the SRMF column is not returned...
    Here is the result :
    OWNER  |TABLE_NAME |COLUMN_NAME  |DATA_TYPE  |DATA_LENGTH  |NULLABLE
    DMI    |MANT       |RSMF         |VARCHAR2   |100          |YThks for your replies...

    NULLABLE would be true if you created the table like this:
    create table x (a not null)
    but not if you add a check constraint after the fact.

  • NOT and NOT NULL constraints

    I saw this posted on Metalinks and the answer was to be found here. I can't seem to find it..... has there been a resolution to this? Unfortunately, I am running into the same problem.
    You help is appreciated.
    I am trying to create Oracle8i schema from MS SQL Sercer 7.0 using Oracle Migration Workbench and it is not functioning as expected.
    Problems are:
    =============
    1. If the column type is CHAR OR VARCHAR in MS SQL Server and the integrity contraints is NOT NULL or NULL, in Oracle8i it create as NULL only and it not taking the NOT NULL in MS SQL Server to Oracle8i NOT NULL. I can say that it is ignoring the integrity constraint for CHAR OR VARCHAR type while converting to Oracle8i.
    Example in MS SQL Server
    ========================
    CREATE TABLE emp (
    emp_name CHAR(10) NOT NULL
    the tool converts to Oracle8i as
    CREATE TABLE emp (
    emp_name CHAR(10)
    It is ignoring the NOT NULL constraints in Oracle8i and it is happening only for CHAR and VARCHAR data type. Can anyone help me on this how to rectify the problem in Migration Workbench. ....... "

    We reported this for the EA's, but got little response and obviously no resolution.
    K.

  • NULLABLE column is not updated after the NOT NULL constraint definition...

    Hi,
    SQL> select column_name,nullable from all_tab_columns where table_name='EMP';
    COLUMN_NAME                    NULLABLE
    EMPNO                          N
    ENAME                          Y
    JOB                            Y
    MGR                            Y
    HIREDATE                       Y
    SAL                            Y
    COMM                           Y
    DEPTNO                         Y
    CODE_POLEIS_DIAM               Y
    9 rows selected
    SQL> ALTER TABLE EMP add constraint emp_job_nn check(job is not null);
    Table altered
    SQL> select constraint_name from all_cons_columns
      2  where table_name='EMP';
    CONSTRAINT_NAME
    FK_DEPTNO
    PK_EMP
    EMP_JOB_NN
    SQL> select column_name,nullable from all_tab_columns where table_name='EMP';
    COLUMN_NAME                    NULLABLE
    EMPNO                          N
    ENAME                          Y
    JOB                            Y                         <---------'NULL'
    MGR                            Y
    HIREDATE                       Y
    SAL                            Y
    COMM                           Y
    DEPTNO                         Y
    CODE_POLEIS_DIAM               Y
    9 rows selected
    Why is not updated....????
    In Oracle ebook:
    Oracle® Database Reference
    10g Release 2 (10.2)
    Part Number B14237-02
    the comments about the NULLBLE column are as follows:
    "Specifies whether a column allows NULLs. Value is N if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY KEY. The constraint should be in an ENABLE VALIDATE state."
    BUT BY DEFAULT ALL CONSTRAINTS ARE IN VALIDATE STATE
    (Ref: Oracle® Database SQL Reference
    10g Release 2 (10.2)
    Part Number B14200-02 )Note : I use OraDB 10g v.2
    Thanks a lot
    Sim

    Hi,
    Tom Kytes answer it before:
    SQL> create table t ( id int );
    Table created.
    SQL> desc t
    Name                            Null?    Type
    ID                                       NUMBER(38)
    SQL> alter table t add constraint t_nn check (id is not null);
    Table altered.
    SQL> insert into t (id) values (null);
    insert into t (id) values (null)
    ERROR at line 1:
    ORA-02290: check constraint (TANDREWS.T_NN) violated
    SQL> desc t
    Name                            Null?    Type
    ID                                       NUMBER(38)
    Followup July 16, 2003 - 10am US/Eastern:
    that is not a NOT NULL constraint, that is a check constraint
    ops$tkyte@ORA920LAP> create table t ( x int );
    Table created.
    ops$tkyte@ORA920LAP> alter table t modify x not null;
    Table altered.
    ops$tkyte@ORA920LAP> set linesize 50
    ops$tkyte@ORA920LAP> desc t
    Name                    Null?    Type
    X                       NOT NULL NUMBER(38)To see the full thread in asktom, please refer to:
    - http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1338402651192
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • How to create a named not null constraint

    Hi All,
    How to create a table with a named not null constraint?
    and how to add a named not null constraint to a table?
    Thanks for the help.

    Hi,
    I guess you are asking for a column inside a table, having a named not null constraint. Am I correct? Try the following.
    SQL> create table checktab (col1 varchar2(30)  constraint NN_const not null);Is this what you required?
    Please post technical questions in respective forums.
    Hope that helps.
    Savitha.

  • How add primary key constraint to already existing table with data

    I want apply primary key constraint to already existing table with data
    is there any command or way to do

    Alternatively, assuming you want to ensure uniqueness in your primary key column you can do this:
    alter table <table name> add constraint <cons name> primary key (col1,col2) exceptions into <exception_table>
    If the altter table statement fails this will populate the EXCEPTIONS table with the rows that contain duplicate values for (col1,col2).
    You will need to run (or get a DBA to run) a script called UTLEXCPT.SQL (which will be in the $ORACLE_HOME/rdbms/admin directory) if you don't already have an EXCEPTIONS table.
    Cheers, APC

  • When primary table is also join table and you have NOT NULL constraints

    Hi,
    Me again. This is similar to the message titled "Problem with an
    optional 1 to 1 relationship modelled using a link table". Whats
    different about this case is we are dealing with a one to many relationship.
    Given this SQL:
    create table person (
    pid INTEGER(10) NOT NULL,
    language_code VARCHAR(3) NOT NULL
    create table language_person (
    pid INTEGER(10) NOT NULL REFERENCES person(pid),
    language_code VARCHAR(3) NOT NULL,
    first_name VARCHAR(20) NOT NULL
    I wrote these classes (abbreviated)
    Person:
    * @jdo:persist
    * @jdo:identity-type application
    * @jdo:objectid-class PersonId
    * @jdo:requires-extent false
    * @jdo:extension vendor-name="kodo" key="table"
    * value="PERSON"
    * @jdo:extension vendor-name="kodo" key="lock-column"
    * value="none"
    * @jdo:extension vendor-name="kodo" key="class-column"
    * value="none"
    public class Person {
    * @jdo:primary-key true
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="PID"
    private int pid;
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="LANGUAGE_CODE"
    private String languageCode;
    * @jdo:collection element-type="LanguagePerson"
    * @jdo:extension vendor-name="kodo" key="pid-data-column"
    * value="PID"
    * @jdo:extension vendor-name="kodo" key="table"
    * value="LANGUAGE_PERSON"
    * @jdo:extension vendor-name="kodo" key="pid-ref-column"
    * value="PID"
    * @jdo:extension vendor-name="kodo"
    key="languageCode-data-column"
    * value="LANGUAGE_CODE"
    * @jdo:extension vendor-name="kodo"
    key="languageCode-ref-column"
    * value="LANGUAGE_CODE"
    private Set languagePersons = new HashSet();
    public Person(int pid, String languageCode) {
    this.pid = pid;
    this.languageCode = languageCode;
    public void addLanguagePerson(LanguagePerson languagePerson) {
    languagePersons.add(languagePerson);
    public Set getLanguagePersons() {
    return languagePersons;
    LANGUAGE_PERSON
    * @jdo:persist
    * @jdo:identity-type application
    * @jdo:objectid-class LanguagePersonId
    * @jdo:requires-extent false
    * @jdo:extension vendor-name="kodo" key="table"
    * value="LANGUAGE_PERSON"
    * @jdo:extension vendor-name="kodo" key="lock-column"
    * value="none"
    * @jdo:extension vendor-name="kodo" key="class-column"
    * value="none"
    public class LanguagePerson {
    * @jdo:primary-key true
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="PID"
    private int pid;
    * @jdo:primary-key true
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="LANGUAGE_CODE"
    private String languageCode;
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="FIRST_NAME"
    private String firstName;
    public LanguagePerson(int pid, String languageCode, String firstName) {
    this.pid = pid;
    this.languageCode = languageCode;
    this.firstName = firstName;
    And then I do this:
         PersistenceManager pm = JDOFactory.getPersistenceManager();
    pm.currentTransaction().begin();
    final Person person = new Person(1,"EN");
    final LanguagePerson languagePerson = new
              LanguagePerson(1,"EN","Mike");
    person.addLanguagePerson(languagePerson);
    pm.makePersistent(person);
    pm.currentTransaction().commit();
    The SQL that issues forth is this:
    1125 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    preparing statement <17089909>: INSERT INTO PERSON(LANGUAGE_CODE, PID)
    VALUES (?, ?)
    1125 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    executing statement <17089909>: [reused=1;params={(String)EN,(int)1}]
    1125 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    preparing statement <9818046>: INSERT INTO
    LANGUAGE_PERSON(LANGUAGE_CODE, PID) VALUES (?, ?)
    1125 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    executing statement <9818046>: [reused=1;params={(String)EN,(int)1}]
    1140 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    preparing statement <24763620>: INSERT INTO LANGUAGE_PERSON(FIRST_NAME,
    LANGUAGE_CODE, PID) VALUES (?, ?, ?)
    1140 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    executing statement <24763620>:
    [reused=1;params={(String)Mike,(String)EN,(int)1}]
    And the second INSERT fails on Oracle because FIRST_NAME is null, and
    the table definition requires it to be NOT NULL.
    Is there anyway I can get Kodo to figure out its dealing with the same
    table for inserting the link columns and the full row, and optimize
    accordingly i.e do one INSERT for LANGUAGE_PERSON?
    I guess my only other options are a) introduce an explicit link table or
    b) define a custom mapping?
    Thanks,
    Mike.

    There are examples of 1-Many mappings in the documentation:
    http://www.solarmetric.com/Software/Documentation/latest/docs/
    ref_guide_meta_examples.html
    The important point I think you've missed is that right now, 1-many
    mappings always require an inverse 1-1 mapping. Again, see the docs
    above.
    So your LanguagePerson needs a field of type Person, and whenever you add
    a LanguagePerson to a Person, make sure to set that LanguagePerson's
    Person too. LanguagePerson.person will use the same PID column as
    LanguagePeson.pid. Kodo has no problem with having 2 mappings
    mapped to the same column.
    Kodo 3.0 will allow 1-Many relations without an inverse 1-1.

  • Adding a UNIQUE Constraint to an existing table

    Hi,
    I got this issue because of the existing data. My issue is in my table I want to add a unique constraint to two columns but i cannot add this becuase of the existing repeating data. And I cannot do a data repair to fix the repeating data since the customer is reling on this data so we can not get the decision to repair the data.
    As a solution I try this method, by adding a function to check the repeating data before inserting the data to the table. It's working fine to a user but when it come to multiple users it's not working because users can log to the database and can do their transactions simultaneously.
    My question is; is there a way in oracle to add a constraint to the data that can add in future not to the old existing data?
    Thanks,
    Darex.

    user9359353 wrote:
    Hi,
    As a solution I try this method, by adding a function to check the repeating data before inserting the data to the table. It's working fine to a user but when it come to multiple users it's not working because users can log to the database and can do their transactions simultaneously.
    show us what is "not working". if you are calling this function from a trigger the correct way, the first person to commit will have their data inserted and the next person will not be able to insert.
    edit: you may want to have a read through this thread: where I was encountering a problem with multi-row validation using triggers:
    Row level validation dependant on other rows?
    note this post:
    Rob van Wijk wrote:
    Hi WhiteHat,
    Here are two blogposts of mine about this subject that you might find useful.
    One with some guidelines about implementing entity rules: http://rwijk.blogspot.com/2008/08/implementing-entity->rules.html
    And one with an example how to implement (among others) an overlap check in the context of another option for your >question, the product RuleGen: http://rwijk.blogspot.com/2008/05/rulegen-test.html
    Hope this helps.
    Regards,
    Rob.Edited by: WhiteHat on Jun 8, 2011 3:51 PM

  • Issue in retrieving all the records from ADF Table with multiple row

    Hi,
    As per my requirement, I need to fill the table with multi selected LOV values and when user clicks on commit, I need to save them to database.
    I am using ADF 11g, Multi select table. Using the below ADD method, I am able to add the records but if user clicks on cancel, I need to remove those from view and clear the table as well.
    But the Issue I am facing is, in my cancel method, always I am getting half of the records. Lets assume table contains 100 records but in my cancel method, I am getting only 50 records.
    Please let me know what is the issue in my source code.
    ADD Method:
    public void insertRecInCMProcessParamVal(String commType, String processType, Number seqNumber){       
    try{
    Row row = this.getCmProcessParamValueView1().createRow();
    row.setAttribute("ParamValue7", commType);
    row.setAttribute("ProcessType", processType);
    row.setAttribute("CreationDate", new Date());
    row.setAttribute("CreatedBy", uid);
    row.setAttribute("ParamValueSeqNum", seqNumber);
    row.setAttribute("ProcessedFlag", "N");
    this.getCmProcessParamValueView1().insertRow(row);
    }catch(Exception e){           
    e.printStackTrace();
    Table Code:
    <af:table value="#{bindings.CmProcessParamValueView11.collectionModel}"
    var="row"
    rows="#{bindings.CmProcessParamValueView11.rangeSize}"
    emptyText="#{bindings.CmProcessParamValueView11.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.CmProcessParamValueView11.rangeSize}"
    rowBandingInterval="1"
    selectedRowKeys="#{bindings.CmProcessParamValueView11.collectionModel.selectedRow}"
    selectionListener="#{bindings.CmProcessParamValueView11.collectionModel.makeCurrent}"
    rowSelection="multiple"
    binding="#{backingBeanScope.backing_app_RunCalcPage.t1}"
    id="t1" width="100%" inlineStyle="height:100px;" >
    <af:column sortProperty="ParamValue6"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    id="c1" visible="false">
    <af:inputText value="#{row.bindings.ParamValue6.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue6.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue6.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue6.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue6.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue6.tooltip}"
    id="it3">
    <f:validator binding="#{row.bindings.ParamValue6.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue7"
    sortable="true"
    headerText="Comm Type"
    id="c2">
    <af:inputText value="#{row.bindings.ParamValue7.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue7.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue7.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue7.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue7.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue7.tooltip}"
    id="it4">
    <f:validator binding="#{row.bindings.ParamValue7.validator}"/>
    </af:inputText>
    </af:column>
    <af:column sortProperty="ParamValue8"
    sortable="true"
    headerText="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    id="c3" visible="false">
    <af:inputText value="#{row.bindings.ParamValue8.inputValue}"
    label="#{bindings.CmProcessParamValueView11.hints.ParamValue8.label}"
    required="#{bindings.CmProcessParamValueView11.hints.ParamValue8.mandatory}"
    columns="#{bindings.CmProcessParamValueView11.hints.ParamValue8.displayWidth}"
    maximumLength="#{bindings.CmProcessParamValueView11.hints.ParamValue8.precision}"
    shortDesc="#{bindings.CmProcessParamValueView11.hints.ParamValue8.tooltip}"
    id="it2">
    <f:validator binding="#{row.bindings.ParamValue8.validator}"/>
    </af:inputText>
    </af:column>
    </af:table>
    Backing Bean Code:
    DCBindingContainer dcBindings=(DCBindingContainer)getBindings();
    DCIteratorBinding dcIterator=dcBindings.findIteratorBinding("CmProcessParamValueView1Iterator");
    RowSetIterator rs = dcIterator.getRowSetIterator();
    System.out.println("In Cancel Row Count is : "+ rs.getRowCount());
    if (rs.getRowCount() > 0) {
    Row row = rs.first();
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    while (rs.hasNext()) {
    int count = rs.getRowCount();
    System.out.println("Count is : "+ count);
    Row row = rs.next();
    System.out.println("Row === "+ row);
    if(row != null){                   
    row.refresh(Row.REFRESH_UNDO_CHANGES);
    row.remove();
    Thanks.

    Issue resolved.
    remove selectionListener and selectedRowKeys....
    code to get all the selectedRows.
    RowSetIterator rs = dcIterator.getRowSetIterator();
    RowKeySet rks = this.t1.getSelectedRowKeys();
    Iterator rksIter = rks.iterator();
    while (rksIter.hasNext()) {
    List l = (List) rksIter.next();
    Key key = (Key)l.get(0);
    Row row = rs.getRow(key);
    Thanks.

  • Issues in Table with Multi-Row Insert

    I have created a master detail screens using jheadstart on 2 separate pages, Master in the Form layout and detail in the Table Layout with multi-row insert, update and delete flags ON. Have set the New Rows count = 2.
    Issue 1
    If I try to delete any existing rows, it gives error for new rows saying value is required for the mandatory fields. It should just ignore the new rows if I have not updated any values for any attributes in the those row(As it does for non Master-Detail Table layout). I guess this might be happening because the jheadstart code is setting the foreign key for new rows the detail, but not resetting the status of the rows back to INITIALIZED.
    I also noticed that the create() of underlying EO is getting called for those blank rows when I click on 'Save' button, even if I have not changed any data in those rows.
    Issue 2
    When I try to select the new rows also for deletion, I am getting a '500 Internal Server Error' with following stack trace... This is also happening for normal (non Master-Detail) Table layout.
    java.lang.IllegalStateException: AdfFacesContext was already released or had never been attached.     at oracle.adf.view.faces.context.AdfFacesContext.release(AdfFacesContext.java:342)     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:253)     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    Issue 3
    I have put some validation code in the validate() method in the MyEntityImpl.java class.
    The validate method seems tobe getting called lots of times, in my case 20 times, where the new rows are just 2.
    Environment:
    Jdeveloper 10.1.3, JHeadStart 10.1.3 build 78, Windows XP
    thanks

    Thanks for the reply.
    Issue 1:
    What I have observed that in case of multi-row select enabled tables, the blank rows do not have any data. This is because the EO's create() method is called only when we post the data using 'Save' button. Thus the Foreign Keys are also not setup. This is a correct behavior since create() and FK setups etc should get done only if the user has inputted any value in the new rows and thus intend to insert new data into the table.
    I am able to find the exact cause of this issue. It is happening because in the details table, I have a column which needs tobe shown as checkbox. Since we can only bind checkbox to an Boolean attribute in VO, I have created a transient attribute of type Boolean, which basically calls the getter/setter of actual attribute doing the String "Y"/"N" to true/false conversion. Here is code for the transient attribute getter/setter
    public Boolean getDisplayOnWebBoolean() {
    return "Y".equals(getDisplayOnWeb()) ? Boolean.TRUE : Boolean.FALSE;
    public void setDisplayOnWebBoolean(Boolean value) {
    if(Boolean.TRUE.equals(value))
    setDisplayOnWeb("Y");
    else
    setDisplayOnWeb("N");
    Now when I click on the "Save" button, the setter for the boolean field is getting called with the value = false and this is resulting into the row being maked as dirty and thus the validation for the required attributes is getting executed and failing.
    Issue 2:
    Confirmed that correct filter-mapping entries are present in the web.xml.
    Now when I select the new blank rows for deletion and click save, following exception is thrown:
    java.lang.ClassCastException: oracle.jheadstart.controller.jsf.bean.NewTableRowBean at oracle.jheadstart.controller.jsf.bean.JhsCollectionModel.getRowsToRemove(JhsCollectionModel.java:412) at oracle.jheadstart.controller.jsf.bean.JhsCollectionModel.doModelUpdate(JhsCollectionModel.java:604) at oracle.jheadstart.controller.jsf.lifecycle.JhsPageLifecycle.processModelUpdaters(JhsPageLifecycle.java:541) at oracle.jheadstart.controller.jsf.lifecycle.JhsPageLifecycle.validateModelUpdates(JhsPageLifecycle.java:571)
    thanks - rutwik

  • Difference between Primary Key and Unique Key with NOT NULL constraint

    As both can be referred to another table.
    Apart from the difference that Primary Key can be only 1 and Unique keys can be multiple,
    is there any difference?
    Like in terms of type of Index?

    PARAG_C wrote:
    As both can be referred to another table.
    Apart from the difference that Primary Key can be only 1 and Unique keys can be multiple,
    is there any difference?
    Like in terms of type of Index?Technically there is almost no difference. Logically the two are often used for slightly different concepts.
    The PK (and with it the index) is often an ID column filled by a seqeunce. This key can then be refenced by foreign key constraints on other tables. it is very useful to have this as a meaningless technical construct. Because then the chance that such a ID needs to be changed is extremly slim.
    The UK (and with it the index) is often one or several columns that represent the logical key for the entity. Foreign key constriants should not point to this. THe chance that this attribute will be changed at some point in time is way higher then for a meaningless number (ID).

  • I am not understanding this Bonjour photo sharing thing with front row.

    I just finished seting up my media center with a 37 inch Olevia. WOW
    Anyways, what I am not understanding is I have iphoto set up on the other two compuers as sharing photos and the MINI is set to see them. Do I have to have iPhoto RUNNING on the other two computers so that I can RETRIEVE the photos on the mini? That seems so wrong. Can I just access the other computers photos and view them on my wireless network to the mini? I thought this is what this bonjour is all about...or do I have to copy the photos to the mini for viewing?
    Thanks

    You are most welcome.
    I understand the frustration - but when you step back and think about reliability, it makes sense to have one application to do one thing. If front row had to handle the slide show - it would be bulky and whenever a new feature was developed (or bug fixed) - the code would have to be added and tested in both iPhoto and Front Row. By keeping front row thin, simple and intuitive - it gets to market cheaper and more reliably. Isn't that really why we use Mac?
    iPhoto's job is to organize pictures. A lot of sophisticated things happen to add value when you take those "pictures in a flat folder" and import them - color correction, cropping, rotation, grouping into an album, ordering of the photos, settings for the slide show - music, fade effect, ken burns/zoom, etc...
    I have those applications set to launch automagically when I log in and hide themselves so I never see them until needed. They sit there idle once they load until front row tickles them in the correct manner to feed data over the network to front row...
    If you really need some photos to stand alone, you can always export a slide show as a quick time movie. Front Row will play movies remotely with no application running on the other end.

  • Not able to load data in tables with correct way

    Hi
    i made one trigger to load data in view and tables.
    CODE FOR TRIGGER>>>>
    Object Details Code Errors SQL
    CREATE OR REPLACE TRIGGER "WELL_GENERATOR_TRIGGER_1"
    INSTEAD OF INSERT ON VIEW_WELL_GENERATOR_FORM
    FOR EACH ROW
    DECLARE
    rowcnt number;
    BEGIN
    INSERT INTO facility (FAC_PK) VALUES (:NEW.FAC_PK);
    SELECT COUNT(*) INTO rowcnt FROM WELL WHERE WEL_PK = :NEW.WEL_PK;
    IF rowcnt = 0 THEN
    INSERT INTO WELL (WEL_PK,SITE,FAC_FK) VALUES(:NEW.WEL_PK,:NEW.SITE,:NEW.FAC_PK);
    ELSE
    UPDATE WELL SET WELL.SITE = :NEW.SITE,
    WELL.FAC_FK = :NEW.FAC_PK
    WHERE WELL.WEL_PK = :NEW.WEL_PK;
    END IF;
    SELECT COUNT(*) INTO rowcnt FROM WELL_STATUS WHERE WELL_STATUS.STA_PK = :NEW.STA_PK;
    IF rowcnt = 0 THEN
    INSERT INTO WELL_STATUS (WELL_TYPE, WELL_TYPE_DATE, OPER_STATUS, CLASS,WEL_FK)
    VALUES(:NEW.WELL_TYPE, :NEW.WELL_TYPE_DATE, :NEW.OPER_STATUS, :NEW.CLASS,:NEW.WEL_PK);
    ELSE
    UPDATE WELL_STATUS SET WELL_STATUS.WELL_TYPE = :NEW.WELL_TYPE,
    WELL_STATUS.WELL_TYPE_DATE = :NEW.WELL_TYPE_DATE,
    WELL_STATUS.OPER_STATUS = :NEW.OPER_STATUS,
    WELL_STATUS.CLASS = :NEW.CLASS,
    WELL_STATUS.WEL_FK = :NEW.WEL_PK
    WHERE STA_PK = :NEW.STA_PK;
    END IF;
    SELECT COUNT(*) INTO rowcnt FROM PERMIT WHERE PERMIT.PER_PK = :NEW.PER_PK;
    IF rowcnt = 0 THEN
    INSERT INTO PERMIT (AUT_STATUS,WEL_FK) VALUES (:NEW.AUT_STATUS,:NEW.WEL_PK);
    ELSE
    UPDATE PERMIT SET PERMIT.AUT_STATUS = :NEW.AUT_STATUS,
    PERMIT.WEL_FK = :NEW.WEL_PK
    WHERE PERMIT.PER_PK = :NEW.PER_PK;
    END IF;Now But still i am not getting result which i want.Like in WELL_STATUS table i could nt able to insert the value (WEL_FK) from (WEL_PK).And In PERMIT table column (WEL_FK) still i could nt able to insert the value (WEL_PK).
    Now WEL_PK value autogenerate from the SEQ same with STA_PK and PER_PK.But instead of taking value from seq STA_PK take the value from WEL_PK (dnt know why ? But in data its shows me Same value WEL_PK and STA_PK).Same thing With PER_PK.
    so where i am wrong ? i really need your help.
    workspace:PRACTISE
    UN:[email protected]
    PW:testing
    Application:     39289 - TESTTING
    Thanks
    Edited by: vijaya45 on Jul 13, 2009 9:44 PM
    Edited by: vijaya45 on Jul 14, 2009 12:48 AM

    Hello vijaya45,
    Not sure if this will help, but I noticed you currently have a WELL_GENERATOR_TRIGGER_1 and a WELL_GENERATOR_TRIGGER_2, and "1" is disabled but "2" is enabled. Which one is supposed to be running at this point?
    John

  • Primary key and relevant not null check constraints....

    Hi ,
    There are some constraints of primary key type and not null check constraints on columns which constitute each primary key....
    Should I/Do I have to drop them....????
    Do they burden the db at the time of data validation....????
    Thanks...
    Sim

    Hi,
    >>There are some constraints of primary key type and not null check constraints on columns which constitute each primary key..
    In fact, a column that constitutes a primary key, by default cannot accept NULL values. In this case, defines a PK column as NOT NULL would not be necessary.
    LEGATTI@ORACLE10> create table x (id number constraint pk_x primary key);
    Table created.
    LEGATTI@ORACLE10> desc x
    Name                  Null?    Type
    ID                    NOT NULL NUMBER
    LEGATTI@ORACLE10> select constraint_name,constraint_type,table_name,search_condition from user_constraints where table_name='X';
    CONSTRAINT_NAME                C TABLE_NAME      SEARCH_CONDITION                
    PK_X                           P X
    LEGATTI@ORACLE10> create table y (id number not null constraint pk_y primary key);
    Table created.
    LEGATTI@ORACLE10> desc y
    Name                  Null?    Type
    ID                   NOT NULL NUMBER
    LEGATTI@ORACLE10> select constraint_name,constraint_type,table_name,search_condition from user_constraints where table_name='Y';
    CONSTRAINT_NAME                C TABLE_NAME      SEARCH_CONDITION
    SYS_C006327381 C Y "ID" IS NOT NULL 
    PK_Y                           P Y
    LEGATTI@ORACLE10> alter table y drop constraint SYS_C006327381;
    Table altered.
    LEGATTI@ORACLE10> desc y
    Name                                      Null?    Type
    ID                                        NOT NULL NUMBER
    LEGATTI@ORACLE10> insert into y values (NULL);
    insert into y values (NULL)
    ERROR at line 1:
    ORA-01400: cannot insert NULL into ("LEGATTI"."Y"."ID")
    LEGATTI@ORACLE10> insert into y values (1);
    1 row created.
    LEGATTI@ORACLE10> insert into y values (1);
    insert into y values (1)
    ERROR at line 1:
    ORA-00001: unique constraint (LEGATTI.PK_Y) violated
    >>Should I/Do I have to drop them....????
    I don't see any problem, otherwise, drop the NOT NULL constraint is the same with alter the column table like below:
    LEGATTI@ORACLE10> create table z (id number not null constraint pk_z primary key);
    Table created.
    LEGATTI@ORACLE10> select constraint_name,constraint_type,table_name,search_condition from user_constraints where table_name='Z';
    CONSTRAINT_NAME                C TABLE_NAME                     SEARCH_CONDITION
    SYS_C006328420 C Z "ID" IS NOT NULL
    PK_Z                           P Z
    LEGATTI@ORACLE10> desc z
    Name                                      Null?    Type
    ID                                        NOT NULL NUMBER
    LEGATTI@ORACLE10> alter table z modify id NULL;
    Table altered.
    LEGATTI@ORACLE10> select constraint_name,constraint_type,table_name,search_condition from user_constraints where table_name='Z';
    CONSTRAINT_NAME                C TABLE_NAME                     SEARCH_CONDITION
    PK_Z                           P Z
    LEGATTI@ORACLE10> desc z
    Name                                      Null?    Type
    ID                                        NOT NULL NUMBERCheers
    Legatti

  • NOT NULL Unique Constraint in Data Modeler

    I've created Unique Constraints in the Relational Model and I'm trying to figure out how to make it a NOT NULL constraint.
    Let's say the table name is category with columns cat_id, cat_name, sort.
    In SQL I create "ALTER TABLE category MODIFY (category CONSTRAINT xxx_cat_name_nn NOT NULL);", but inside the modeler there is no data entry points in the [Unique Key Properties - xxx_cat_name_nn] dialog box, that I can find, that lets me tell it that it is a NOT NULL constraint. I'm sure there is a way but I'm just fall over my own feet trying to find it.
    Any help would be greatly appricated.
    Edited by: 991065 on Feb 28, 2013 1:40 PM

    Hi,
    You can make the column NOT NULL by unsetting the "Allow Nulls" property for the Column.
    If you want a named NOT NULL Constraint, you should also set the "Not Null Constraint Name" property (on the Default and Constraint tab of the Column Properties dialog).
    David

Maybe you are looking for

  • Floppy Disk Trouble

    I can't seem to get my floppy disk to work correctly.  The light seems to stay on.  I've tried putting a disk in slowly, no force, and the light still stays on...  I tried going to my computer and clicking on drive A and waiting till it asked to inse

  • External drive - USB or Fire wire or AC

    Hello I dont know where to put this question so: Which would be the best for a 500GB external drive, USB & fire wire or AC? I want a portable external drive (2.5) but am not sure whether AC is best route or if USB/Fire wire? Thank you Veedeekay

  • MacBook Pro late'08 Hinge rubbing

    Folks, I notice today soemthing really strange that on the right hand side of my laptop while the lid is open (near the power button side) in the insdie corner hinge i have something deep scratch line there and looks like when i close and open lid it

  • Sharepoint2013 Stop asking for UserName and Password

    Hi, I have Installed New sharePoint2013 Server , I face Issue that Sharepoint Site keep asking for UserName and Password aeach Time. I set as  windows authentication in both IIS and Central Administration , and I configure The IE and I set Automatic

  • 2011 MBP won't re-install Lion

    Hi - I've tried following the helpful instructions I received here: https://discussions.apple.com/message/18816289?ac_cid=op123456#18816289 I was able to erase my drive, but when I attempt to re-install OS X Lion, I get a dialog box with a spinning w