This discussion is archived
3 Replies Latest reply: Oct 9, 2013 1:06 AM by Philip Stoyanov RSS

Prompt generation

user11981457 Newbie
Currently Being Moderated

Hello,

 

We recently migrated from Oracle Designer to DataModeler and miss now the option to include prompts when generating ddl scripts in ODM. Is it possible to do that? Please help.

 

Thank you

Reinhard

  • 1. Re: Prompt generation
    Philip Stoyanov Guru
    Currently Being Moderated

    Hi Reinhard,

     

    what is the usage of those prompts?

     

    Philip

  • 2. Re: Prompt generation
    user11981457 Newbie
    Currently Being Moderated

    Hi Philip,

     

    We use a database deployment tool by HP. In case of errors the debugging is easier when having prompt messages.

     

    Reinhard

  • 3. Re: Prompt generation
    Philip Stoyanov Guru
    Currently Being Moderated

    Hi Reinhard,

     

    In case of errors the debugging is easier when having prompt messages

    then you can try to "Advanced DDL" option in DDL generation - it requires additional privileges  - they are described at the beginning of generated DDL.

    For prompt (at least for tables) you can use "Before create" script property to put PRMPT statement. Here is a transformation script that will set it for you:

     

    tables = model.getTableSet().toArray();
    for (var t = 0; t<tables.length;t++){
     table = tables[t];
     name = table.getName();
     bcreate = table.getBeforeCreate();
     table.setBeforeCreate("PROMPT create table "+name+";\n"+bcreate);
     table.setShouldGenerateScript(true);
     // set table as modified if want to save changes otherwise use the 
     //script before generating DDL
     table.setDirty(true);
    }

     

    You also can comment out table.setDirty(true); statement if you don't want PROMP to become as part of table definition. Then you need to run transformation before DDL generation. It's good model to be saved before that.

     

    Philip

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points