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

  • Home
  • SEARCH
  • 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 6996513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:09:59+00:00 2026-05-27T20:09:59+00:00

The scenario: Trying to restore from a bacpac taken from SQL Azure. Either to

  • 0

The scenario:

Trying to restore from a bacpac taken from SQL Azure.

Either to a new SQL Azure database instance, or an on premises server. For the earlier with the Management portal or the DAC Framework Client Side Tools.

It seems to work fine, and naturally the SQL users are not mapped to SQL logins after the restore.

What I tried:

When I try to map it with:
alter user MyUser with login = MyLogin, it fails with:

Msg 33016, Level 16, State 1, Line 6 The user cannot be remapped to a login. Remapping can only be done for users that were mapped to Windows or SQL logins.

Running select * from sys.database_principals does list the users, but with a much longer SID than a SQL authenticated user I created to compare it to.

On premises if I run a sp_change_users_login 'Report' the users are Not listed, so are not being detected as orphaned.

On premises if I try using sp_change_users_login, it fails with:

Msg 15291, Level 16, State 1, Procedure sp_change_users_login, Line 114 Terminating this procedure. The User name ‘MyUser’ is absent or invalid.

On premises if I try it through the User Mapping section of the Login Properties UI, I get:

Create failed for User ‘My User’. … User, group, or role ‘MyUser’
already exists in the current database.

I tried doing it all over again, in case something was corrupted when restoring for some reason, same results.

The question:

How can I remap these SQL Users?

I’d like to avoid having to re-create those from scratch and any relation those have to the schema objects in the database?

Some extra info:

One type of SQL users that look a lot like what I’m seeing for the SQL Azure users, are ones created with

create user AnotherUser without login

Those fail in the exact same way in all the 3 mapping approaches I used above. That is not the case in any of the approaches for regular SQL users. Additionally the sid is also long, and begins with the same “0x010500000000000903000000”

  • 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-27T20:10:00+00:00Added an answer on May 27, 2026 at 8:10 pm

    If you ever get that, it is Most likely a corrupt backup. Just like the linked on premises scenario, the behaviour comes out of nowhere and was traced to a corrupt backup.

    In my case, it was the same. Right before posting the question, my last try was: a different backup of the database, it worked without issues.

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

Sidebar

Related Questions

Scenario: I am trying for importing data from MS SQL Server to HDFS. But
My scenario - I am trying to send a Assembly File from Server to
I am trying to simulate a scenario where connection to the server of one
I am trying to build an SQL Statement for the following search scenario: I
I am trying to imitate a scenario where 300,000 consumers are accessing a server.
Scenario We're developing a new MVC web project and we're trying to adhere to
Scenario: Creating an app for learning purposes and am trying to make it database
The scenario is trying to adjust font size to get a nice graphic arrangement,
I'm trying to write a Cucumber scenario that requires me to have a logged
I'm trying to implement this scenario using Unity and i can't figure out how

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.