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 968655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:31:09+00:00 2026-05-16T02:31:09+00:00

When performing a schema compare having db_owner rights on the target database results in

  • 0

When performing a schema compare having db_owner rights on the target database results in the following error:

The user does not have permission to perform this action.

Using the SQL Server Profiler I figured out this error occurs executing a query targeting the master db view: [sys].[dm_database_encryption_keys]

While specifically ignoring all object types but Tables one would presume the SQL Compare doesn’t need access to the db encryption keys.
Also note:

http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/c11a5f8a-b9cc-454f-ba77-e1c69141d64b/

One solution would be to GRANT VIEW SERVER STATE to the db user, but in my case I’m not hosting the database services and won’t get the rights to the server state.

Also tried excluding DatabaseEncryptionKey element in the compare file.

 <PropertyElementName>
    <Name>Microsoft.Data.Schema.Sql.SchemaModel.SqlServer.ISql100DatabaseEncryptionKey</Name>
    <Value>ExcludedType</Value>
 </PropertyElementName>

Anyone has an workaround this?

We’re using MS Data Tools compare to publish from a Database project into a DTAP environment.

  • 1 1 Answer
  • 0 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-16T02:31:10+00:00Added an answer on May 16, 2026 at 2:31 am

    The only successful workaround I’ve found is to deploy the schema to a local development database and then do the schema compare using that local database as the source instead of the database project.

    The error still comes up in this situation, but the Write Updates button is no longer disabled and the schema updates as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When performing many inserts into a database I would usually have code like this:
Why does the following manifest not install a widget icon on the widget menu?
Since SQLite does not support RIGHT OUTER JOINS I pose the following challenge (read:
My Schema I have the following tables table notes/example values ------------------------------------------------ users ( id
When performing many disk operations, does multithreading help, hinder, or make no difference? For
While performing some upcoming maintenance, I'm going to have to redirect all site traffic
My extension is simply performing actions on pages based on user clicks; it works
I am intermittently getting an System.InvalidCastException: Specified cast is not valid. error in my
I've just finished setting up the foundations for performing schema upgrades on GAE's datastore
I am having difficulties performing a search using Solr on certain fields. I am

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.