Book a Demo

Author Topic: How to create a Schema(owner) a Sql server table  (Read 4894 times)

James604

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
How to create a Schema(owner) a Sql server table
« on: November 05, 2007, 12:08:34 pm »
How to create a table owner for a sql server 2005 table. When try to look up the "help" and it says to use "Tagged Value",but somehow,it won't work for me. Should be not that hard to set a table owner to a table?
Powerdesigner is really easy to create a user,the pick it up.....
Don't know how to do it on EA, any thougts?


James

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: How to create a Schema(owner) a Sql server tab
« Reply #1 on: November 05, 2007, 02:06:56 pm »
James,

It seems you need to do this for each table.

[I could be wrong on this. You could always try doing the following on either the package or the diagram to see if affects all the contained tables, or at least the ones without an explicit setting. If you try this I suggest you set up a data diagram - look around for it when you first create the diagram - instead of a class diagram.]

Now, how to set up a table owner...
  • Create a table as usual (or choose one you've already built.
  • Make sure the table is selected on the diagram.
  • Look at the tagged values window, and you should see an OWNER tag (yes, it in upper case).
  • Give the tag a value - simply the owner name you want the table to have.
  • While you're there you can fill in the other two tagged values if they are important to your model.
  • Click on the diagram background to ensure that no table is selected [You don't really have to do this, if you only want to generate DDL for a single table.]
  • Generate package code as usual, but make sure that you have checked the Generate Table Owner box on the dialog.
You should now have the table owner set up using the value in the tagged value window.

If this does not work, make sure that your database is set to SQL Server 2005 at the table and package level. If necessary reset the database and try again.

I just checked this here, and it worked fine with SQL Server 2005.

David
No, you can't have it!

James604

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: How to create a Schema(owner) a Sql server tab
« Reply #2 on: November 05, 2007, 02:45:37 pm »
Thank you very much. David.
First of all, I don't have OWNER option from tagged value window. But I can add this value in by Setting->UML-Tagged Values list.. I think should be the right place to add it in.
It seems to work. But can I generate script to create schema? I need to create aonther file to create it...oops.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: How to create a Schema(owner) a Sql server tab
« Reply #3 on: November 05, 2007, 03:02:19 pm »
I just checked again, and I do see the owner in the tagged values window.

Try running the DDL generation, making sure to check the option to generate the owner. Since EA remembers this option setting, let's see if it makes a difference.

After you've run the above DDL generation, create a new package and diagram. Make sure you have the Tagged Value window visible - you can dock it to make this easy - then add a new table. Do you see the owner tag?

David
No, you can't have it!

James604

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: How to create a Schema(owner) a Sql server tab
« Reply #4 on: November 05, 2007, 04:39:39 pm »
Yeah, you are right.
If I re-create a package, and then drag a table in. On the tagged values window has 3 Items: DBVersion,Owner and Tablespace.
Seem to be a little trick here.

Thank you for helping me out.