Cascade delete in container or database schema?

I am creating a database schema which I want to map EJB CMP Entity Beans onto. There are a number of relationships in the schema where I want to cascade deletion if a parent record is deleted and a number of relationships where I want to prevent deletion of parent records if child records exist for the relationship.
I am wondering whether it is better to implement this in the database schema (Oracle) or in the container (JBoss 3.2.2)? I believe it is possible to implement cascading delete in the container but I am not sure about preventing delete in the container? Is there a way I could do it programmatically? I want to use CMP though so I'm not sure there would be much scope for that.
Are there any rules as to which approach is better? Will the container have a problem if I implement it in the database schema? Obviously the ejbRemove may throw an exception if I prevent deletion in a relationship but that is fine. I believe it is not a good idea to implement it in both the container and schema as there will be a conflict when they both try to delete records.
Thanks.

Container's cascade-deleting in jboss(tm)3.2.x working properly with any scope:
This example with 1 scope:
    <relationships>
        <ejb-relation>
            <ejb-relation-name>Region-Town</ejb-relation-name>
            <ejb-relationship-role>
                <ejb-relationship-role-name>region-has-towns</ejb-relationship-role-name>
                <multiplicity>One</multiplicity>
                <relationship-role-source>
                    <ejb-name>RegionBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>regionTowns</cmr-field-name>
                    <cmr-field-type>java.util.Set</cmr-field-type>
                </cmr-field>
            </ejb-relationship-role>
            <ejb-relationship-role>
                <ejb-relationship-role-name>town-belongs-to-region</ejb-relationship-role-name>
                <multiplicity>Many</multiplicity> <cascade-delete/>
                <relationship-role-source>
                    <ejb-name>TownBean</ejb-name>
                </relationship-role-source>
                <cmr-field>
                    <cmr-field-name>region</cmr-field-name>
                </cmr-field>
            </ejb-relationship-role>
        </ejb-relation>
    </relationships>

Similar Messages

  • Db-cascade-delete for other databases than Oracle?

    I have two entity beans with a one to many relationship. The database designers have implemented a cascading delete between the two tables for the entity beans. How should the deployment descriptors be written for this to work properly? From what I understand I will need to use the <cascade-delete /> tag in ejb-jar.xml and <db-cascade-delete /> in weblogic-cmp-jar.xml. However this document http://e-docs.bea.com/wls/docs81/ejb/entity.html states that <db-cascade-delete /> only works for Oracle, and I'm using DB2. Does this mean that I have to remove the cascading delete in the database and only enable it in ejb-jar.xml, or will <db-cascade-delete /> work for other databases than Oracle?
    /Björn

    To get the certified answer I'd ask a tech support rep. Unofficially, if DB2 supports cascade delete then I would expect that the EJB container will work with that. There are issues surrounding certification of features against specific databases and I'm not up on all of these so I'd check with support.

  • Let the database doing cascade deletion for privateOwned relationship

    Hi,
    I have two tables: parent, child. I mapped the parent to child as a one-many private owned relationship. The child table have a foreign key reference back to parent table. The constraint is like this
    alter table child add constraint FK_CONSTRAINT foreign key (parentid) reference parent (parentid) on delete cascade;
    I would the cascade deletion is done by database (as it is "on delete cascade" in the constraint) rather by the toplink. (This is exactly what you will do when use JDBC. another reason is that if I let the TopLink do the cascade deletion, I got a deadlock! If I remove the cascade deletion from topLink, I do not have the deadlock).
    Is there anyway I can turn off the cascade deletion from topLink, but at the same side keep the private owned relationship(because it is indeed privately owned)?
    Any help is really appreciated.
    jason

    Setting a no-op sql solves the cascade deletion problem. However, if I really want to remove a child from the parently, I ends up using the same no-op sql. I can not delete child independently.

  • Weblogic 9.1, EJB 2.0, Oracle 9i: Cascade delete Error

    Hi All,
    I am facing an error with the cascade-delete facility in ejb2.0 with weblogic 9.1
    Assume that I have the following relation:
    <ejb-relation>
    <ejb-relation-name>TeacherEJB-StudentEJB</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>teacher-has-student
    </ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>TeacherEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>teacher</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>student-has-teacher
    </ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <cascade-delete/>
    <relationship-role-source>
    <ejb-name>StudentEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>student</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type><cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    Now when I have to delete one record from the DBSTUDENT table, what i do is the following:
    StudentHomeLocal.remove(studentModel.getStudentId());
    The above statement throws an SQLException staying it can't update TeacherID in DBSTUDENT (PK of DBTEACHER, FK in DBSTUDENT) with NULL.
    The same code is working perfectly well in Weblogic 8.
    I even tried deleting the local directly by the following statement:
    StudentLocal.remove();
    But this too doesn't work.
    I also tried by removing the <cascade-delete/> attribute from the ejb-jar.xml file and updating the 'on-delete cascade' option in the database, but this too did not work.
    There is another option of <db-cascade-delete> in weblogic-cmp-rdbms-jar.xml that I tried but this too did not work.
    In short, I have tried the following cases but to no avail:
    1. Mention cascade delete in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar and in the database.
    2. Mention nothing in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar but 'on cascade delete' mentioned in the database.
    3. Mention cascade delete in ejb-jar.xml and db-cascade-delete mentioned in weblogic-cmp-rdbms-jar.xml.jar and 'on cascade delete' in the database.
    4. Remove all cascade delete from the ejb-jar.xml,the weblogic-cmp-rdbms-jar.xml and from the database.
    Neither of the above work.
    Kindly help ASAP.
    Thanks in advance,
    Sachidanand.

    Hi All,
    I am facing an error with the cascade-delete facility in ejb2.0 with weblogic 9.1
    Assume that I have the following relation:
    <ejb-relation>
    <ejb-relation-name>TeacherEJB-StudentEJB</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>teacher-has-student
    </ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>TeacherEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>teacher</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>student-has-teacher
    </ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <cascade-delete/>
    <relationship-role-source>
    <ejb-name>StudentEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>student</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type><cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    Now when I have to delete one record from the DBSTUDENT table, what i do is the following:
    StudentHomeLocal.remove(studentModel.getStudentId());
    The above statement throws an SQLException staying it can't update TeacherID in DBSTUDENT (PK of DBTEACHER, FK in DBSTUDENT) with NULL.
    The same code is working perfectly well in Weblogic 8.
    I even tried deleting the local directly by the following statement:
    StudentLocal.remove();
    But this too doesn't work.
    I also tried by removing the <cascade-delete/> attribute from the ejb-jar.xml file and updating the 'on-delete cascade' option in the database, but this too did not work.
    There is another option of <db-cascade-delete> in weblogic-cmp-rdbms-jar.xml that I tried but this too did not work.
    In short, I have tried the following cases but to no avail:
    1. Mention cascade delete in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar and in the database.
    2. Mention nothing in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar but 'on cascade delete' mentioned in the database.
    3. Mention cascade delete in ejb-jar.xml and db-cascade-delete mentioned in weblogic-cmp-rdbms-jar.xml.jar and 'on cascade delete' in the database.
    4. Remove all cascade delete from the ejb-jar.xml,the weblogic-cmp-rdbms-jar.xml and from the database.
    Neither of the above work.
    Kindly help ASAP.
    Thanks in advance,
    Sachidanand.

  • Privately Owned and Cascade Delete in DB

    HI,
    What is the relationship between setting privately owned in Toplink vs creating a cascade delete in Oracle DB? If I've the cascade delete in DB then what is the advantage of setting the privately owned flag in toplink?
    Thanks

    If you only set the cascade delete option in the database, then TopLink will have no knowledge that the private object was deleted (or that it is private in general). This would mean that TopLink would not remove the private object from the cache or process it as have being deleted. In general this may not cause your app any direct issues if you never read the private object directly as it will eventually garbage collect from the cache.
    Making the relationship privately own in TopLink will also ensure the following:
    - If you replace the private object with another, or set it to null, TopLink will delete the old object on the update of the source. Cascade delete only works on deletion.
    - If the relationship is a 1-m and you remove an object from the collection it will be removed.
    - If you refresh the parent object, by default the child will also be refreshed.
    - If you merge the parent object, by default the child will also be merged.

  • Cascade Delete thru Cross-Reference Table?

    I'm setting up cascade delete rules in my database and I wonder if there's a way to cascade delete through a cross-reference table?
    I have a table: "projects" that can have many "tasks" (also a table). A "participation" table is the cross-reference between them and it holds other information about the relationship.
    So I know I can do a cascade delete so that the participations will get deleted when either the project or the task get deleted, but can I rig something so that when I delete a project all the participations and tasks get deleted?
    Quick answers are greatly appreciated,
    Janice

    I recommend you to post this topic as well here:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » SQL and PL/SQL
    Discussion of Oracle SQL and PL/SQL issues
    PL/SQL
    Joel Pérez

  • Database schema SCM does not contain the associated database objects

    I am getting the following error when i am trying to migrate the form to apex using application migration.
    "*Database schema SCM does not contain the associated database objects for the project, aafs.*
    *Ensure the database schema associated with the project contains the database objects associated with the uploaded Forms Module .XML file(s).* ".
    Actully i am having one schema which i named as SCM, and i have defined one table TT.
    I created one form test.fmb in which i used TT table.its compiled successfully.
    Then i generated the xml file using frmf2xml from fmb file. After that, I created the project in appication migration wizard in SCM schema.
    Project creattion is working fine.but when i m trying to create application,it is showing me above error.
    can any one help in solving this problem.

    Hi Hilary,
    Thanks for your response/feedback.
    1. The schema associated with the project does not contain the necessary objects Can you please verify that the schema associated with your Forms conversion project does in fact contain the objects associated with the uploaded files. Could you also verify that the object names referenced in the error message do not exist within the schema associated with your workspace. Ensure that the schema associated with the project contains the necessary database objects before proceeding to the generation phase of the conversion process.
    Ans:
    Yes it does contain the objects (See results from SQL query Commands below):
    SELECT MWRA_CONTRACT_NO, OLD_CONTRACT_NO FROM PROJECTS@CONTRACT_LX19.MWRA.NET
    ORDER BY MWRA_CONTRACT_NO
    000000569 551TA
    000000570 553TA
    000000575 560TA
    000000576 561TA
    000107888 502TA
    000108498 500TA
    000108502 503TA
    2. The block being converted contains buttons, which may have been incorrectly identified as database columns, and included in the original or enhanced query associated with your block This is a known issue ,bug 9827853, and a fix will be available in our upcoming 4.0.1 patch release. Some possible solutions to this issue are:
    -> delete the buttons before generating the XML
    -> delete the button tags from the XML
    -> add "DatabaseItem=No" for the button in the XML file before importing it in Apex.The button is excluded when creating the Application.
    Ans
    yes it does contain push buttons to transfer to another forms and these are defined as Non data base items. Parial XML code provided below:
    - <Item Name="REPORTS" FontSize="900" DirtyInfo="true" Height="188" XPosition="4409" FontName="Fixedsys" ForegroundColor="black" DatabaseItem="false" Width="948" CompressionQuality="None" YPosition="3709" FontSpacing="Normal" Label="REPORTS" BackColor="canvas" FillPattern="transparent" ShowHorizontalScrollbar="false" FontWeight="Medium" ShowVerticalScrollbar="false" FontStyle="Plain" ItemType="Push Button">
    <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="GO_BLOCK('REPORT_1');" />
    </Item>
    - <Item Name="TRACKHDR" FontSize="900" DirtyInfo="true" Height="188" XPosition="3409" FontName="Fixedsys" ForegroundColor="black" DatabaseItem="false" Width="948" CompressionQuality="None" YPosition="3709" FontSpacing="Normal" Label="TRACK" BackColor="canvas" FillPattern="transparent" ShowHorizontalScrollbar="false" FontWeight="Medium" ShowVerticalScrollbar="false" FontStyle="Plain" ItemType="Push Button">
    <Trigger Name="WHEN-BUTTON-PRESSED" TriggerText="GO_BLOCK('TRACKHDRS');" />
    </Item>
    - <Item Name="SUBAWRD" FontSize="900" DirtyInfo="true" Height="188" XPosition="2429" FontName="Fixedsys" ForegroundColor="black" DatabaseItem="false" Width="948" CompressionQuality="None" YPosition="3719" FontSpacing="Normal" Label="SUBAWARDS" BackColor="canvas" FillPattern="transparent" ShowHorizontalScrollbar="false" FontWeight="Medium" ShowVerticalScrollbar="false" FontStyle="Plain" ItemType="Push Button">
    3. If you are still experiencing issues, then please create a testcase on apex.oracle.com and update this thread with the workspace details so I can take a look.
    Test case details are given below. It was created per ORACLE for open Service Request Number 3-1938902931 on ORACLE Metalink.
    Workspace: contract4
    username: [email protected] (my email)
    Password: contract4
    Comments:
    For my migration/testing purpose a dabatase link and synonyms have been setup by our ORACLE DBA. Could this be causing this problem?
    Do we know when the fix 4.0.1 patch release will be available?
    Thanks for your help.
    Indra

  • EF database first cascades delete despite cascade is restricted in db and edmx setting End1/2 OnDelete = "None"

    We are developing with Visual Studio 2013, Entity Framework 5, Oracle DB 11 via ODP.NET managed driver.
    The edmx is generated/updated from database (database first). We generate POCO object using standard T4.
    We have 2 tables with a master-detail foreign key relation, one to many. The foreign key in database does _not_ allow cascade deletes, so when you delete master row via SQL, you get error " ... child record found ... ".
    The problem now is:
    In Entity Framework, when i delete a record from the master table, then EF also deletes all corresponding detail records from the detail table! The restriction of the foreign key in database is ignored.
    In edmx diagram, the properies End1 OnDelete / End2 OnDelete are set to "None", so i expect that on delete of a master row, EF should throw an error if detail rows exists.
    How can i disable the cascading of the delete?
    Here is the FK definition in edmx:
            <Association Name="USR_USER_ROLES_ROLES_FK">
              <End Role="USR_ROLES" Type="Self.USR_ROLES" Multiplicity="1" />
              <End Role="USR_USER_ROLES" Type="Self.USR_USER_ROLES" Multiplicity="*" />
              <ReferentialConstraint>
                <Principal Role="USR_ROLES">
                  <PropertyRef Name="GES" />
                  <PropertyRef Name="PROJ" />
                  <PropertyRef Name="ROLE_NAME" />
                </Principal>
                <Dependent Role="USR_USER_ROLES">
                  <PropertyRef Name="GES" />
                  <PropertyRef Name="PROJ" />
                  <PropertyRef Name="ROLE_NAME" />
                </Dependent>
              </ReferentialConstraint>
            </Association> 
     The delete of master row is done by calling:
    ivDbCtx.USR_Roles.Local.Remove(role); // ivDbCtx is the DbContext, USR_Roles is the collection, role is the POCO object to be deleted.
    Thank you very much for your help!
    Udo

    Hello,
    For issues regarding ODP.NET managed driver, I would suggest you posting to oracle entity framework forum:
    https://community.oracle.com/communications
    There are oracle entity framework expects who will help you better.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Virtual private database and cascade delete

    We can't secure rows deleted by cascade delete by vpd.
    User "A" have right to delete row "1" but don't have right to delete row "2".
    If user "A" delete row "1", database will delete also row "2" by cascade delete.
    Why it is possible to delete row "2"?

    Either of the two options (a policy that queries the base table or propagating the security columns to the child tables) should work.
    My preference from a data model standpoint would be to have a policy that queries the base table so that the security information can be maintained in exactly one place. But if your application is frequently querying the child tables without reference to the parent table, joining to the parent table, particularly if data volumes are such that an IN would be less than ideal, there may be performance issues to this approach.
    Copying the columns creates a potential data integrity problem-- if you change the security on a base table row, you may forget to change the security on all the child records. But that issue may not be significant if the security is essentially static once the rows are created. And it's definitely easier to tune.
    You may also want to create views that join the parent and child tables and grant users access to these views rather than to the child tables directly, which would allow you to have a single policy on the base table and get most of the benefits of the first option with less performance problems if data volumes make an IN less than ideal.
    Justin

  • Problem with cascade delete and remove bean

    I am working with two entity beans that map to two tables that have a foreign key relationship. Table B has a foreign key to A and in the database that foreign key is set for cascaded updates and cascaded deletes.
    The problem occurs when the the sytem first tries to remove bean 1 (mapped to table A) and then remove bean 2 (mapped to B) where bean 2 is associated with bean 1 with a foreign key relationship. The first remove works but then when it tries to remove bean 2 it throws a very ugly "CORBA TRANSACTION_ROLLEDBACK 9998" Maybe exception. My guess is that the reason is because bean 2's reocrd in the database was deleted when bean 1 was removed but the 'bean object' was not removed from the container.
    When I go into our Application Server and look at how it see's the tables, it show the wrong relationship. It shows a restrict delete and a restrict update realationship.
    My question is, am I wrong to think that this is a application server problem or a configuration problem? It seems to me that attempting to remove a non-existant record should not cause an error. It won't cause any SQL exceptions. Is this a flawed viewpoint? As a work around I made sure that the dependent records are deleted first but it kind of defeats the point of cascaded deletes.
    We have a limited number of support calls, should I use one or am I at fault here?

    If the database removes the record from the second
    table, why is the system trying to remove it once
    again? You should try to remove an entity from a
    single place, should it be the database or the
    application. Don't try to remove it twice.
    Regards,
    DimitarI could do this but it is a huge pain in my ass. The problem is that you might want to remove the dependent bean without removing it's parent. The object structure is a little questionable, I'll admit that. It is, as they say, the eleventh hour and I can't really change that now.
    The way this work is that the server gets a list of objects marked either as new, modified, or deleted. It then relates those changes back to the database.
    In this case we have two lists(which makes me realize where the class structure sucks.) In order to do what you suggest I would have to get all the deleted parent objects and then search all the deleted child objects for ones that have the parent's key in them.
    It would be prefferable to fix the class structure but again this is not an option.
    Anyone want to answer the question I asked?

  • Slow database/schema - network OK

    We have an arrangement at a users site that has an IIS web server connected to an Oracle database Schema. The ping (<1ms) and trace route between them are very healthy. The web server is OK too. Yet when the server reads and writes data to the database the process is very slow.
    We’ve even taken the web server out of the equation and got the DBA to run a small script that inserts and deletes data and captures some timings. The result is the read and write (Select, update and delete) take at least 200% longer than in most other environments we ran the same test in. All in all the bottle neck is the Oracle 9 server.
    The database server itself is supposed to be very powerful. Any suggestions?

    I don't think there is anything wrong with the Actual SQL of the application, under normal circumstances it is quite efficient, we have it running on several servers with no problems. The test script was devised to prove it wasn't the SQL of the application or the application server itself. It creates a table with two columns and using loops inserts, updates and deletes the data. The test table is index on the ID column.
    In using this test script on other servers the time it took to complete the operations was very quick except for this one Oracle 9 server. We understand the server is hosting serveral Oracle databases each containing several users and schemas also in the afternoons the time the operation takes can be even longer pointing towards some sort of load management issue.

  • Entity beans - cascade delete doesn't work

    Hi,
    Could anyone show me a working example where cascade delete implemented with EJB3 entity beans?
    If the database not created with cascade delete I can't do it..
    I use JDeveloper 10.1.3.0 and it's embedded OC4J and Oracle 8i database.
    My session bean doesn't catch any exception during remove an entity that has child entity. The exception will be thrown only at the end of the transaction, when the container calls the concrete SQL. And my client receives SQL exception: child record found.
    Why can I define: cascade={CascadeType.REMOVE} if the container doesn't check it and doesn't throw exception when I want to delete an entity that has childs?
    Thanks
    Kati

    Kati,
    The EJB3 support in 10.13.0 JDeveloper is a preview implementation released prior to the completion of the EJB3 specification. I do not believe the cascade functionality was complete for that preview. I would recommend either switching to the 10.1.3.1 preview or downloading and using TopLink Essentials, which is the compliant implementation of EJB3 Java Persistence API (JPA).
    http://otn.oracle.com/jpa
    Doug

  • Problem adding database schema , eroor : not connected

    Thank you for reading my post
    I download the demo sample from oracle soa web site . and i am trying to follow the tutorial to
    create the database schema, to make this step complete
    I create oracle_home and oracle_SID variables (Windows OS )
    then
    I open an sqlplus session (sys/pass as sysdba) and to make sure that i am
    connected i execute
    select * from V$database ;
    it works
    then i execute :
    select * from hr.jobx
    it works file.
    it mean that i am connected to database.
    but when i execute @build.sql i get the following errors , can some one help me ?
    i should say that after i execute the @build.sql i can not execute any command because it says that SP2-0640:Not connected
    SQL> @build.sql
    old   1: DROP USER &&1 CASCADE
    new   1: DROP USER SOADEMO CASCADE
    DROP USER SOADEMO CASCADE
    ERROR at line 1:
    ORA-01918: user 'SOADEMO' does not exist
    SP2-0734: unknown command beginning "DEFAULT TA..." - rest of line ignored.
    SP2-0734: unknown command beginning "TEMPORARY ..." - rest of line ignored.
    SP2-0734: unknown command beginning "QUOTA UNLI..." - rest of line ignored.
    SP2-0734: unknown command beginning ", create t..." - rest of line ignored.
    SP2-0734: unknown command beginning ", create p..." - rest of line ignored.
    SP2-0734: unknown command beginning ", create s..." - rest of line ignored.
    SP2-0734: unknown command beginning ", create t..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ", create v..." - rest of line ignored.
    SP2-0734: unknown command beginning ", create s..." - rest of line ignored.
    SP2-0734: unknown command beginning ", alter se..." - rest of line ignored.
    SP2-0734: unknown command beginning ", create t..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ", create m..." - rest of line ignored.
    SP2-0734: unknown command beginning ", query re..." - rest of line ignored.
    SP2-0734: unknown command beginning ", create d..." - rest of line ignored.
    SP2-0734: unknown command beginning ", create a..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ", alter us..." - rest of line ignored.
    SP2-0734: unknown command beginning ", resumabl..." - rest of line ignored.
    SP2-0734: unknown command beginning ", ALTER AN..." - rest of line ignored.
    SP2-0734: unknown command beginning ", DROP ANY..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ", LOCK ANY..." - rest of line ignored.
    SP2-0734: unknown command beginning ", CREATE A..." - rest of line ignored.
    SP2-0734: unknown command beginning ", SELECT A..." - rest of line ignored.
    SP2-0042: unknown command "TO &&1" - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    SP2-0734: unknown command beginning ", execute_..." - rest of line ignored.
    SP2-0042: unknown command "TO &&1" - rest of line ignored.
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    drop table 'ITEMS'
    SP2-0640: Not connected
    drop table 'ADDRESS'
    SP2-0640: Not connected
    drop table 'CUSTOMER'
    SP2-0640: Not connected
    drop table 'ORDERS'
    SP2-0640: Not connected
    drop table 'PRODUCT'
    SP2-0640: Not connected
    drop table 'CUSTOMER_ADDRESS'
    SP2-0640: Not connected
    drop sequence 'EJB_SEQ_ID_GEN'
    SP2-0640: Not connected
    drop sequence 'ADDRESS_EJB_SEQ_ID_GEN'
    SP2-0640: Not connected
    drop sequence 'ORDER_SEQ_ID_GEN'
    SP2-0640: Not connected
    drop table 'SSN'
    SP2-0640: Not connected
    SP2-0640: Not connected
    create table 'ITEMS'
    SP2-0640: Not connected
    create table 'ADDRESS'
    SP2-0640: Not connected
    create table 'CUSTOMER'
    SP2-0640: Not connected
    create table 'CUSTOMER_ADDRESS'
    SP2-0640: Not connected
    create table 'ORDERS'
    SP2-0640: Not connected
    create table 'PRODUCT'
    SP2-0640: Not connected
    create primary key constraint on 'ITEMS'
    SP2-0640: Not connected
    create primary key constraint on 'ADDRESS'
    SP2-0640: Not connected
    create primary key constraint on 'CUSTOMER'
    SP2-0640: Not connected
    create primary key constraint on 'ORDERS'
    SP2-0640: Not connected
    create primary key constraint on 'PRODUCT'
    SP2-0640: Not connected
    create foreign key constraint on 'ITEMS'
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    create foreign key constraint on 'ORDERS'
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    SP2-0640: Not connected
    What OBJECTS were created?
    SP2-0734: unknown command beginning ",object_na..." - rest of line ignored.
    SP2-0734: unknown command beginning "from       user..." - rest of line ignored.
    SP2-0734: unknown command beginning "order by 1..." - rest of line ignored.
    Are there any INVALID OBJECTS?
    SP2-0734: unknown command beginning ",object_na..." - rest of line ignored.
    SP2-0734: unknown command beginning "from       user..." - rest of line ignored.
    SP2-0734: unknown command beginning "where      sta..." - rest of line ignored.

    Hi
    I almost resolved the issue but i do not know whether it is a correct path that i used or not.
    i have made some changes in build.sql as follow :
    -i changed the schema name to HR , and its pass to HR_PASS
    -i comment schema creation command
    now it successfully executed.
    but i can not understand what was the problem.
    Thanks

  • Foreign keys on cascade delete rules are not migrated

    hello folks, i tried to migrate a database from sql server 2005 to oracle 10g express using SQL Developer 1.5.5 and noticed that the cascade delete option of the foreign keys was ignored by the tool.
    I'd like to know if it's a limitation of the tool or a bug. I have over 500 fks with such configuration and it would be simply impossible to manually configure every migrated fk in oracle.
    thanks all.

    Thanks,
    Already logged:
    Bug 7652822 - ON DELETE CASCADE IS LOST DURING MIGRATION
    -Turloch

  • Cascade deletes in kodo 3.0.1

    I'm trying to use the cascade delete option and am having problems.
    Here is my jdo file:
    <class name="RoomScene" objectid-class="RoomSceneId">
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="table"
    value="t_roomscene"/>
    <extension vendor-name="kodo" key="pk-column" value="id_i"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column"
    value="rowversion_i"/>
    </extension>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="id_i"/>
    </extension>
    </field>
    <field name="itemLinks">
    <collection element-type="ItemLink"/>
    <extension vendor-name="kodo" key="element-delete-action"
    value="cascade"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-many">
    <extension vendor-name="kodo" key="table"
    value="t_mapitemroomscene"/>
    <extension vendor-name="kodo" key="ref-column.id_i"
    value="roomscene_id_i"/>
    </extension>
    </field>
    </class>
    <class name="ItemLink" objectid-class="ItemLinkId">
    <extension vendor-name="kodo" key="jdbc-class-map" value="base">
    <extension vendor-name="kodo" key="table" value="t_mapitemroomscene"/>
    <extension vendor-name="kodo" key="pk-column" value="id_i"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column" value="rowversion_i"/>
    </extension>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="id_i"/>
    </extension>
    </field>
    <field name="item">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.id_vc" value="item_id_vc"/>
    </extension>
    </field>
    <field name="roomScene">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.id_i"
    value="roomscene_id_i"/>
    </extension>
    </field>
    <field name="linkText">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="linktext_vc"/>
    </extension>
    </field>
    </class>
    (each RoomScene has many ItemLinks)
    but when I delete my RoomScene object, I get the following exception:
    "kodo.util.FatalDataStoreException: ERROR: ExecUpdate: Fail to add
    null value in not null attribute roomscene_id_i {prepstmnt 2515391
    UPDATE t_mapitemroomscene SET roomscene_id_i = ? WHERE roomscene_id_i =
    ?} [code=0, state=null]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: ExecUpdate: Fail to
    add null value in not null attribute roomscene_id_i {prepstmnt 2515391
    UPDATE t_mapitemroomscene SET roomscene_id_i = ? WHERE roomscene_id_i =
    ?} [code=0, state=null]
    java.sql.SQLException: ERROR: ExecUpdate: Fail to add null value in
    not null attribute roomscene_id_i
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
    at
    kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:510)
    at
    kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl
    ..java:788)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerI
    mpl.java:644)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:
    416)
    at
    net.mastertile.www.room.action.RoomSceneDeleteAction.executeLogic(RoomSc
    eneDeleteAction.java:27)
    my kodo.properties file is like this:
    javax.jdo.PersistenceManagerFactoryClass:
    kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    javax.jdo.option.RetainValues: true
    javax.jdo.option.RestoreValues: true
    javax.jdo.option.Optimistic: true
    javax.jdo.option.NontransactionalWrite: false
    javax.jdo.option.NontransactionalRead: true
    javax.jdo.option.Multithreaded: false
    javax.jdo.option.MsWait: 5000
    javax.jdo.option.MinPool: 1
    javax.jdo.option.MaxPool: 200
    javax.jdo.option.IgnoreCache: true
    javax.jdo.option.ConnectionFactoryName=java:comp/env/jdbc/default
    javax.jdo.option.ConnectionFactory2Name=java:comp/env/jdbc/default
    kodo.LicenseKey=XXXXXXXXXXX
    kodo.jdbc.MappingFactory=metadata
    kodo.DataCache=false
    kodo.RemoteCommitProvider=sjvm
    kodo.FlushBeforeQueries=false
    kodo.jdbc.ForeignKeyConstraints=true
    kodo.jdbc.SequenceFactory: native
    kodo.jdbc.SchemaFactory: dynamic
    We are using postgresql.
    Thanks,
    Nathan

    Were the foreign keys generated in the database? You also may want to
    try using the *-dependent extensions.
    Nathan Voxland wrote:
    I'm trying to use the cascade delete option and am having problems.
    Here is my jdo file:
    <class name="RoomScene" objectid-class="RoomSceneId">
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="table"
    value="t_roomscene"/>
    <extension vendor-name="kodo" key="pk-column" value="id_i"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column"
    value="rowversion_i"/>
    </extension>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="id_i"/>
    </extension>
    </field>
    <field name="itemLinks">
    <collection element-type="ItemLink"/>
    <extension vendor-name="kodo" key="element-delete-action"
    value="cascade"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-many">
    <extension vendor-name="kodo" key="table"
    value="t_mapitemroomscene"/>
    <extension vendor-name="kodo" key="ref-column.id_i"
    value="roomscene_id_i"/>
    </extension>
    </field>
    </class>
    <class name="ItemLink" objectid-class="ItemLinkId">
    <extension vendor-name="kodo" key="jdbc-class-map" value="base">
    <extension vendor-name="kodo" key="table" value="t_mapitemroomscene"/>
    <extension vendor-name="kodo" key="pk-column" value="id_i"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column" value="rowversion_i"/>
    </extension>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="id_i"/>
    </extension>
    </field>
    <field name="item">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.id_vc" value="item_id_vc"/>
    </extension>
    </field>
    <field name="roomScene">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.id_i"
    value="roomscene_id_i"/>
    </extension>
    </field>
    <field name="linkText">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="linktext_vc"/>
    </extension>
    </field>
    </class>
    (each RoomScene has many ItemLinks)
    but when I delete my RoomScene object, I get the following exception:
    "kodo.util.FatalDataStoreException: ERROR: ExecUpdate: Fail to add
    null value in not null attribute roomscene_id_i {prepstmnt 2515391
    UPDATE t_mapitemroomscene SET roomscene_id_i = ? WHERE roomscene_id_i =
    ?} [code=0, state=null]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: ExecUpdate: Fail to
    add null value in not null attribute roomscene_id_i {prepstmnt 2515391
    UPDATE t_mapitemroomscene SET roomscene_id_i = ? WHERE roomscene_id_i =
    ?} [code=0, state=null]
    java.sql.SQLException: ERROR: ExecUpdate: Fail to add null value in
    not null attribute roomscene_id_i
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
    at
    kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:510)
    at
    kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl
    .java:788)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerI
    mpl.java:644)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:
    416)
    at
    net.mastertile.www.room.action.RoomSceneDeleteAction.executeLogic(RoomSc
    eneDeleteAction.java:27)
    my kodo.properties file is like this:
    javax.jdo.PersistenceManagerFactoryClass:
    kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    javax.jdo.option.RetainValues: true
    javax.jdo.option.RestoreValues: true
    javax.jdo.option.Optimistic: true
    javax.jdo.option.NontransactionalWrite: false
    javax.jdo.option.NontransactionalRead: true
    javax.jdo.option.Multithreaded: false
    javax.jdo.option.MsWait: 5000
    javax.jdo.option.MinPool: 1
    javax.jdo.option.MaxPool: 200
    javax.jdo.option.IgnoreCache: true
    javax.jdo.option.ConnectionFactoryName=java:comp/env/jdbc/default
    javax.jdo.option.ConnectionFactory2Name=java:comp/env/jdbc/default
    kodo.LicenseKey=XXXXXXXXXXX
    kodo.jdbc.MappingFactory=metadata
    kodo.DataCache=false
    kodo.RemoteCommitProvider=sjvm
    kodo.FlushBeforeQueries=false
    kodo.jdbc.ForeignKeyConstraints=true
    kodo.jdbc.SequenceFactory: native
    kodo.jdbc.SchemaFactory: dynamic
    We are using postgresql.
    Thanks,
    Nathan
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

Maybe you are looking for

  • Harman Kardon Sound Sticks Not Working

    Hi everybody. I have a Harman Kardon Sound Stick speaker system hooked up to my computer, and although the light is on, it is not working. When I go into System Preferences and click on Sound, it is not listed. Can someone please give me a few sugges

  • Uable to access active page / new to scripting (AS)

    tell application "Adobe InDesign CS5.5"     tell active document         make graphic line with properties {geometric bounds:{Watch2, Watch3, Watch4, Watch1}, flip:vertical, applied object style:"Crossout"}     end tell end tell Hi, i need to write a

  • Using spaces my bluetooth keyboard F3 (spaces?) shows just one application?

    I used spaces before upgrading to SL and I had it set so that when I put my mouse in one corner all of the windows shows the different spaces. There were times I would manually move the applications around in the windows I wanted. No matter what I tr

  • Some Adventures With Keywords

    I like many features of the Keyword system supplied with Aperture very much. But there are a few things which have been a little frustrating. * The way the autocompletion feature works in the "Add Keyword" field in the Control Bar makes it too easy t

  • Detect selected row/column in ALV when clicking my button

    Hello, I use the cl_salv_table to display my ALV. I have implemented some double click events an so one. But now I like to be able detect u201Cselected  row and coll when I press a button I my Application toolbar. How do I get the selected row/column