Forum Stats

  • 3,757,058 Users
  • 2,251,192 Discussions
  • 7,869,716 Comments

Discussions

Which is the right way of selecting a schema in DDL generated by Datamodeler?

M.Emmanuel
M.Emmanuel Member Posts: 304

I am using SQL Datamodeler to generate both ERD and DDL for Oracle 11g r2 (Oracle Application Express).

My generated DDL lacks a schema definition: which would be the best way to assign a given schema so created objects belong to the right schema?

I am later loading the DDL via SQL Developer connection.

Thanks,

Tagged:
M.Emmanuel

Best Answer

  • John Thorton
    John Thorton Member Posts: 14,493 Silver Crown
    edited Dec 25, 2016 8:21AM Accepted Answer
    M.Emmanuel wrote:I am using SQL Datamodeler to generate both ERD and DDL for Oracle 11g r2 (Oracle Application Express).My generated DDL lacks a schema definition: which would be the best way to assign a given schema so created objects belong to the right schema?I am later loading the DDL via SQL Developer connection.Thanks,

    The objects manipulated by the DDL will be owned by which ever USER executes the DDL.

    This is a benefit & not a problem which needs to be solved.

    M.Emmanuel

Answers

  • John Thorton
    John Thorton Member Posts: 14,493 Silver Crown
    edited Dec 25, 2016 8:21AM Accepted Answer
    M.Emmanuel wrote:I am using SQL Datamodeler to generate both ERD and DDL for Oracle 11g r2 (Oracle Application Express).My generated DDL lacks a schema definition: which would be the best way to assign a given schema so created objects belong to the right schema?I am later loading the DDL via SQL Developer connection.Thanks,

    The objects manipulated by the DDL will be owned by which ever USER executes the DDL.

    This is a benefit & not a problem which needs to be solved.

    M.Emmanuel
  • Gbenga Ajakaye
    Gbenga Ajakaye Member Posts: 3,422 Gold Trophy
    edited Dec 25, 2016 11:46AM

    John as provided the answer that you need.

    If you want user Scott to own the objects from your ddl, then connect as Scott in SQL developer and execute your ddl as John suggested - under Scott user.

    Just make sure that your user (Scott) has the necessary privilege to create the types of objects that your ddl contain.

    M.Emmanuel
  • Heli
    Heli Member Posts: 53
    edited Dec 28, 2016 4:17PM

    Hello

    depending if you define a physical model or not...

    If you do not have a physical model you can define the schema by first adding the schema wanted (right-click on Schema in Browser and add the schema) and then select the object attached to that schema from the list.

    If you do define a physical model (more preferrable) define a User in physical model and add that as a user to all the objects wanted. Note that you can just define it to one table and then use Propagate Properties to add it to the other tables. Note that a physical model must be open when generating the DDL, if it is not open the schema defined will not take affect.

    Best regards,

    Heli

This discussion has been closed.