Answer the question
In order to leave comments, you need to log in
How to copy users to Azure SQL?
How to copy users (LOGIN) from one database to another?
Now I'm making a request to the sys.sql_logins table in the source database, getting logins and doing CREATE LOGIN in the target database
Minus that I can't copy the password. You have to set it in the script, then change it.
Tried:
1) CREATE LOGIN name WITH PASSWORD = 'pass' HASHED - Azure swears that the HASHED keyword is not supported by this version of SQL.
2) UPDATE sys.sql_logins SET password_hash = 'hash' WHERE name = 'name' - Azure gives "Ad hoc updates to system catalogs are not allowed" error.
Maybe there are other ways to copy users (LOGIN)?
Answer the question
In order to leave comments, you need to log in
Migrating Users Between Instances of SQL Server .
WITH PASSWORD = 'pass' HASHED
WITH PASSWORD = 0xhash HASHED
There is a difference. You can try before giving up.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question