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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:33:20+00:00 2026-06-16T19:33:20+00:00

We have been using Visual Studio Database projects for a while now and they

  • 0

We have been using Visual Studio Database projects for a while now and they work great for deployments. We have started capturing the current state of databases in different environments as dbschemas or dacpac files so we can reference them in other database projects and so we can see the state of production schemas without having production access.

Often I want to take a dbschema or dacpac from source control and create that schema on my local sql server but there are almost always errors due to users that exist in one environment and not my local. If I ignore user object types, I still get errors if anything else references the user (like schemas).

I’ve seen suggestions to create a server project to handle this case but I don’t want to create anything custom for this since I’m tasked to create a generic tool for our developers. I want to be able to take any dbschema or dacpac and import it with a “best-effort” attempt.

I understand this would be dangerous in most scenarios but on my local database I almost never care if there is data loss or other critical errors. I just want a fast way to get the valid objects in a dbschema on my local instance.

  • 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-06-16T19:33:22+00:00Added an answer on June 16, 2026 at 7:33 pm

    I know the exact problem that you are dealing with. In VS2010, when you use a dbschema file, I don’t beleive there is any way to do this other than create a server project (as you have said). You can, however, do a schema compare and choose not to compare users / logins, I beleive.

    I have been using 2012 SSDT on my latest project and didn’t realize that this error disappeared until I read your question. When I imported an existing database, it appears that the users were not imported with it. Thus, when I publish the project, it is not deploying any users. What’s interesting though is that if you do a schema compare you have the option to compare users and deploy them. However, if you publish via the project (which I assume is using SqlProject.exe to publish) the users are not touched, even if you check Drop Objects in the Target that do not exist in the project.

    My suggestion then is then to upgrade to the latest version of Database projects (available for 2010 and 2012), do not include users in the projects and use SqlPackage.exe to publish.

    Hope this is helpful,
    Mark

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

Sidebar

Related Questions

We have been using Visual Studio 2010's database projects for several internal or single-customer
I have been using Visual Studio integrated with Source Safe for years, when I
I have been using Visual Studio 2008 quite long but lately I am getting
I'm a long-time C++ programmer developing on Windows, and have been using Visual Studio
I have been using (and loving ) the jQuery intellisense for Visual Studio 2008
I've been using Visual Studio's property sheets for building my code and I have
gcc 4.4.2 / Visual Studio C++ 2008 I have been using cmake on linux,
I've mainly been using Mono for Android via Visual Studio, but have switched over
I have created a database and table using Visual Studio's SQL Server Compact 3.5
I have created a project in Visual Studio using a Windows Form application C#.

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.