Cannot Choose Database Items when connecting AD Group with Multiple Schemas

Thread is closed for posting
8 posts, 1 answers
  1. Greg Lynne
    Greg Lynne avatar
    31 posts
    Member since:
    Mar 2010

    Posted 29 Jun 2011 Link to this post

    Hi,

    I am using OpenAccess and I am unable to choose any tables in the wizard (can connect to database fine). The problem seems to arise when the user connecting to the database, is connecting as an active directory group (not a user) and there are multiple schemas in the database. As active directory groups do not have a deafult schema then the schema 'dbo' is not available to select. If the other available schemas do not have tables in them then you are unable to select any tables.

    We use:
    Telerik Version 2011.1.510.1
    SQL Server 2008 R2
    Visual Studio 2010

    1. Using the wizard to connect to a database as a active directory group.
    2. The database has multiple schemas.
    3. The schema 'dbo' is not available to select and availble schemas do not have tables in them.

    With some quick research I see a call may be logged with microsoft around this, however  I have tested and it works fine using the MS Entity Framework wizard.

    I hope this makes sense, does anyone know a fix for this.

    Andrew
  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 05 Jul 2011 Link to this post

    Hi Andrew Brown,

    Maybe I did not understand you correctly but how are you logging in as a group and not as a user? Could you please send me the connection string you are using, so I can try the same setup in order to replicate the problem? Have you granted reading rights to the AD group in the dbo schema? If yes, this should be enough for any user in this group to read the schema and see it in the Create Domain Model wizard.

    All the best,
    Alexander
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. Greg Lynne
    Greg Lynne avatar
    31 posts
    Member since:
    Mar 2010

    Posted 05 Jul 2011 Link to this post

    The connection string remains standard from within Viusal Studio, i.e. "Data Source=#DBNAME;Initial Catalog=BarCoding;Integrated Security=True". It is on the SQL Server end, where a group is added to the security/users on a database. So I and other developers are in a particular group. As I said previouslly, this exception only occurs when there are multiple schemas for the database in SQL Server and this is when the "New Domain Model Wizard" cannot find the "dbo" schecma.
  4. Greg Lynne
    Greg Lynne avatar
    31 posts
    Member since:
    Mar 2010

    Posted 05 Jul 2011 Link to this post

    Sorry forgot to add, that in this case the group has "db_owner" rights on the database.
  5. Greg Lynne
    Greg Lynne avatar
    31 posts
    Member since:
    Mar 2010

    Posted 05 Jul 2011 Link to this post

    Also forgot to mention this is other user schemas not the db_* schemas.
  6. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 12 Jul 2011 Link to this post

    Hello Andrew Brown,

    Sorry for the delay, we are quite busy around the release. We are currently investigating this behavior and will notify you as soon as we have some more details.

    Kind regards,
    Alexander
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  7. Answer
    Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 14 Jul 2011 Link to this post

    Hi Andrew Brown,

    We found the problem and it is that we are querying the sys.database_principals table to obtain the default schema name for the current user. However, this table does not contain a record for the current user. The record for the group login used has the default_schema_name set to NULL, as group logins do not have default schemas.
    Probably we will have to implement additional logic to handle this case and get the default schema for the dbo user. You can expect this to be fixed in one of the following internal builds or service packs. Until then, I am afraid you will have to use another login (not a group one) to create the domain model. Once you create the model and include all needed tables, you can switch back to the group login, there should be no problems at runtime. Please excuse us for the inconvenience caused.

    Best wishes,
    Alexander
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  8. Greg Lynne
    Greg Lynne avatar
    31 posts
    Member since:
    Mar 2010

    Posted 14 Jul 2011 Link to this post

    Thats great thanks, glad I brought it to your attention.
Back to Top