Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6895639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:56:04+00:00 2026-05-27T06:56:04+00:00

I really hope someone has some insight into this. Just to clarify what I’m

  • 0

I really hope someone has some insight into this. Just to clarify what I’m talking about up front; when referring to Schema I mean the database object used for ownership separation, not the database create schema.

We use Sql Server Schema objects to group tables into wholes where each group belongs to an application. Each application also has it’s own database login. I’ve just started introducing database roles in order to fully automate deployment to test and staging environment. We’re using xSQL Object compare engine. A batch file is run each night to perform comparison and generate a script change file. This can then be applied to the target database along with code changes.

The issue I’m encountering is as folows. Consider the following database structure:

Database:

  • Security/Schemas:
    • Core
      • CoreRole (owner)
      • SchemaARole (select, delete, update)
      • SchemaBRole (select)
    • SchemaA
      • SchemaARole (owner)
    • SchemaB
      • SchemaBRole (owner)
  • Security/Roles/Database Roles:
    • CoreRole
      • core_login
    • SchemaARole
      • login_a
    • SchemaBRole
      • login_b

The set-up works perfectly well for the three applications that use these. The only problem is how to create / generate a script that creates schema -> role permissions? The owner role gets applied correctly. So for example, schema Core gets owner role CoreRole (as expected). However the SchemaARole and SchemaBRole do not get applied.

I wasn’t able to find an option to turn this on within xSQL object nor does an option to script this from SQL Server management studio exist. Well, I can’t find it at least.

Am I trying to do impossible? How does SQL Server manage this relationship then?

  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:56:04+00:00Added an answer on May 27, 2026 at 6:56 am

    I just kicked up SQL Profiler & trapped what I think you scenario is. Try this:

    GRANT SELECT ON [Core].[TestTable] TO [CoreRole]
    GRANT DELETE ON [Core].[TestTable] TO [CoreRole]
    GRANT UPDATE ON [Core].[TestTable] TO [CoreRole]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really hope someone can shed some light on this problem, I have built
I have a very weird problem.. I really do hope someone has an answer
hope to get some help here because this is something that really makes me
I really hope someone can help on this because I'm learning cocoa and have
I'm having some problems with jquery and I really hope someone out there can
This really, really urks me, so I hope that someone can give me a
Hi guys I hope someone can help me with this I´m really stuck although
I'm almost losing it, i really hope someone can help me out! I'm using
I have a really hard time understanding routes and I hope someone can help
I really hope this is not a question posed by millions of newbies, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.