Sql datamodeler: DDL Generation

Hello
Can anybody explain the difference between advanced interactive DDL and advanced CL DDL?
regards Erik

Erik,
they should do the same job, difference is explained at the beginning of scripts (see below) - interactive v. command line parameters. The second option is oriented to be executed by other tools.
Best regards,
Philip
-- ODM advanced script with support for
-- interactive (SQL/Plus or SQLDeveloper)
-- settings of input parameters for:
-- start step, stop step, log file and log level (1,2 or 3)
=========================
-- ODM advanced script with support for
-- command line (SQL/Plus only)
-- settings of input parameters for:
-- start step, stop step, log file and log level (1,2 or 3)
-- The script can be executed as follows (all parameters are required):
-- sqlplus user/passw@name @script_name start_step stop_st log_file log_level
-- Examples:
-- sqlplus scott/tiger@orcl @e:\adv_script.sql 0 0 e:\adv_script.log 2
--

Similar Messages

  • SQL Datamodeler ddl generation looses foreign keys

    My problem is that when I open my relational model, I select generate of DDL selection Oracle 10g as the physical. I can see the list of referential contraints under the Foreign Key tab. I generate once and all is fine, save the model and exit. I then restart the model and go through the same procedure. This time I can still see the entries under foreign keys tab but when I generate there are no foreign key entries. If I select 11g on the generate then they re-appear. Save it and go back in, select 11g and generate and they have gone again. Select 10g and generate and they are back.
    This means I cannot use the physical model attributes (users, synonyms etc) because I keep jumping from 10g to 11g generation models.
    Any ideas?
    Sql Modeler 2.0.0. build 584.

    Hi,
    I've got exactly this behaviour - and the exact same workaround to fix it. i.e. Save, change Physical to 11g and save again.
    Re-open, won't generate some physical parts correctly i.e. fk constraints.
    Swap to 10g and regenerate fine.
    You may have to import some fks manually from a DDL file into the physical model to make this happen? Modelled ones seem to work?
    If there a switch variable in the DM code gone awry?
    Nigel

  • DDL Generation not working

    Hi all,
    for some strange reason the DDL generation has stopped working. See below. The physical model is definitely selected and also all the objects in it.
    Any suggestions?
    Thanks and regards, Garry
    -- Generated by Oracle SQL Developer Data Modeler 3.1.0.687
    -- at: 2012-05-02 16:00:12 CDT
    -- site: Oracle Database 11g
    -- type: Oracle Database 11g
    -- Oracle SQL Developer Data Modeler Summary Report:
    -- CREATE TABLE 0
    -- CREATE INDEX 0
    -- ALTER TABLE 0
    -- CREATE VIEW 0
    -- CREATE PACKAGE 0
    -- CREATE PACKAGE BODY 0
    -- CREATE PROCEDURE 0
    -- CREATE FUNCTION 0
    -- CREATE TRIGGER 0
    -- ALTER TRIGGER 0
    -- CREATE STRUCTURED TYPE 0
    -- CREATE COLLECTION TYPE 0
    -- CREATE CLUSTER 0
    -- CREATE CONTEXT 0
    -- CREATE DATABASE 0
    -- CREATE DIMENSION 0
    -- CREATE DIRECTORY 0
    -- CREATE DISK GROUP 0
    -- CREATE ROLE 0
    -- CREATE ROLLBACK SEGMENT 0
    -- CREATE SEQUENCE 0
    -- CREATE MATERIALIZED VIEW 0
    -- CREATE SYNONYM 0
    -- CREATE TABLESPACE 0
    -- CREATE USER 0
    -- DROP TABLESPACE 0
    -- DROP DATABASE 0
    -- ERRORS 0
    -- WARNINGS 0

    Hi Garry,
    This could be because you asked it not to generate objects on a previous DDL Generation. When you do your DDL Generation, a "DDL Generation Options" panel is displayed. This has various tabs (Tables, PK and UK Constraints, etc.). I suggest you open these tabs and check that the "Selected" tick-boxes for the relevant objects are set.
    If this doesn't help, please can you check whether there are any relevant error messages in your log file (this is normally the file datamodeler.log in the folder datamodeler\datamodeler\log).
    David

  • DDL generation - sequence of views

    Hello,
    I'm using several cascading database views. After DDL generation the sequence of the views in the script is not correct for database creation, so the script has to be adjusted before running.
    Is there are way to define dependencies between views as a hint for DDL generation?
    Regards Dirk

    Hi David,
    my Datamodeler version is 3.1.2.704.
    In a simple test with 1 table and 3 cascading views it worked for an Oracle generation, but I use SQLServer and SQLServer (2000 and 2005) DDL generation uses alphabetical order of view names.
    It is the same with the new 3.3.0.734 version.
    On the other hand some of the SQLServer views loaded into the model from data dictionary are too complex to be opened by the query editor, so dependencies may not be recognized.
    So I hoped a manual hint would be possible.
    Regards Dirk

  • SQL Datamodeling: importing sql

    Hello,
    I'm importing a ddl file to sql datamodeler. Columns, pks and uks are imported ok but the foreign keys are not imported allthough they are in the script.
    The script was created from sql developer.
    fragment:
    CREATE TABLE "DARWIN"."DUS_ALLOCATIES"
    (     "ID" NUMBER NOT NULL ENABLE,
         "PSN_ID" NUMBER,
         "ODT_ID" NUMBER NOT NULL ENABLE,
         "STARTDATUM" DATE NOT NULL ENABLE,
         "EINDDATUM" DATE,
         "UURTARIEF" NUMBER(6,2) NOT NULL ENABLE,
         "AFSPRAKEN" VARCHAR2(4000 BYTE),
         "OPMERKINGEN" VARCHAR2(100 BYTE),
         "INZET_PERCENTAGE" NUMBER(5,2) DEFAULT 100,
         CONSTRAINT "ALC_PK" PRIMARY KEY ("ID"))
         CONSTRAINT "ALC_PSN_FK1" FOREIGN KEY ("PSN_ID")
         REFERENCES "DARWIN"."DUS_PERSONEN" ("ID") ENABLE,
         CONSTRAINT "ALC_ODT_FK1" FOREIGN KEY ("ODT_ID")
         REFERENCES "DARWIN"."DUS_OPDRACHTEN" ("ID") ENABLE
    Regards Erik

    ArnoldH wrote:
    Hi Philip,
    Could you expand a bit on your reply? Do you mean the import will work in the current release if the quotes are stripped off? Do you mean that the next release will work with the quotes? (What about without the quotes too? As the normal output for DBMS_METADATA.GET_DDL is quoted ("owner"."object"), will the next release work with either? I hope so.)
    Thanks,Hi Arnold,
    on your questions - yes, yes (yes,yes).
    In current published release - it should work without quotes. With quotes, obviously it doesn't work when definition of foreign keys are embedded in "create table" statement. It's fixed and should work in next published release. I use should because parsing of scripts always can be surprising.
    Philip

  • Ddl-generation error

    Hello, i'm having a very strange error during ddl-generation, i'm using Netbeans 5.5, Glassfish V2 and Mysql 5.0.26. Toplink bug?
    JDO76609: Got SQLException executing statement "ALTER TABLE ana_ute DROP FOREIGN KEY UNQ_ana_ute_0": java.sql.SQLException: Error on rename of './lbdb_test/ana_ute' to './lbdb_test/#sql2-11af-1e' (errno: 152)

    probably i found the problem...
    Toplink generate this:
    ALTER TABLE ana_ute DROP FOREIGN KEY UNQ_ana_ute_0;
    but with Mysql the correct command is:
    ALTER TABLE ana_ute DROP KEY UNQ_ana_ute_0;
    This problem is only for the Unique Key.

  • DDL Generation/Conversion Tools

    I am looking for a DDL generation tool, preferably command line, that can convert DDL of one RDBMS to another - say DDL of Oracle schema/table to MySQL/SQL Server & vice-versa. I have reviewed Oracle's SQL Developer - its DDL generation is one way MySQL to Oracle, SQL Server to Oracle etc.
    I would prefer a general-purpose DDL conversion tool/utility if one exists! Also, is there a way to use GGs DDLGEN for this ? I have explored this a bit but it seems all conversions are from Tandem DDL to DDL of various RDBMS.
    Thanks,
    Satish

    Satish,
    You can use DDLGEN to perform some basic DDL between systems but you'll likely need to make modifications to the .tpl file. Otherwise you may want to look into some other paid tools on the market.
    Good luck,
    -joe

  • Toplink.ddl-generation doesn't seem to be working

    I can't get my project to persist. Why is this?
    I have a skeleton project using JSF2, EJB3, Glassfish3, JPA/toplink, Helios. When I run the deployed project, I get this error:
    +Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException+
    Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test.bar' doesn't exist
    Error Code: 1146
    A blank DB called test exists on mySQL
    I have a connection pool in glassfish with a URL=jdbc:mysql://localhost:3306/test
    user=root, pass=root
    A mySQL connector jar exists in $glassfishHome/glassfish/lib
    My code is as follows:
    newBook.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
         <title>Creates a new book</title>
    </h:head>
    <h:body>
         <h1>Create a new book</h1>
         <hr />
         <h:form>
              <h:panelGrid columns="2">
                   <h:outputLabel value="ISBN : " />
                   <h:inputText value="#{bookController.book.isbn}" />
                   <h:outputLabel value="Title :" />
                   <h:inputText value="#{bookController.book.title}" />
                   <h:outputLabel value="Price : " />
                   <h:inputText value="#{bookController.book.price}" />
                   <h:outputLabel value="Description : " />
                   <h:inputTextarea value="#{bookController.book.description}" cols="20"
                        rows="5" />
                   <h:outputLabel value="Number of pages : " />
                   <h:inputText value="#{bookController.book.nbOfPage}" />
                   <h:outputLabel value="Illustrations : " />
                   <h:selectBooleanCheckbox value="#{bookController.book.illustrations}" />
              </h:panelGrid>
              <h:commandButton value="Create a book"
                   action="#{bookController.doCreateBook}" />
         </h:form>
         <hr />
         <i>APress - Beginning Java EE 6</i>
    </h:body>
    </html>
    BookController.java
    package controllers;
    import java.util.ArrayList;
    import java.util.List;
    import javax.ejb.EJB;
    import javax.faces.bean.ManagedBean;
    import javax.faces.bean.RequestScoped;
    import ejb.BookEJB;
    import entities.Book;
    @ManagedBean
    @RequestScoped
    public class BookController {
         @EJB
         private BookEJB bookEJB;
         private Book book = new Book();
         private List<Book> bookList = new ArrayList<Book>();
         public String doCreateBook() {
              book = bookEJB.createBook(book);
              bookList = bookEJB.findBooks();
              return "listBooks.xhtml";
         public BookController() {
         public BookEJB getBookEJB() {
              return bookEJB;
         public void setBookEJB(BookEJB bookEJB) {
              this.bookEJB = bookEJB;
         public Book getBook() {
              return book;
         public void setBook(Book book) {
              this.book = book;
         public List<Book> getBookList() {
              return bookList;
         public void setBookList(List<Book> bookList) {
              this.bookList = bookList;
    BookEJB.java
    package ejb;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import javax.persistence.TypedQuery;
    import entities.Book;
    @Stateless
    public class BookEJB {
         @PersistenceContext(unitName = "jdbc/test") //java:comp/env/jdbc/
         private EntityManager em;
         public List<Book> findBooks() {
              TypedQuery<Book> query = em
                        .createNamedQuery("findAllBooks", Book.class);
              return query.getResultList();
         public Book createBook(Book book) {
              em.persist(book);
              return book;
    Book.java
    package entities;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    @Table(name="bar")
    @Entity
    @NamedQuery(name = "findAllBooks", query = "SELECT b FROM Book b")
    public class Book {
         @Id
         @GeneratedValue(strategy=GenerationType.IDENTITY)
         private Long id;
         @Column(nullable = false)
         private String title;
         private Float price;
         @Column(length = 2000)
         private String description;
         private String isbn;
         private Integer nbOfPage;
         private Boolean illustrations;
         public Book() {
         public Long getId() {
              return id;
         public void setId(Long id) {
              this.id = id;
         public String getTitle() {
              return title;
         public void setTitle(String title) {
              this.title = title;
         public Float getPrice() {
              return price;
         public void setPrice(Float price) {
              this.price = price;
         public String getDescription() {
              return description;
         public void setDescription(String description) {
              this.description = description;
         public String getIsbn() {
              return isbn;
         public void setIsbn(String isbn) {
              this.isbn = isbn;
         public Integer getNbOfPage() {
              return nbOfPage;
         public void setNbOfPage(Integer nbOfPage) {
              this.nbOfPage = nbOfPage;
         public Boolean getIllustrations() {
              return illustrations;
         public void setIllustrations(Boolean illustrations) {
              this.illustrations = illustrations;
    persistence.xml (located under src/META-INF)
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="2.0"
         xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
         <persistence-unit name="jdbc/test">
              <jta-data-source>jdbc/test</jta-data-source>
              <class>entities.Book</class>
              <properties>
                   <property name="toplink.ddl-generation" value="drop-and-create-tables"></property>
                   <property name="toplink.ddl-generation.output-mode" value="database"></property>
                   <property name="toplink.logging.level" value="finest"/>
                   <property name="toplink.logging.logger" value="DefaultLogger"/>
                   <property name="toplink.jdbc.user" value="root"/>
                   <property name="toplink.jdbc.password" value="root"/>
              </properties>
         </persistence-unit>
    </persistence>

    It seems that Glassfish 3 uses eclipseLink as a default and not TopLink. I've reconfigured using eclipseLink.

  • SQL datamodeler: No repository?

    Hello
    I thought that the production version of SQL Datamodeler would contain a repository. In fact it was one of the question on the faq on the sql developer data modeler home page
    (http://www.oracle.com/technology/products/database/datamodeler/html/datamodelerfaq.html#repository)
    How are the models currently stored and will there be a repository?
    SQL Developer Data Modeler stores each model in a standard directory with the model name as directory name with an additional main header file using the model_name.xml. You can store models locally or on a central file server. Many early adopter customers have successfully used open source version tools such as Subversion, to keep their models under source code control.
    Currently the Repository is under development. Models will be stored in a standard relational Oracle database.
    Are there still plans to use a repository ? I think osdm is a great product but I personally think you need a repository to make it a multi-user datamodeling tool.
    Regards Erik

    Yes, we plan to support both.
    Erik,
    You make my point exactly: Like many users you say you want a database repository for a multi-user environment, but now you say "In that case we could create productivity boosters and quality checks using pl/sql." What do you want here? This is different. The tool provides a full Design Rules section for quality checks and you can use the reporting repository for additional reports.
    Today, the production release of the Data Modeler supports a reporting repository.
    1. Take any design and select the export option to export it to the reporting repository.
    2. The export dialog is a connection dialog.
    3. If you have never exported the design before, the tables required will be created for you in the schema you provide. -We recommend you create a new schema for this purpose - Subsequent exports will be added to the same repository, unless directed.
    You can now import the provided reports into SQL Developer and run these reports about your design. Because it's just a schema in the database, you can use SQL Developer to browse the tables and add your own reports.
    There is a full tutorial on this on the [ Data Modeler|http://www.oracle.com/technology/products/database/datamodeler/index.html] site.
    Sue

  • Sql datamodeler: Design rules

    Hello,
    In sql datamodeler you can check your design against a number of design rules.
    Is there a way you can influence these design rules?
    - can you say wheter a design rule is applicable or not?
    - can you change the severity?
    - can you change the rule (for instance other naming convention rules)
    Regards Erik

    Not at this stage. We want to allow users to modify them in the future. There are ways you can influence some of these. So on the Model Properties dialog their are Naming Options. If you change these, you can influence the design rules. Also, in the General Options there is a naming Standards section. So you can set naming standards here and these are used in conjunction with the Designer Rules.
    I'm working on a document about all the naming standards and design rules and how they are used. It's not yet available, but I'll put it onto the Data Modeling page when it's ready.
    Sue

  • Designer10g R2 Design Capture of SQL Server DDL file Failed

    I have been using Designer 10g R2 to design capture Oracle Database Schema into the Server Model Diagram with no problems at all.
    I have a SQL Server 2005 exported DDL file into an ASCII text file. I then import the DDL script into the Server Model Diagram but ERRORs.
    I use SQL Server 2005 to import the DDL script and then create an ODBC to connect to the SQL Server. I can then design capture the SQL Server schema into Designer.
    What has gone wrong? Does Designer 10g R2 support design capture from SQL Server DDL file directly to Designer?
    By the way, if I want to generate MySQL DDL script or design capture MySQL DDL script into Designer, how could this be done as there is no ODBC driver for MySQL?

    Hello,
    Please see the following links:
    http://social.msdn.microsoft.com/Forums/en-US/sqlsetupandupgrade/thread/df35f9f5-9c52-4ec4-8f5a-03a8dbef4352/
    http://social.msdn.microsoft.com/forums/en-US/sqlsetupandupgrade/thread/e8e27857-7bb7-46a2-af9b-25e397b37374/
    http://ask.sqlservercentral.com/questions/3582/sqlbol-cab-is-corrupt-and-cannot-be-used-in-sql-server-2005
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Problem with materialized views DDL generation

    Hi, there is no check box in the *'Drop' Selection* tab for materialized views so no option to drop this objet type. It does drop the corresponding table but not the MV. Is there another way to automatically drop this type of object when generating DDL ??? More on, I have created a primary key for the same MV, based on two fields , checked the Generate check box but the command is not included in the DDL. Is this a known issue ???
    Thanks.
    Edited by: Gordrien on 2011-06-21 10:04

    Hi Gordrien,
    More on, I have created a primary key for the same MV, based on two fields , checked the Generate check box but the command is not included in the DDLCan you elaborate on that. It's not clear what you are doing and what you are expecting as result in DDL generation.
    Philip

  • Modify SQL#4 and SQL#5 DDL Model Defaults

    Hi,
    on FSCM 9.1 , tools 52.0 on Win 2008 server;
    to force statistics gathering in AE we should  do :
    6. Modify SQL#4 and SQL#5 DDL Model Defaults for Oracle Platform to enable option force when updating
    Recommended in :
    RED_PAPER_-_PeopleSoft_Enterprise_Performance_on_Oracle_11g_Database.pdf
    Can you be kind and  tell us how to find them (SQL#4) ?
    Thank you.

    The DDL models are under
    PeopleTools > Utilities > Administration > DDL Model Defaults
    Select the Oracle platform from the search, and you should get a scroll with 5 rows. Rows 4 and 5 should begin with  DBMS_STATS.GATHER_TABLE_STATS
    You can also consider downloading the following tool from Oracle Support:
    pscbo_stats - Improving Statistics in Oracle RDBMS for PeopleSoft Enterprise [ID 1322888.1]
    See PeopleSoft Database Update Statistics for more information.
    Regards,
    Bob

  • Toplink DDL-generation has no delimiter

    Toplink creates DDL scripts without terminating the SQL statements with a delimiter. In the case when you are using, say, a maven sql plugin that relies on the ANT SQL task that expects at least a default delimiter of ';' what can we do with those generated scripts? Was this a conscious choice? If not, anyone have an idea how we might at least define a default delimiter for these generated files? Parsing fthe files after generation to add a delimiter is a PITA. :)
    Thanks!

    Toplink creates DDL scripts without terminating the SQL statements with a delimiter. In the case when you are using, say, a maven sql plugin that relies on the ANT SQL task that expects at least a default delimiter of ';' what can we do with those generated scripts? Was this a conscious choice? If not, anyone have an idea how we might at least define a default delimiter for these generated files? Parsing fthe files after generation to add a delimiter is a PITA. :)
    Thanks!

  • Preferences in Sql Datamodeler are not saved

    Hello all,
    I seem to do something wrong: I would like to change certain preferences, but they SDM does not save their status.
    As soon as I open the preference menu option again, the preferences are in their previous state.
    Saving the complete design (before anything else) does not make a difference.
    This is what i did:
    Click Tools/Preferences menu
    In my case all the perferences are in the Checked state
    I can UNcheck the preferences under:
    data modeler / model logical / relation cadinality: Source optional and Target optional
    data modeler / model logical / primary key option for identifying relationships Use and set first Unique key as Primary Key
    data modeler / model logical / FK Attribute name synchronisation: Keep as the name of the Originating attribute..
    Then press the "OK" button
    and then save the Design by File/Save
    and subsequently closing SDM.
    When starting SDM again and opening the same model, the preferences are in their previous (checked) state.
    Can someone tell me if this is a real bug or point out what I am doing wrong?
    Thanks in advance for your time and effort
    regards
    Wouter
    win 7
    Java 1.6.0_31
    SDM 3.1.0.700 (32 Bits)

    Hi Dimitar,
    Well,.. I have found the file : product-preferenxce.xml on my disk in
    <snip>..AppData\Roaming\Oracle SQL Developer Data Modeler\system3.1.0.700\o.datamodeler
    I have tried the same recipe as before. Now this is what happens:
    After changing the preferences and as soon as I have pressed OK (without leaving DM) I open the product-preferences file
    The OS-timestamp of the file matches the moment of saving so permissions on OS level seem no problem.
    In the file at line 504 to 510 I find:
    <hash n="OSDDM_ModelLogicalPP">
    <value n="keep_fk_names_syncronized" v="false"/>
    <value n="pk_identifying_relation" v="false"/>
    <value n="source_optional" v="false"/>
    <value n="target_optional" v="false"/>
    </hash>
    To me, that looks like the preferences are Unchecked.
    Now I close DM (no saving). The file's timestamp is still unchanged. and the preferences are still all "false"
    Next I open DM and read the preferences file: timstamp unchanged and preferences unchanged.
    When I open the Tools/Preference menu and look at Datamodeler/model/logical
    The preferences are checked again...
    As soon as I push the "OK" button the preferences file gets updated and the preferences read as follws:
    <hash n="OSDDM_ModelLogicalPP">
    <value n="keep_fk_names_syncronized" v="true"/>
    <value n="pk_identifying_relation" v="true"/>
    <value n="source_optional" v="true"/>
    <value n="target_optional" v="true"/>
    </hash>
    It still baffles me, but it does look like "opening the tools/preferences menu" resets the preferences.
    Can you make any sense of this story?
    regards
    Wouter
    (and again thx for your time and effort)

Maybe you are looking for

  • How to get list of PO pending for approval with a Particular Approver

    Hi Experts, I have created a Workflow for PO Approval. So when a PO is created the Approver is notified via an emaill. This is working fine. But now in the mail i have to send the list of Purchase Orders that are pending for approval with that Approv

  • How can I switch tabs direction?

    I need to know how can I change the direction of the tabs?

  • Dbus hanging at startup, nss_ldap and pam_ldap to blame?

    https://bbs.archlinux.org/viewtopic.php?id=104114 This post is about the same problem I'm having, but I don't really like the solution. I'm running an arch box that is authenticating users through and Windows domain using ldap and kerberos, I know I

  • Loose hinge on 30" ACD

    Hi, I just opened up my brand new 30" ACD. I noticed that the foam packing was broken on one side, indicating that it had been handled a bit roughly in shipping. However, the display seems to be OK. The only problem is the hinge on the stand. My olde

  • How can I create my own refernce type?

    I would like to create my own reference type. Like it has been done in the Configuration File VIs, provided by NI in the default LabVIEW Utility Config.llb. The reference for the refnum is based on a Enum type. I would like to create something simila