This discussion is archived
5 Replies Latest reply: Oct 15, 2013 6:45 AM by Senkum RSS

How to generate ALTER script if Relational Model is not retrofitted from any DB schema

user11141303 Newbie
Currently Being Moderated

I am using Data Modeler of Oracle SQL Developer Version 3.2.20.09.

I have created a new Logical and Relational Model.


Questions:

1. How to attach my rational design to a DB schema, so that i can generate ALTER scripts.

2. Why 'Synchronize Model with Data Dictionary' and  'Synchronize Data Dictionary with Model' is not working for me. It does nothing when i press it.

3. Can I map my relational model with more than one schema ? If yes, where to provide DB schema Login details.

 

Regards

  • 1. Re: How to generate ALTER script if Relational Model is not retrofitted from any DB schema
    Philip Stoyanov Guru
    Currently Being Moderated

    Hi,

     

    1. How to attach my rational design to a DB schema, so that i can generate ALTER scripts.

    You can attach model to connection by importing at least one table. Even without such "attachment" you can compare model to database using "Import from data dictionary" wizard - use 'swap target" if you want to alter database.

    2. Why 'Synchronize Model with Data Dictionary' and  'Synchronize Data Dictionary with Model' is not working for me. It does nothing when i press it.

    "Synchronize .." functionality synchronize the model with database presented by connections you used to import your objects. If you model is not built using import from database then sync functionality won't do anything.

    3. Can I map my relational model with more than one schema ? If yes, where to provide DB schema Login details.

    Yes, there is no limit on that. The only limit is that you can synchronize using only one connection at a time.

     

    Philip

  • 2. Re: How to generate ALTER script if Relational Model is not retrofitted from any DB schema
    Senkum Newbie
    Currently Being Moderated

    Hi:

     

    I tried to retrofit a database by following the process described above.  When the import is complete, it showed me the "Compare Models" dialog.  However, when I clicked the "DDL Preview" button it didn't show anything.  The changes are, in fact, quite large as the database was synced with the model a while ago.  It shows the "ALTER" statements if I select only a few individual tables.  Is this a bug where it can't handle a huge number of changes?  Or, is it working in the background to produce the alter statements?  My version is Data Modeler 3.3.0

     

    Any help is greatly appreciated.

     

    Thanks,

    Senthil

  • 3. Re: How to generate ALTER script if Relational Model is not retrofitted from any DB schema
    David Last Expert
    Currently Being Moderated

    Hi Senthil,

     

    Were any error messages written to your log file when you requested the DDL Preview?

    (The log file is normally file datamodeler.log in folder datamodeler\datamodeler\log.)

     

    David

  • 4. Re: How to generate ALTER script if Relational Model is not retrofitted from any DB schema
    Senkum Newbie
    Currently Being Moderated

    Hi David:

     

    There were no errors in the log file.  However, I found the issue why it was not generating the alter statements in the DDL preview.  Initially, I reverse engineered the model from the DEV database along with all 6 related application schemas.  This application is still under development which is scheduled to go to production soon.  When I did the comparison yesterday with the pre-prod database, I chose only the main schema.  This morning, I included all 6 six schemes in the model for comparison and it displayed the alter statements to sync the pre-prod database.  Not sure if this is a bug.  But, it would be nice if the tool has an option to compare/filter only the interested schema when synchronizing with the target database.

     

    Thanks,

    Senthil

  • 5. Re: How to generate ALTER script if Relational Model is not retrofitted from any DB schema
    Senkum Newbie
    Currently Being Moderated

    David:

     

    FYI, I just downloaded the EA 4.0.0.825 and generated a new model from the DEV environment.  I did the comparison and now I see this filter option in the DDL preview window, presented as a separate tab.  I filtered all tables for the desired schema and it generated the change code.  This is fantastic!!!  This is what I was looking for previously.

     

    Thanks,

    Senthil

Legend

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