Book a Demo

Author Topic: Specifying SQL Server 2005 database schema  (Read 3654 times)

cseha

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Specifying SQL Server 2005 database schema
« on: January 21, 2009, 08:44:10 pm »
If I specifiy the database schema for SQL Server 2005 tables as the tagged value 'OWNER', everything is correctly qualified in the generated DDL, but the sp_addextendedproperty @level0type contains 'User', so when the DDL is executed I get the 'Object is invalid. Extended properties are not permitted on 'TableName', or the object does not exist.' error message.
I have to replace 'User' to 'SCHEMA' in order to make it work.

Is there a better way to specify the database schema for SQL Server 2005 tables?

Thanks,
Attila

Elham

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Specifying SQL Server 2005 database schema
« Reply #1 on: January 28, 2009, 06:43:55 pm »
USER and TYPE as level-0 types will be removed in a future version of SQL Server. Avoid using these features in new development work, and plan to modify applications that currently use these features. Use SCHEMA as the level 0 type instead of USER. For TYPE, use SCHEMA as the level 0 type and TYPE as the level 1 type.
(FROM BOOK ONLINE)

Ed Vowles

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Specifying SQL Server 2005 database schema
« Reply #2 on: February 04, 2009, 08:18:06 pm »
I have this problem too. Did you get a work around cseha?

As Elham points out, the USER level-0 type is on the way out and really we want enterprise architect to set SCHEMA as the level-0 type.

How do you specifiy the database schema for sql server 2005/2008 tables??!

Ed

cseha

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Specifying SQL Server 2005 database schema
« Reply #3 on: February 05, 2009, 12:18:06 am »
Unfortunatelly I don't know a better way to specify the schema.

The work around: find and replace 'User' -> 'SCHEMA'

But the issue still exists.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Specifying SQL Server 2005 database schema
« Reply #4 on: February 05, 2009, 07:48:18 am »
Make a feature request - or better yet a bug report, since SQL Server 2005 and 2008 make it clear that the old syntax should not be continued.

Use the appropriate link under the Support link near the bottom of any forum page.


[edit]See below.

Sparx has this in hand.[/edit]
« Last Edit: February 05, 2009, 11:38:12 pm by Midnight »
No, you can't have it!

juhi

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Specifying SQL Server 2005 database schema
« Reply #5 on: February 05, 2009, 09:25:50 am »
We already aware of this issue. The appropriate fixes will be availabale in our next release. From our next build, 'USER' keyword will be generated only for SQL Server 2000 and SCHEMA will be generated for SQL Server 2005 and 2008. Sorry for the inconvenience.

 :) Juhi
Sparx Systems Pty Ltd